Bug Hunting Session
Bug 73352 - CRASH - Embedded Firebird - in a form, clicking on Datasource as Table button in toolbar causes LO to abort
Summary: CRASH - Embedded Firebird - in a form, clicking on Datasource as Table button...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:4.4.0 target:4.2.6 target:4.3....
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-07 10:44 UTC by Alex Thurgood
Modified: 2014-06-08 05:02 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
full backtrace (42.16 KB, text/plain)
2014-01-07 12:04 UTC, Alex Thurgood
Details
screenshot of result (15.15 KB, image/jpeg)
2014-01-09 20:27 UTC, Julien Nabet
Details
Shows the empty table-datasource in LO 4.3.*/LO4.2.* (51.45 KB, image/png)
2014-01-09 21:20 UTC, Robert Großkopf
Details
embedded firebird test file (51.48 KB, application/vnd.oasis.opendocument.database)
2014-01-10 08:21 UTC, Alex Thurgood
Details
osx trace (101.18 KB, text/plain)
2014-01-10 14:26 UTC, Alex Thurgood
Details
bt with symbols (5.33 KB, text/plain)
2014-01-22 21:24 UTC, Julien Nabet
Details
bt with symbols (4.59 KB, text/plain)
2014-05-30 23:58 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Thurgood 2014-01-07 10:44:37 UTC
How to reproduce :

1) Create an embedded Firebird ODB file
2) Create a table containing two fields :
ID integer, primary key
IMG blob

3) Create a form using the wizard based on the table.

4) Open form and insert some records with images (double-click on image control and choose file)

5) In the data navigation toolbar (by default at bottom of form), click on the Table view switch button.

6) What should happen : the table view is displayed in the upper section of the window

7) What actually happens : crash - see console output below


8) The autorecovery process also fails to recover the crashed ODB file despite informing the user that it has.



terminate called after throwing an instance of 'com::sun::star::sdbc::SQLException'
sh: 1: /home/Development/libo/core/instdir/program/../program/crashrep: not found
warn:sfx.control:30422:1:sfx2/source/control/dispatch.cxx:1530: Childwindow slot missing: 10365
warn:legacy.osl:30422:1:comphelper/source/misc/types.cxx:128: comphelper::getBOOL : invalid argument !
warn:sfx.control:30422:1:sfx2/source/control/dispatch.cxx:1530: Childwindow slot missing: 10365
warn:legacy.osl:30422:1:comphelper/source/misc/types.cxx:128: comphelper::getBOOL : invalid argument !
warn:legacy.osl:30422:1:framework/source/services/autorecovery.cxx:1182: need at document, at the very least
Comment 1 Lionel Elie Mamane 2014-01-07 11:08:00 UTC
Does this happen only with firebird and/or only if the table has a blob field? Then please adapt summary and lower severity.
Comment 2 Alex Thurgood 2014-01-07 12:04:40 UTC
Created attachment 91598 [details]
full backtrace
Comment 3 Alex Thurgood 2014-01-07 12:06:14 UTC
(In reply to comment #1)
> Does this happen only with firebird and/or only if the table has a blob
> field? Then please adapt summary and lower severity.

I have yet to test with other db/field types, will adjust accordingly after further testing.

Alex
Comment 4 Alex Thurgood 2014-01-07 12:13:05 UTC
Does not crash with Thunderbird Addressbook form containing text only fields.
Comment 5 Alex Thurgood 2014-01-07 12:20:25 UTC
Does not occur in hsqldb embedded test database with BLOB field for images. Apparently Firebird specific. Altering severity.


Alex
Comment 6 Julien Nabet 2014-01-07 21:12:27 UTC
Alex: I've got some difficulties to follow the step by step.
4) I can enter a number in ID column but when I click or double click on column 2, I've got nothing except <OBJECT> therefore I can't select any image file.

5) I don't find "Table view switch button"
Comment 7 Alex Thurgood 2014-01-08 10:38:21 UTC
Hi Julien,

You need to create a form first. (Step 3)
The image control that is created by default with the form creation wizard allows for binary stream input either by double-clicking (direct access to file selector dialog) on the control or by right mouse button clicking and selecting the context menu entry that is displayed which will then open the file selector dialog. 


Alex
Comment 8 Alex Thurgood 2014-01-08 10:43:45 UTC
@Julien : your form needs to be based on one of the non-default form control layouts, it won't work in the default table grid layout (never has, as far as I know).


Alex
Comment 9 Alex Thurgood 2014-01-08 10:48:40 UTC
And you need to have a recent master build as Andrezj only committed the fix to properly support image BLOB storage recently (last week).

