Bug 97501 - Crash while closing the document after registering a new database
Summary: Crash while closing the document after registering a new database
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:5.1.5
Keywords:
: 100392 100395 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-02-02 10:54 UTC by Oliver Specht (CIB)
Modified: 2016-10-25 19:02 UTC (History)
5 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 Oliver Specht (CIB) 2016-02-02 10:54:55 UTC
- Create a new writer document
- Open Edit/Exchange database
- Push the 'Browse' button and select e.g. an .ods file and press OK
- Press the '+' of that new data source and select a sheet
- Close the dialog with the 'Define' button
- Close the dialog -> crash 

The reason is the iteration 
    for (auto & pParam : m_DataSourceParams)
    ..
Because the container m_DataSourceParams is modified from within the following block:

SwConnectionDisposedListener_Impl::disposing() at dbmgr.cxx:3,255 0x7f33162eb005	
cppu::OInterfaceContainerHelper::disposeAndClear() at interfacecontainer.cxx:304 0x7f334720c590	
cppu::OMultiTypeInterfaceContainerHelper::disposeAndClear() at interfacecontainer.cxx:477 0x7f334720d2f7	
cppu::WeakComponentImplHelperBase::dispose() at implbase.cxx:108 0x7f3347207cd9	
cppu::PartialWeakComponentImplHelper<com::sun::star::sdbc::XConnection>::dispose() at compbase.hxx:94 0x7f33114ecd7a	
SwDBManager::~SwDBManager() at dbmgr.cxx:782 0x7f33162db137
Comment 1 Commit Notification 2016-02-03 07:06:19 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

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

tdf#97501: crash in SwDBManager fixed

It will be available in 5.2.0.

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 2 Caolán McNamara 2016-06-15 12:30:28 UTC
*** Bug 100392 has been marked as a duplicate of this bug. ***
Comment 3 Caolán McNamara 2016-06-16 09:01:14 UTC
*** Bug 100395 has been marked as a duplicate of this bug. ***
Comment 4 Commit Notification 2016-06-16 09:02:41 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=00a988896755dd9066d62892d38da0efe769493c&h=libreoffice-5-1

tdf#97501: crash in SwDBManager fixed

It will be available in 5.1.5.

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.