Bug 155562 - crash when switching to PostgreSQL connector in Database wizard
Summary: crash when switching to PostgreSQL connector in Database wizard
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha1+
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Julien Nabet
URL:
Whiteboard: target:7.6.0
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Database-Wizard Crash
  Show dependency treegraph
 
Reported: 2023-05-30 19:16 UTC by Stéphane Guillou (stragu)
Modified: 2024-04-25 02:30 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
gdb backtrace with LO 7.6 alpha1+ debug (81.04 KB, text/x-log)
2023-05-30 19:16 UTC, Stéphane Guillou (stragu)
Details
bt with debug symbols (20.71 KB, text/plain)
2023-05-30 19:32 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2023-05-30 19:16:49 UTC
Created attachment 187611 [details]
gdb backtrace with LO 7.6 alpha1+ debug

Steps to reproduce:
1. Open LO Base
2. In Wizard, select "Connect to and existing database"
3. Select "PostgreSQL" in the dropdown

Result: crash

Backtrace from debug build:

Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 7e3ddf1e5aae5e4e956495e3d86a8cbf6e251b5e
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Both debug and non-debug builds crash.

In console:

warn:vcl.gtk:83813:83813:vcl/unx/gtk3/gtkinst.cxx:23551: GtkInstanceBuilder: error when calling gtk_builder_add_from_file: /home/stragu/Downloads/lodbg/program/../share/config/soffice.cfg/dbaccess/ui/postgrespage.ui:26:93 Invalid property: AtkObject.label
soffice.bin: /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/vcl/unx/gtk3/gtkinst.cxx:23554: void {anonymous}::load_ui_file(GtkBuilder*, const rtl::OUString&): Assertion `rc && "could not load UI file"' failed.
Comment 1 Stéphane Guillou (stragu) 2023-05-30 19:23:32 UTC
Bibisected with linux-64-7.6 repo to first bad commit 278ab9f4985db540ff4b8872c2d03a9bd75324dc which points to core commit:

commit afe99617707c92460e66486c0057ef327e8aa017
author	nirnay <nirnaykorde@gmail.com>	Tue Apr 18 15:05:25 2023 +0530
committer	Michael Weghorn <m.weghorn@posteo.de>	Fri Apr 28 05:50:30 2023 +0200
tdf#43369: Specific UI for collecting PostgreSQL connection settings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150546

Nirnay, can you please have a look?
Comment 2 Julien Nabet 2023-05-30 19:31:14 UTC
On pc Debian x86-64 with master sources updated today, I got an assertion with gtk3:

#5  0x00007fb784a53df2 in __GI___assert_fail
    (assertion=0x7fb77294b205 "rc && \"could not load UI file\"", file=0x7fb772927ab9 "/home/julien/lo/libreoffice/vcl/unx/gtk3/gtkinst.cxx", line=23554, function=0x7fb7729478c7 "void (anonymous namespace)::load_ui_file(GtkBuilder *, const rtl::OUString &)") at ./assert/assert.c:101
#6  0x00007fb772ad1ffc in (anonymous namespace)::load_ui_file(_GtkBuilder*, rtl::OUString const&)
    (pBuilder=0x56365035ecf0, rUri="file:///home/julien/lo/libreoffice/instdir/program/../share/config/soffice.cfg/dbaccess/ui/postgrespage.ui") at /home/julien/lo/libreoffice/vcl/unx/gtk3/gtkinst.cxx:23554
#7  0x00007fb772ad17a6 in (anonymous namespace)::GtkInstanceBuilder::GtkInstanceBuilder(_GtkWidget*, std::basic_string_view<char16_t, std::char_traits<char16_t> >, rtl::OUString const&, SystemChildWindow*, bool) (this=0x563650a34bd0, pParent=0x563650a21470, rUIRoot=u"file:///home/julien/lo/libreoffice/instdir/program/../share/config/soffice.cfg/", rUIFile="dbaccess/ui/postgrespage.ui", pInterimGlue=0x0, bAllowCycleFocusOut=true) at /home/julien/lo/libreoffice/vcl/unx/gtk3/gtkinst.cxx:23933
#8  0x00007fb772ab7215 in std::make_unique<(anonymous namespace)::GtkInstanceBuilder, _GtkWidget*&, rtl::OUString const&, rtl::OUString const&, decltype(nullptr), bool>(_GtkWidget*&, rtl::OUString const&, rtl::OUString const&, decltype(nullptr)&&, bool&&)

after some minutes, gdb doesn't indicate the rest.

On console, I got:
warn:vcl.gtk:117490:117490:vcl/unx/gtk3/gtkinst.cxx:23551: GtkInstanceBuilder: error when calling gtk_builder_add_from_file: /home/julien/lo/libreoffice/instdir/program/../share/config/soffice.cfg/dbaccess/ui/postgrespage.ui:26:93 Invalid property: AtkObject.label
soffice.bin: /home/julien/lo/libreoffice/vcl/unx/gtk3/gtkinst.cxx :23554 : void (anonymous namespace)::load_ui_file(GtkBuilder *, const rtl::OUString &):  l'assertion « rc && "could not load UI file" » a échoué.


With kf5 or gen rendering, no assertion but:
warn:legacy.tools:117378:117378:vcl/source/control/roadmapwizard.cxx:298: RoadmapWizard::implUpdateRoadmap: there is no such path!
warn:vcl.builder:117378:117378:vcl/source/window/builder.cxx:3098: unhandled atk prop: label
warn:vcl.builder:117378:117378:vcl/source/window/builder.cxx:3098: unhandled atk prop: label
Comment 3 Julien Nabet 2023-05-30 19:32:30 UTC
Created attachment 187612 [details]
bt with debug symbols

Here's the complete bt after some minutes.
Comment 4 Julien Nabet 2023-05-30 19:44:17 UTC
I've submitted a patch here:
https://gerrit.libreoffice.org/c/core/+/152406
Comment 5 Julien Nabet 2023-05-30 20:14:55 UTC
About roadmap wizard message, it's completely unrelated.
gen at least follow this:
#0  vcl::RoadmapWizard::implUpdateRoadmap() (this=0x55f940f7e2e0) at vcl/source/control/roadmapwizard.cxx:297
#1  0x00007fc890f80d50 in vcl::RoadmapWizard::enterState(short) (this=0x55f940f7e2e0) at vcl/source/control/roadmapwizard.cxx:684
#2  0x00007fc890fd03b7 in vcl::RoadmapWizard::ActivatePage() (this=0x55f940f7e2e0) at vcl/source/control/wizardmachine.cxx:505
#3  0x00007fc890fd03eb in vcl::RoadmapWizard::ShowPage(unsigned short) (this=0x55f940f7e2e0, nLevel=0) at vcl/source/control/wizardmachine.cxx:511
#4  0x00007fc89160eca2 in SalInstanceAssistant::set_current_page(int) (this=0x55f94214a550, nPage=0) at vcl/source/app/salvtables.cxx:2067
#5  0x00007fc79bb33c55 in dbaui::ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(weld::Window*, SfxItemSet const*, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Any const&)
    (this=0x55f93ee3dfe0, _pParent=0x55f9408be5d8, _pItems=0x55f93ee37810, _rxORB=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x55f937ce24a8, _aDataSourceName=uno::Any("com.sun.star.frame.XModel": ...)) at dbaccess/source/ui/dlg/dbwizsetup.cxx:167


but gtk uses something else than RoadmapWizard:
#0  (anonymous namespace)::GtkInstanceAssistant::set_current_page(int) (this=0x561ef04f2d70, nPage=0) at vcl/unx/gtk3/gtkinst.cxx:7673
#1  0x00007f938fb33c55 in dbaui::ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(weld::Window*, SfxItemSet const*, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Any const&)
    (this=0x561eef198b10, _pParent=0x561ef0195d98, _pItems=0x561eebd64620, _rxORB=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x561ee9b081d8, _aDataSourceName=uno::Any("com.sun.star.frame.XModel": ...)) at dbaccess/source/ui/dlg/dbwizsetup.cxx:167

I'll stop here the digression :-)
Comment 6 nirnaykorde 2023-05-31 05:03:21 UTC
So Julien is the issue resolved ? It would take me hours just make and check what the issue is so I would rather avoid that.
Comment 7 Commit Notification 2023-05-31 05:26:17 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#155562: crash when switching to PostgreSQL connector in Database wizard

It will be available in 7.6.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 8 Julien Nabet 2023-05-31 05:26:26 UTC
(In reply to nirnaykorde from comment #6)
> So Julien is the issue resolved ? It would take me hours just make and check
> what the issue is so I would rather avoid that.

It should be ok but if I'm wrong, don't hesitate to revert the patch.
Comment 9 Stéphane Guillou (stragu) 2024-04-25 02:30:55 UTC
Verified in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 695e8742da850bbb15c2e6d2b5d4c99a0daf4925
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Thanks Julien!