Alex
Comment 10 Julien Nabet 2014-01-08 12:08:49 UTC
Alex: thank you for your feedback.
My build was recent and I had created a form but indeed, I had used the default form layout.
I'll give a try tonight or tomorrow. It'll be a brand new build since, with the arrival of Boost 1.55, I launched this morning a "make clean && make postprocess.clean && ./g pull -r && make" :-)
Comment 11 Robert Großkopf 2014-01-09 18:30:50 UTC
I can't confirm this behavior. Have tested it with LO 4.3.0.0, 2014-01-09 and LO 4.2.0rc2
Both would show the tableview in the form, but both would show the view without any content - and that is different to the embedded HSQLDB. But it's not this bug.
Comment 12 Julien Nabet 2014-01-09 20:27:17 UTC
Created attachment 91775 [details]
screenshot of result

On pc Debian x86-64 with master sources updated today, I don't reproduce the crash.
I attached a screenshot of what I got.
Comment 13 Robert Großkopf 2014-01-09 21:20:48 UTC
Created attachment 91781 [details]
Shows the empty table-datasource in LO 4.3.*/LO4.2.*

@Julien,

seems you haven't started datasource as table in the form. So I added a screenshot I got here - without content in the table ...
Comment 14 Alex Thurgood 2014-01-10 08:16:21 UTC
Console output when I open my form :

warn:legacy.osl:23555:1:xmloff/source/forms/elementimport.cxx:438: OElementImport::implImportGenericProperties: unsupported value type!
warn:legacy.osl:23555:1:xmloff/source/forms/elementimport.cxx:455: OElementImport::EndElement: could not set the property "ObjIDinMSO"!
warn:legacy.osl:23555:1:xmloff/source/forms/elementimport.cxx:456: caught an exception!
in function:void xmloff::OElementImport::implApplyGenericProperties()
type: com.sun.star.lang.IllegalArgumentException

warn:legacy.osl:23555:1:xmloff/source/forms/elementimport.cxx:438: OElementImport::implImportGenericProperties: unsupported value type!
warn:legacy.osl:23555:1:xmloff/source/forms/elementimport.cxx:455: OElementImport::EndElement: could not set the property "ObjIDinMSO"!
warn:legacy.osl:23555:1:xmloff/source/forms/elementimport.cxx:456: caught an exception!
in function:void xmloff::OElementImport::implApplyGenericProperties()
type: com.sun.star.lang.IllegalArgumentException

warn:legacy.osl:23555:1:xmloff/source/forms/elementimport.cxx:438: OElementImport::implImportGenericProperties: unsupported value type!
warn:legacy.osl:23555:1:xmloff/source/forms/elementimport.cxx:455: OElementImport::EndElement: could not set the property "ObjIDinMSO"!
warn:legacy.osl:23555:1:xmloff/source/forms/elementimport.cxx:456: caught an exception!
in function:void xmloff::OElementImport::implApplyGenericProperties()
type: com.sun.star.lang.IllegalArgumentException

warn:sw:23555:1:sw/inc/swrect.hxx:294: SVRect() without Width or Height
warn:sw:23555:1:sw/inc/swrect.hxx:294: SVRect() without Width or Height
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:sfx.control:23555:1:sfx2/source/control/dispatch.cxx:1530: Childwindow slot missing: 10365
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:legacy.osl:23555:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
warn:sw:23555:1:sw/inc/swrect.hxx:294: SVRect() without Width or Height
warn:sw:23555:1:sw/inc/swrect.hxx:294: SVRect() without Width or Height
warn:sw:23555:1:sw/inc/swrect.hxx:294: SVRect() without Width or Height
warn:sw:23555:1:sw/inc/swrect.hxx:294: SVRect() without Width or Height
warn:sfx.control:23555:1:sfx2/source/control/dispatch.cxx:1530: Childwindow slot missing: 10365
warn:sfx.control:23555:1:sfx2/source/control/dispatch.cxx:1530: Childwindow slot missing: 10365
warn:connectivity.firebird:23555:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1473: Not yet implemented
warn:legacy.osl:23555:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1477: Not implemented yet!
warn:sfx.control:23555:1:sfx2/source/control/dispatch.cxx:1530: Childwindow slot missing: 10365
Comment 15 Alex Thurgood 2014-01-10 08:19:01 UTC
Click on the button "Datasource as Table", console output :

warn:connectivity.firebird:23555:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1473: Not yet implemented
warn:legacy.osl:23555:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1477: Not implemented yet!
warn:sfx.control:23555:1:sfx2/source/control/dispatch.cxx:1530: Childwindow slot missing: 10365
terminate called after throwing an instance of 'com::sun::star::sdbc::SQLException'


