public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Artur Frenszek-Iwicki <fedora@svgames.pl>
To: git-commits@fedoraproject.org
Subject: [rpms/lazarus] multiple-IDE-widgetsets: Fix SIGSEGV in programs using Qt5 widgetset
Date: Thu, 23 Jul 2026 08:18:21 GMT	[thread overview]
Message-ID: <178479470107.1.6612247075861996651.rpms-lazarus-9435ad2c50a2@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/lazarus
Branch : multiple-IDE-widgetsets
Commit : 9435ad2c50a2a0e63161dd934f07e88760ce3b9e
Author : Artur Frenszek-Iwicki <fedora@svgames.pl>
Date   : 2024-12-09T17:03:44+01:00
Stats  : +50/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/lazarus/c/9435ad2c50a2a0e63161dd934f07e88760ce3b9e?branch=multiple-IDE-widgetsets

Log:
Fix SIGSEGV in programs using Qt5 widgetset

---
diff --git a/0002-qt5-segfault.patch b/0002-qt5-segfault.patch
new file mode 100644
index 0000000..9a3976f
--- /dev/null
+++ b/0002-qt5-segfault.patch
@@ -0,0 +1,39 @@
+diff -U4 -r lazarus-3.6--orig/lazarus/lcl/interfaces/qt5/qtwsforms.pp lazarus-3.6--patched/lazarus/lcl/interfaces/qt5/qtwsforms.pp
+--- lazarus-3.6--orig/lazarus/lcl/interfaces/qt5/qtwsforms.pp	2024-09-29 11:39:45.000000000 +0200
++++ lazarus-3.6--patched/lazarus/lcl/interfaces/qt5/qtwsforms.pp	2024-12-09 16:58:22.751428297 +0100
+@@ -1034,20 +1034,23 @@
+     begin
+       if Assigned(TCustomForm(AWinControl).Menu) then
+       begin
+         AWin := TQtMainWindow(AWinControl.Handle);
+-        AWin.MenuBar.sizeHint(@ASize);
+-        // geometry isn't updated yet
+-        if ASize.cy < 10 then
+-          ASize.cy := 0;
+-        // we must use real geometry, and then exclude menubar height.
+-        aClientRect := AWin.getGeometry;
+-        Types.OffsetRect(aClientRect, -aClientRect.Left, -aClientRect.Top);
+-        dec(AClientRect.Bottom, ASize.cy);
+-        {$IFDEF VerboseQtResize}
+-        DebugLn('TQtWSCustomForm.getDefaultClientRect ',dbgsName(AWinControl),' ',dbgs(AWin.getClientBounds),' mnuBarHeight ',dbgs(AWin.MenuBar.getHeight),' ASize=',dbgs(ASize),' FINAL=',dbgs(AClientRect));
+-        {$ENDIF}
+-        Result := True;
++        if Assigned(AWin.MenuBar) then
++        begin
++          AWin.MenuBar.sizeHint(@ASize);
++          // geometry isn't updated yet
++          if ASize.cy < 10 then
++            ASize.cy := 0;
++          // we must use real geometry, and then exclude menubar height.
++          aClientRect := AWin.getGeometry;
++          Types.OffsetRect(aClientRect, -aClientRect.Left, -aClientRect.Top);
++          dec(AClientRect.Bottom, ASize.cy);
++          {$IFDEF VerboseQtResize}
++          DebugLn('TQtWSCustomForm.getDefaultClientRect ',dbgsName(AWinControl),' ',dbgs(AWin.getClientBounds),' mnuBarHeight ',dbgs(AWin.MenuBar.getHeight),' ASize=',dbgs(ASize),' FINAL=',dbgs(AClientRect));
++          {$ENDIF}
++          Result := True;
++        end;
+       end;
+     end;
+   end;
+ end;

diff --git a/lazarus.spec b/lazarus.spec
index 77de4d2..416dc28 100644
--- a/lazarus.spec
+++ b/lazarus.spec
@@ -3,7 +3,7 @@ Summary:        Lazarus Component Library and IDE for Free Pascal
 
 Version:        3.6
 
-%global baserelease 1
+%global baserelease 2
 Release:        %{baserelease}%{?dist}
 
 # The qt5pas version is taken from lcl/interfaces/qt5/cbindings/Qt5Pas.pro
@@ -39,6 +39,13 @@ Patch0:         0000-Makefile_patch.diff
 # https://sources.debian.org/data/main/l/lazarus/3.0%2Bdfsg1-6/debian/patches/Fixed-crash-when-trying-to-recompile-packages.patch
 Patch1:         0001-crash-when-trying-to-recompile-packages.patch
 
+# Fix SIGSEGV on startup in programs built using the Qt5 widgetset
+# rhbz: https://bugzilla.redhat.com/show_bug.cgi?id=2323227
+#
+# Backport of upstream commit:
+# https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/7ae720285564f69e85216a0889b3ae4308661860
+Patch2:         0002-qt5-segfault.patch
+
 # -- Build-time dependencies
 
 BuildRequires:  binutils
@@ -557,6 +564,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdat
 
 
 %changelog
+* Mon Dec 09 2024 Artur Frenszek-Iwicki <fedora@svgames.pl> - 3.6-2
+- Add a patch to fix SIGSEGV in programs built using Qt5 widgetset
+
 * Mon Sep 30 2024 Artur Frenszek-Iwicki <fedora@svgames.pl> - 3.6-1
 - Update to v3.6
 

                 reply	other threads:[~2026-07-23  8:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178479470107.1.6612247075861996651.rpms-lazarus-9435ad2c50a2@fedoraproject.org \
    --to=fedora@svgames.pl \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox