Bug 64456 - Writer crash when open Bibliography Database
Summary: Writer crash when open Bibliography Database
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.3.3 release
Hardware: Other Windows (All)
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: BSA target:4.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-11 09:26 UTC by hot123tea123
Modified: 2016-08-31 08:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
console + bt with symbols on master sources (12.34 KB, text/plain)
2013-05-11 10:20 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hot123tea123 2013-05-11 09:26:13 UTC
Problem description: 
Writer crash when I open the Bibliography Database, and tell me to restore the current document.

Steps to reproduce:
1. Choose Tools - Bibliography Database

Current behavior:
Writer crash
Expected behavior:
edit Bibliography Database
              
Operating System: Windows XP
Version: 4.0.3.3 rc
Comment 1 Julien Nabet 2013-05-11 10:20:18 UTC
Created attachment 79138 [details]
console + bt with symbols on master sources

On pc Debian x86-64 with master sources updated today, I reproduced the crash.
I attached bt + console logs
Comment 2 Julien Nabet 2013-05-11 10:21:50 UTC
Put it at New
Comment 3 Julien Nabet 2013-05-11 10:31:46 UTC
Lionel: one for you?
Comment 4 Julien Nabet 2013-05-11 11:09:37 UTC
This patch allows me to open Bibliography but perhaps it's completely wrong because it only masks the bug:

diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index f26a574..33a1f09 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -1128,7 +1128,7 @@ namespace frm
                 aSelectionIndicies[0] = m_nNULLPos;
             }
         }
-        else
+        else if (!m_aConvertedBoundValues.empty())
         {
             ValueList aValues( impl_getValues() );
             assert( m_nConvertedBoundValuesType == getValueType());
Comment 5 Julien Nabet 2013-05-11 11:27:03 UTC
Just some investigations I made before the patch:
I runned gdb and noticed that "m_nConvertedBoundValuesType" has random value (should it be initialized to fix value, 0 or something else?). Then I gave a look to "impl_getValues" method. (line 1036 of forms/source/component/ListBox.cxx)

"m_aConvertedBoundValues" and "m_aBoundValues" are empty so we go to line 1049:
Sequence< OUString > aStringItems( getStringItemList() );
but getStringItemList is empty too
Anyway in this part, "m_nConvertedBoundValuesType" doesn't seem to be changed too. So when come back to OListBoxModel::translateDbValueToControlValue, the assert can't succeed.
Comment 6 Jean-Baptiste Faure 2013-05-11 14:24:33 UTC
I do not reproduce the crash under Xubuntu 12.04 x86-64 neither with LibreOffice 4.0.3.3, nor LO 4.0.4.0+. Bibliography database opens as expected.

Best regards. JBF
Comment 7 Lionel Elie Mamane 2013-05-12 02:32:57 UTC
(In reply to comment #6)
> I do not reproduce the crash under Xubuntu 12.04 x86-64 neither with
> LibreOffice 4.0.3.3, nor LO 4.0.4.0+.

Happens only in debug builds.
Comment 8 Commit Notification 2013-05-12 03:17:25 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=3e5b9865fa6e1f7de77ebe1464b4eb964ff61006

fdo#64456 impl_getValues always set m_nConvertedBoundValuesType



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.