Bug 162351 - Firebird: Changing primary key to autovalue leads to crash of whole LO (KDE only)
Summary: Firebird: Changing primary key to autovalue leads to crash of whole LO (KDE o...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
24.8.0.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:25.2.0 target:24.8.1
Keywords: bibisectRequest, haveBacktrace, regression
Depends on:
Blocks: KDE, KF5
  Show dependency treegraph
 
Reported: 2024-08-05 07:22 UTC by Robert Großkopf
Modified: 2024-08-09 01:00 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Try to set "ID" in table to AutoValue. (12.06 KB, application/vnd.oasis.opendocument.database)
2024-08-05 07:22 UTC, Robert Großkopf
Details
bt (8.32 KB, text/plain)
2024-08-06 10:19 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2024-08-05 07:22:34 UTC
Created attachment 195705 [details]
Try to set "ID" in table to AutoValue.

Open the attached database.
Open the table.
Set "ID" to AutoValue.
Save table.

No error appears (as in all versions before).
LO crashes immediately.

Version: 24.8.0.2 (X86_64) / LibreOffice Community
Build ID: 57ceca7d2eefdf83e7c9b4135a017f3361a8133f
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
Comment 1 Alex Thurgood 2024-08-05 10:04:53 UTC
@Robert:

I get the following error message when attempting to save the change to the table definition in the UI:

The column "ID" could not be changed. Should the column instead be deleted and the new format appended?

This is the expected behaviour, isn't it ?

Tested with

Version: 25.2.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: f7197e574cdbd7410fcadab1632bcce2626dca5a
CPU threads: 8; OS: macOS 14.5; UI render: Skia/Raster; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded
Comment 2 m_a_riosv 2024-08-05 11:27:18 UTC
The same as @Alex on
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f7197e574cdbd7410fcadab1632bcce2626dca5a
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 3 Robert Großkopf 2024-08-05 13:03:16 UTC
(In reply to Alex Thurgood from comment #1)
> @Robert:
> 
> I get the following error message when attempting to save the change to the
> table definition in the UI:
> 
> The column "ID" could not be changed. Should the column instead be deleted
> and the new format appended?
> 
> This is the expected behaviour, isn't it ?

This has been the expected behavior all the time. But it doesn't appear in LO 24.8.0.2
Message appears in LO 24.2.5.2.
Waiting for daily build (rpm), which has been created this week to have a look  …
Comment 4 Julien Nabet 2024-08-06 10:19:57 UTC
Created attachment 195734 [details]
bt

On pc Debian x86-64 with master sources updated today, I could reproduce this with kf5 rendering only (not with gen or gtk3 renderings)
Comment 5 Julien Nabet 2024-08-06 10:27:04 UTC
The pb is in:
510 m_xMoreButton.reset(m_xDialog->weld_widget_for_response(RET_MORE));
511 m_xMoreButton->connect_clicked(LINK(this, OSQLMessageBox, ButtonClickHdl));
See https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/dlg/sqlmessage.cxx?r=a551290f#510

Since weld_widget_for_response returns nullptr in
vcl/qt5/QtInstanceDialog.cxx
weld::Button* QtInstanceDialog::weld_widget_for_response(int) { return nullptr; }
See https://opengrok.libreoffice.org/xref/core/vcl/qt5/QtInstanceDialog.cxx?r=6712963e#48

So m_xMoreButton is null.

I'm not sure but it seems related to 1ace888823443b85d4a81b94656844f1b27e2987
tdf#130857 Use native qt widgets - simple message dialog

Omkar/Michael: any thoughts here?
Comment 6 jcsanz 2024-08-06 10:36:36 UTC
I can not reproduce the bug. The error message is shown to me, and no crashes.
------------------
Version: 24.8.0.2 (X86_64) / LibreOffice Community
Build ID: 57ceca7d2eefdf83e7c9b4135a017f3361a8133f
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded
-----------------
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f7197e574cdbd7410fcadab1632bcce2626dca5a
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded
Comment 7 Julien Nabet 2024-08-06 10:54:52 UTC
(In reply to jcsanz from comment #6)
> I can not reproduce the bug. The error message is shown to me, and no
> crashes.
> ------------------
> Version: 24.8.0.2 (X86_64) / LibreOffice Community
> Build ID: 57ceca7d2eefdf83e7c9b4135a017f3361a8133f
> CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render:
> Skia/Vulkan; VCL: win
> Locale: es-ES (es_ES); UI: es-ES
> Calc: CL threaded
> -----------------
> Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: f7197e574cdbd7410fcadab1632bcce2626dca5a
> CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render:
> Skia/Vulkan; VCL: win
> Locale: es-ES (es_ES); UI: es-ES
> Calc: CL threaded

Yes quite expected since considering https://opengrok.libreoffice.org/s?defs=weld_widget_for_response&project=core, Windows rendering must use vcl/source/app/salvtables.cxx
Comment 8 Michael Weghorn 2024-08-06 11:13:18 UTC
(In reply to Robert Großkopf from comment #0)
> Open the table.

i.e.: Right click on the table ("tbl_Test"), select "Edit"

I can reproduce with

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: aed5979ecc6befd64a024ba07064696f24640fec
CPU threads: 32; OS: Linux 6.9; UI render: default; VCL: qt6 (cairo+wayland)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded

(In reply to Julien Nabet from comment #5)
> I'm not sure but it seems related to 1ace888823443b85d4a81b94656844f1b27e2987
> tdf#130857 Use native qt widgets - simple message dialog
> 
> Omkar/Michael: any thoughts here?

Indeed, it works fine when LO is started with with SAL_VCL_QT_NO_WELDED_WIDGETS=1 to prevent using native Qt widgets.

So that can be used as a workaround for now at least, until the issue is fixed.
I'll take a look.
Comment 9 Michael Weghorn 2024-08-06 13:34:48 UTC
(In reply to Michael Weghorn from comment #8)
> I'll take a look.

Pending change series that implements the missing bits for this scenario: https://gerrit.libreoffice.org/c/core/+/171552
Comment 10 Commit Notification 2024-08-07 05:09:11 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f0ad3a95c1e841281048a784bd96e8d34e090c5b

tdf#162351 tdf#130857 qt weld: Add basic QtInstanceButton

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2024-08-07 05:10:15 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/877075e3abe5378b359cf7f069a859b91eb2d6d7

tdf#162351 tdf#130857 qt weld: Extract helper function to get button

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2024-08-07 05:10:19 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/573f21a6383cec270a9d25dfafb87a8241cbc5de

 tdf#162351 tdf#130857 qt weld: Implement weld_widget_for_response

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2024-08-07 05:11:23 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c1d671b0d89e1af4e629e11366b1f678f689e152

tdf#162351 tdf#130857 qt weld: Handle button click

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Michael Weghorn 2024-08-07 05:21:20 UTC
Fixed in master now. Backports for 24-8 pending in Gerrit.
Comment 15 Julien Nabet 2024-08-07 09:31:33 UTC
On pc Debian x86-64 with master sources updated today (so with all Michael's patches) + kf5 rendering, I confirm I don't reproduce the crash anymore.

Thank you Michael! :-)
Comment 16 Commit Notification 2024-08-09 01:00:34 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/c336d044357d14f40644b0db321e66132203e959

tdf#162351 tdf#130857 qt weld: Add basic QtInstanceButton

It will be available in 24.8.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2024-08-09 01:00:39 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/97fa00148f4fdb1e5451c23d50c8c8f65080caec

tdf#162351 tdf#130857 qt weld: Extract helper function to get button

It will be available in 24.8.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2024-08-09 01:00:43 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/b1630ec87cbd95f0fa87728cbff7d426a2a5baa6

tdf#162351 tdf#130857 qt weld: Implement weld_widget_for_response

It will be available in 24.8.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2024-08-09 01:00:47 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/670dc56982793c514d5524b9a1eb472a7f3ebde4

tdf#162351 tdf#130857 qt weld: Handle button click

It will be available in 24.8.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.