Then LibreOffice crashes and attempts to recover the file.
Comment 16 Alex Thurgood 2014-01-10 08:21:57 UTC
Created attachment 91808 [details]
embedded firebird test file
Comment 17 Alex Thurgood 2014-01-10 14:24:52 UTC
I can also reproduce this on my build from master from today on OSX. All of my builds are debug enabled, I hope that it isn't the debug nature of my builds which are the cause.

Alex
Comment 18 Alex Thurgood 2014-01-10 14:26:48 UTC
Created attachment 91817 [details]
osx trace
Comment 19 Robert Großkopf 2014-01-10 16:06:54 UTC
(In reply to comment #16)
> Created attachment 91808 [details]
> embedded firebird test file

Hello Alex,

couldn't reproduce it with that file. Have tried it with the versions of comment11 - openSUSE 12.3/64bir Linux rpm.
Could you test it with a "normal" parallel installed version?
Comment 20 pierre-yves samyn 2014-01-11 11:12:11 UTC
Hello

No crash on windows 7/64 with:
Version: 4.3.0.0.alpha0+
Build ID: ae8e579515fff84cbef1ccc2da78fa769fb079ec
TinderBox: Win-x86@39, Branch:master, Time: 2014-01-10_11:16:31

Version: 4.2.0.1
Build ID: 7bf567613a536ded11709b952950c9e8f7181a4a 

As Robert (comment 11) both show the view without any content which is another bug...

Regards
Pierre-Yves
Comment 21 Julien Nabet 2014-01-22 21:24:29 UTC
Created attachment 92622 [details]
bt with symbols

On pc Debian x86-64 with master sources updated today, I can reproduce this.
I opened the file provided by Alex, then opened the form and clicked on button "Data Source as Table" at the right bottom of the form.
Comment 22 Julien Nabet 2014-01-22 21:25:24 UTC
So put it at NEW.
BTW, I use dbgutil in my autogen.input
Comment 23 Julien Nabet 2014-05-30 23:58:07 UTC
Created attachment 100182 [details]
bt with symbols

On pc Debian x86-64 with master sources updated today, I still reproduce the problem.
I had to run a gdb session with some step by step to have this bt.
Comment 24 Julien Nabet 2014-05-31 00:00:42 UTC
With this patch, no crash:
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx
index 22d6013..d43fd3d 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -758,8 +758,8 @@ void SAL_CALL OResultSet::cancel(  ) throw(RuntimeException, std::exception)
 //----- XWarningsSupplier UNSUPPORTED -----------------------------------------
 void SAL_CALL OResultSet::clearWarnings() throw(SQLException, RuntimeException, std::exception)
 {
-    ::dbtools::throwFunctionNotSupportedException("clearWarnings not supported in firebird",
-                                                  *this);
+//    ::dbtools::throwFunctionNotSupportedException("clearWarnings not supported in firebird",
+//                                                  *this);
 }

Is it really mandatory to throw an exception here? Indeed there are other drivers which don't implement this (just Opengrok to check). Now is it a TODO or not I don't know.

Lionel/Andrzej: any idea?
Comment 25 Commit Notification 2014-05-31 03:57:23 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

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

fdo#73352 don't crash if clearWarnings throws an SQLException



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.
Comment 26 Commit Notification 2014-05-31 03:58:55 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

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

fdo#73352 firebird don't claim to support interfaces one doesn't



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.
Comment 27 Commit Notification 2014-05-31 11:45:38 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4e4f2cb5cd17d3e3b070f81c91f660c9600e015e&h=libreoffice-4-2

fdo#73352 firebird don't claim to support interfaces one doesn't


It will be available in LibreOffice 4.2.6.

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.
Comment 28 Commit Notification 2014-05-31 11:45:56 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c5ae8064145b2788b34812093f78ac58556e9b9e&h=libreoffice-4-3

fdo#73352 firebird don't claim to support interfaces one doesn't


It will be available in LibreOffice 4.3.

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.
Comment 29 Commit Notification 2014-06-03 09:06:40 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e8567278f06e957fcdc0e5afb9aa9d423ef1f55a&h=libreoffice-4-3

fdo#73352 don't crash if clearWarnings throws an SQLException


It will be available in LibreOffice 4.3.

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.
Comment 30 Commit Notification 2014-06-03 09:15:53 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=11f54c327592080e3d918283bd7804ef6d704613&h=libreoffice-4-2

fdo#73352 don't crash if clearWarnings throws an SQLException


It will be available in LibreOffice 4.2.6.

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.
Comment 31 pierre-yves samyn 2014-06-08 05:02:01 UTC
Hi

Verifed WORKSFORME on windows 7/64 & Version: 4.3.0.0.beta2
Build ID: a06aa316117a6ff0f05c697c82831c227812d810


Thank you
Regards
Pierre-Yves