Bug 68588 - abort when trying to open "edit/database/connection type" dialog
Summary: abort when trying to open "edit/database/connection type" dialog
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: All All
: highest critical
Assignee: Andrzej Hunt
URL:
Whiteboard: target:4.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-26 23:42 UTC by Lionel Elie Mamane
Modified: 2013-08-28 14:09 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2013-08-26 23:42:54 UTC
warn:vcl.layout:6720:1:include/vcl/builder.hxx:256: widget "embeddeddbList" not found in .ui
warn:vcl.layout:6720:1:include/vcl/builder.hxx:258: .ui widget "embeddeddbList" needs to correspond to vcl type 7ListBox
soffice.bin: /home/master/src/libreoffice/workdirs/libreoffice-4.2/include/vcl/builder.hxx:259: T* VclBuilder::get(T*&, rtl::OString) [with T = ListBox]: Assertion `w && dynamic_cast<T*>(w)' failed.

This seems to come from

commit 04d1e80ac7091ec2bf31c8617e832d5fe15350be
Author: Andrzej J.R. Hunt <andrzej@ahunt.org>
Date:   Tue Jul 30 12:27:10 2013 +0200

    Add embedded database selector to db setup dialog.
    
    This allows for choosing between the HSQLDB driver (currently default)
    and the firebird driver for embedded databases.
    
    Change-Id: I3734440fedf9f07b28f9cfd806dafbe6610393f7
    Reviewed-on: https://gerrit.libreoffice.org/5199
    Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
    Tested-by: Luboš Luňák <l.lunak@suse.cz>


Probably you forgot to commit a new .ui file, or changes to one? My master build is a bit older, but looking at a fresh "git fetch" of master, I don't see any changes to any .ui file that introduces a "embeddeddblist" widget.

Reproduced on:

commit 9a9ee66f0d9dd126ed31db096b77f9c67355411b
Author: Lionel Elie Mamane <lionel@mamane.lu>
Date:   Wed Aug 14 17:36:50 2013 +0200

    fixup handling of unsigned values
Comment 1 Andrzej Hunt 2013-08-27 21:15:11 UTC
I've been unable to reproduce this on either of my systems:

-My current development system with a rather old working tree (based on two week old master) works fine as expected (this is the system where I created/tested the patch).

-New system, built from clean, only in use since last week (and no development work done on it yet), with the following commit:

commit 7bc88db8c500b41fe926fb99cd403accd696e671
Author: Andrzej J.R. Hunt <andrzej@ahunt.org>
Date:   Tue Aug 27 20:52:37 2013 +0100

    Implemet setNull. (firebird-sdbc)
    
    Change-Id: I9fd53a5e8b5d1dba467fa8064f9f2ea1b93f26df

(Couldn't reproduce a week ago on the same machine either.)

The .ui changes are definitely in that commit though -- maybe there is something specific to your machine that is preventing the updated .ui file from being used?
Comment 2 Lionel Elie Mamane 2013-08-28 04:48:29 UTC
Re-reproduced with

commit 4033532e9ffb004ab5864401aa1af0c69fc024ec
Author: Lionel Elie Mamane <lionel@mamane.lu>
Date:   Tue Aug 27 18:28:37 2013 +0200

    release m_aLengthVector even when m_aBindVector is empty


Looking at commit 04d1e80ac7091ec2bf31c8617e832d5fe15350be more closely, it indeed contains the string "embeddeddbList" in the .ui file... So frankly, I'm not sure what is wrong.
Comment 3 Lionel Elie Mamane 2013-08-28 05:07:05 UTC
I took a look at the core file in gdb; it seems to me that the code looks for "embeddeddbList" in dbaccess/uiconfig/ui/generalpagedialog.ui, while it is "only" in dbaccess/uiconfig/ui/generalpagewizard.ui.

To resolve any doubt, when you say you cannot reproduce, you are testing by opening an *existing* (non-embedded) .odb file, going to menu edit, submenu database, entry "connection type", right? *Not* the new database wizard. The new database wizard also opens correctly for me. This bug is about changing the connection type of an existing .odb file.

#18 0x00007f2814d5308d in VclBuilder::get<ListBox> (this=0x258bad0, ret=@0x261bcb8: 0x0, sID="embeddeddbList")
    at /home/master/src/libreoffice/workdirs/libreoffice-4.2/include/vcl/builder.hxx:259
#19 0x00007f2814d520ed in VclBuilderContainer::get<ListBox> (this=this@entry=0x261bc10, ret=@0x261bcb8: 0x0, sID="embeddeddbList")
    at /home/master/src/libreoffice/workdirs/libreoffice-4.2/include/vcl/builder.hxx:392
#20 0x00007f2814d5c3c0 in dbaui::OGeneralPage::OGeneralPage (this=this@entry=0x261ba20, pParent=pParent@entry=0x246f350, 
    _rUIXMLDescription="dbaccess/ui/generalpagedialog.ui", _rItems=...)
    at /home/master/src/libreoffice/workdirs/libreoffice-4.2/dbaccess/source/ui/dlg/generalpage.cxx:68
#21 0x00007f2814d5e769 in dbaui::OGeneralPageDialog::OGeneralPageDialog (this=0x261ba20, pParent=0x246f350, _rItems=...)
    at /home/master/src/libreoffice/workdirs/libreoffice-4.2/dbaccess/source/ui/dlg/generalpage.cxx:451
#22 0x00007f2814d3ed68 in dbaui::ODbTypeWizDialog::createPage (this=0x246f350, _nState=<optimized out>)
    at /home/master/src/libreoffice/workdirs/libreoffice-4.2/dbaccess/source/ui/dlg/dbwiz.cxx:243
#23 0x00007f2831996970 in svt::OWizardMachine::GetOrCreatePage (this=this@entry=0x246f350, i_nState=i_nState@entry=0)
    at /home/master/src/libreoffice/workdirs/libreoffice-4.2/svtools/source/dialogs/wizardmachine.cxx:254


(gdb) frame 18
#18 0x00007f2814d5308d in VclBuilder::get<ListBox> (this=0x258bad0, ret=@0x261bcb8: 0x0, sID="embeddeddbList")
    at /home/master/src/libreoffice/workdirs/libreoffice-4.2/include/vcl/builder.hxx:259
259	        assert(w && dynamic_cast<T*>(w));
(gdb) print w
$1 = (Window *) 0x0
(gdb) print *this
$3 = {
  <boost::noncopyable_::noncopyable> = {<No data fields>}, 
  members of VclBuilder: 
  m_aModuleMap = empty boost::ptr_map, 
  m_aDeferredProperties = std::__debug::map with 0 elements, 
  m_aChildren = std::__debug::vector of length 6, capacity 8 = {{
      m_sID = "PageGeneral", 
      m_pWindow = 0x261d1c0, 
      m_nResponseId = 0, 
      m_aPackingData = {
        m_bVerticalOrient = false, 
        m_nPosition = -1
      }
    }, {
      m_sID = "datasourceTypePre", 
      m_pWindow = 0x244c970, 
      m_nResponseId = 0, 
      m_aPackingData = {
        m_bVerticalOrient = false, 
        m_nPosition = -1
      }
    }, {
      m_sID = "datasourceTypeLabel", 
      m_pWindow = 0x244d020, 
      m_nResponseId = 0, 
      m_aPackingData = {
        m_bVerticalOrient = false, 
        m_nPosition = -1
      }
    }, {
      m_sID = "datasourceType", 
      m_pWindow = 0x244d750, 
      m_nResponseId = 0, 
      m_aPackingData = {
        m_bVerticalOrient = false, 
        m_nPosition = -1
      }
    }, {
      m_sID = "datasourceTypeHelp", 
      m_pWindow = 0x25a7420, 
      m_nResponseId = 0, 
      m_aPackingData = {
        m_bVerticalOrient = false, 
        m_nPosition = -1
---Type <return> to continue, or q <return> to quit---
      }
    }, {
      m_sID = "specialMessage", 
      m_pWindow = 0x25a7c00, 
      m_nResponseId = 0, 
      m_aPackingData = {
        m_bVerticalOrient = false, 
        m_nPosition = -1
      }
    }}, 
  m_aMenus = std::__debug::vector of length 0, capacity 0, 
  m_sID = "PageGeneral", 
  m_sHelpRoot = "dbaccess/ui/generalpagedialog/", 
  m_pStringReplace = 0x7f2835337bb1 <desktop::ReplaceStringHookProc(rtl::OUString const&)>, 
  m_pParent = 0x261ba20, 
  m_bToplevelHasDeferredInit = false, 
  m_bToplevelHasDeferredProperties = false, 
  m_bToplevelParentFound = false, 
  m_pParserState = 0x261a870, 
  m_xFrame = empty uno::Reference
}
Comment 4 Andrzej Hunt 2013-08-28 07:20:32 UTC
Apologies -- I completely misunderstood what was going on (I'd never used the dialog before since I'd only used embedded dbs) -- I've managed to reproduce now.

I'm trying to fix this by testing for the presence of embeddeddbList in the dialog code before trying to use it now (alternatively I could test for the dialog name but that might be too brittle).
Comment 5 Andrzej Hunt 2013-08-28 08:37:25 UTC
FYI. the patch fixing this is now in gerrit:
https://gerrit.libreoffice.org/#/c/5654/
Comment 6 Commit Notification 2013-08-28 14:09:46 UTC
Andrzej J.R. Hunt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c656482c5a1467d6dc21601e1296ba3711916d6b

fdo#68588 Move embeddeddbList into OGeneralPageWizard.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.