Bug 118963 - Crash when dragging column from datasource to spreadsheet
Summary: Crash when dragging column from datasource to spreadsheet
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Armin Le Grand (allotropia)
URL:
Whiteboard: target:6.2.0 target:6.1.3
Keywords: bibisected, bisected, regression
: 119166 (view as bug list)
Depends on:
Blocks: Regressions-AW080
  Show dependency treegraph
 
Reported: 2018-07-26 21:39 UTC by Cor Nouws
Modified: 2018-10-28 03:06 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (12.08 KB, text/plain)
2018-07-27 09:03 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2018-07-26 21:39:59 UTC
- Start spreadsheet
- Open data source (Ctrl+F4)
- Select column & drag to sheet
  > Crash

Does not crash in 5.4.6

Crash in 6.1.0.1:
  crashreport.libreoffice.org/stats/crash_details/b5aa9a8b-19cc-4289-b022-66b65b1d7e5c

crash in 6.2 master
  crashreport.libreoffice.org/stats/crash_details/234a12b3-c8ce-4b55-99a8-8754a681a33b
  Version: 6.2.0.0.alpha0+
Build ID: d6bd9c273483b12f1bb2ae398afdba977e3ec336
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-07-17_12:03:08
Locale: nl-NL (nl_NL.UTF-8); Calc: group threaded
Comment 1 Xisco Faulí 2018-07-27 00:30:49 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=dfefe448c41921f2f1e54d3f69b8b9e89031d055

author	Armin Le Grand <Armin.Le.Grand@cib.de (CIB)>	2018-03-01 15:54:32 +0100
committer	Armin Le Grand <Armin.Le.Grand@cib.de>	2018-04-07 00:28:30 +0200
commit dfefe448c41921f2f1e54d3f69b8b9e89031d055 (patch)
tree 1aace31054b5740e2faffcbc5de66a791be27f7d
parent eba4d5b2b76cefde90cb3d6638c736f435023a45 (diff)
SOSAW080: Added first bunch of basic changes to helpers

Bisected with: bibisect-linux64-6.1 

Adding Cc: to Armin Le Grand
Comment 2 Julien Nabet 2018-07-27 09:03:11 UTC
Created attachment 143799 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated about 1 week ago, I could reproduce this.

Notice that I've upgraded from gcc7 to gcc8 but I haven't rebuilt from scratch yet. It may explain some messages on bt.
However, hope it may help.
Comment 3 Julien Nabet 2018-07-27 09:04:55 UTC
BTW, to open datasource, I had to use Ctrl-Shift-F4, not just Ctrl-F4 which closed the doc.
Comment 4 Armin Le Grand (allotropia) 2018-07-27 09:11:18 UTC
No chrash on Win -> Linux only (?).
DataSource is CTRL+SHIFT+F4.
Checking on linux...
Comment 5 Xisco Faulí 2018-07-27 09:16:44 UTC
(In reply to Armin Le Grand (CIB) from comment #4)
> No chrash on Win -> Linux only (?).
> DataSource is CTRL+SHIFT+F4.
> Checking on linux...

I can't reproduce it on win either, but the field isn't inserted either...
Comment 6 Armin Le Grand (allotropia) 2018-07-27 09:48:25 UTC
Crash on Linux, Stack is:

SdrObject::GetObjectItemPool(const SdrObject * const this) (/home/alg/lo/work01/svx/source/svdraw/svdobj.cxx:545)
sdr::properties::DefaultProperties::GetObjectItemSet(const sdr::properties::DefaultProperties * const this) (/home/alg/lo/work01/svx/source/sdr/properties/defaultproperties.cxx:105)
sdr::properties::AttributeProperties::GetObjectItemSet(const sdr::properties::AttributeProperties * const this) (/home/alg/lo/work01/svx/source/sdr/properties/attributeproperties.cxx:246)
SdrTextObj::GetTextAniKind(const SdrTextObj * const this) (/home/alg/lo/work01/svx/source/svdraw/svdotext.cxx:1789)
sdr::contact::ViewContactOfSdrObj::ViewContactOfSdrObj(sdr::contact::ViewContactOfSdrObj * const this, SdrObject & rObj) (/home/alg/lo/work01/svx/source/sdr/contact/viewcontactofsdrobj.cxx:58)
sdr::contact::ViewContactOfUnoControl::ViewContactOfUnoControl(sdr::contact::ViewContactOfUnoControl * const this,  _rUnoObject) (/home/alg/lo/work01/svx/source/sdr/contact/viewcontactofunocontrol.cxx:51)
o3tl::make_unique<sdr::contact::ViewContactOfUnoControl, SdrUnoObj&>() (/home/alg/lo/work01/include/o3tl/make_unique.hxx:29)
SdrUnoObj::CreateObjectSpecificViewContact(SdrUnoObj * const this) (/home/alg/lo/work01/svx/source/svdraw/svdouno.cxx:531)
SdrObject::GetViewContact(const SdrObject * const this) (/home/alg/lo/work01/svx/source/svdraw/svdobj.cxx:270)
SdrObject::ActionChanged(const SdrObject * const this) (/home/alg/lo/work01/svx/source/svdraw/svdobj.cxx:280)
SdrObject::SetChanged(SdrObject * const this) (/home/alg/lo/work01/svx/source/svdraw/svdobj.cxx:933)
SdrUnoObj::CreateUnoControlModel(SdrUnoObj * const this, const rtl::OUString & rModelName) (/home/alg/lo/work01/svx/source/svdraw/svdouno.cxx:419)
SdrUnoObj::SdrUnoObj(SdrUnoObj * const this, const void ** const __vtt_parm,  rSdrModel, const rtl::OUString & rModelName) (/home/alg/lo/work01/svx/source/svdraw/svdouno.cxx:160)
FmFormObj::FmFormObj(FmFormObj * const this,  rSdrModel,  rModelName) (/home/alg/lo/work01/svx/source/form/fmobj.cxx:62)
FmFormObjFactory::MakeObject(SdrObjCreatorParams aParams) (/home/alg/lo/work01/svx/source/form/fmobjfac.cxx:215)
Link<SdrObjCreatorParams, SdrObject*>::Call() (/home/alg/lo/work01/include/tools/link.hxx:84)
SdrObjFactory::CreateObjectFromFactory(SdrModel & rSdrModel, SdrInventor nInventor, sal_uInt16 nObjIdentifier) (/home/alg/lo/work01/svx/source/svdraw/svdobj.cxx:3003)
SdrObjFactory::MakeNewObject(SdrModel & rSdrModel, SdrInventor nInventor, sal_uInt16 nIdentifier, const tools::Rectangle * pSnapRect) (/home/alg/lo/work01/svx/source/svdraw/svdobj.cxx:3135)
FmXFormView::createControlLabelPair(const OutputDevice & _rOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM, const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> & _rxField, const com::sun::star::uno::Reference<com::sun::star::util::XNumberFormats> & _rxNumberFormats, sal_uInt16 _nControlObjectID, const rtl::OUString & _rFieldPostfix, SdrInventor _nInventor, sal_uInt16 _nLabelObjectID, SdrModel * _pModel, SdrUnoObj *& _rpLabel, SdrUnoObj *& _rpControl) (/home/alg/lo/work01/svx/source/form/fmvwimp.cxx:1585)
FmXFormView::createControlLabelPair(FmXFormView * const this, const OutputDevice & _rOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM, const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> & _rxField, const com::sun::star::uno::Reference<com::sun::star::util::XNumberFormats> & _rxNumberFormats, sal_uInt16 _nControlObjectID, const rtl::OUString & _rFieldPostfix, SdrUnoObj *& _rpLabel, SdrUnoObj *& _rpControl, const com::sun::star::uno::Reference<com::sun::star::sdbc::XDataSource> & _rxDataSource, const rtl::OUString & _rDataSourceName, const rtl::OUString & _rCommand, const sal_Int32 _nCommandType) (/home/alg/lo/work01/svx/source/form/fmvwimp.cxx:1518)
FmXFormView::implCreateFieldControl(FmXFormView * const this,  _rColumnDescriptor) (/home/alg/lo/work01/svx/source/form/fmvwimp.cxx:1337)
ScViewFunc::PasteDataFormat(ScViewFunc * const this, SotClipboardFormatId nFormatId, const com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> & rxTransferable, SCCOL nPosX, SCROW nPosY, const Point * pLogicPos, bool bLink, bool bAllowDialogs) (/home/alg/lo/work01/sc/source/ui/view/viewfun5.cxx:445)
ScGridWindow::ExecuteDrop(ScGridWindow * const this, const ExecuteDropEvent & rEvt) (/home/alg/lo/work01/sc/source/ui/view/gridwin.cxx:4371)
DropTargetHelper::DropTargetListener::drop(DropTargetHelper::DropTargetListener * const this, const com::sun::star::datatransfer::dnd::DropTargetDropEvent & rDTDE) (/home/alg/lo/work01/svtools/source/misc/transfer2.cxx:152)
DNDListenerContainer::fireDropEvent(DNDListenerContainer * const this, const com::sun::star::uno::Reference<com::sun::star::datatransfer::dnd::XDropTargetDropContext> & context, sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, const com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> & transferable) (/home/alg/lo/work01/vcl/source/window/dndlistenercontainer.cxx:117)
DNDEventDispatcher::fireDropEvent(vcl::Window * pWindow, const com::sun::star::uno::Reference<com::sun::star::datatransfer::dnd::XDropTargetDropContext> & xContext, const sal_Int8 nDropAction, const Point & rLocation, const sal_Int8 nSourceActions, const com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> & xTransferable) (/home/alg/lo/work01/vcl/source/window/dndeventdispatcher.cxx:379)
DNDEventDispatcher::drop(DNDEventDispatcher * const this, const com::sun::star::datatransfer::dnd::DropTargetDropEvent & dtde) (/home/alg/lo/work01/vcl/source/window/dndeventdispatcher.cxx:109)
GtkDropTarget::fire_drop(GtkDropTarget * const this, const com::sun::star::datatransfer::dnd::DropTargetDropEvent & dtde) (/home/alg/lo/work01/vcl/unx/gtk3/gtk3gtkinst.cxx:785)
GtkSalFrame::signalDragDrop(GtkWidget * pWidget, GdkDragContext * context, gint x, gint y, guint time, gpointer frame) (/home/alg/lo/work01/vcl/unx/gtk3/gtk3gtkframe.cxx:3591)
[Unknown/Just-In-Time compiled code] (Unknown Source:0)
g_closure_invoke (Unknown Source:0)
[Unknown/Just-In-Time compiled code] (Unknown Source:0)
g_signal_emit_valist (Unknown Source:0)
g_signal_emit_by_name (Unknown Source:0)
[Unknown/Just-In-Time compiled code] (Unknown Source:0)
gtk_main_do_event (Unknown Source:0)
[Unknown/Just-In-Time compiled code] (Unknown Source:0)
g_main_context_dispatch (Unknown Source:0)
[Unknown/Just-In-Time compiled code] (Unknown Source:0)
g_main_context_iteration (Unknown Source:0)
Comment 7 Armin Le Grand (allotropia) 2018-07-27 10:02:11 UTC
FmXFormView::createControlLabelPair gets a SdrObject nullptr. This is pretty strange- there are two versions of FmXFormView::createControlLabelPair, one static and one not, as member.
The static one would probably need to get a SdrModel/UnoControlModel somehow - it accesses it later using

        xLabelModel.set( pLabel->GetUnoControlModel(), UNO_QUERY );

so the question is - how did it get the model before (there is also no SdrPage offered to get it from)...?
Comment 8 Armin Le Grand (allotropia) 2018-07-27 10:21:39 UTC
Already happens in lo-6-1. The version of FmXFormView::createControlLabelPair that uses a SdrModel* shoulod be changed to use a SdrModel&. The call from FmXFormView::createControlLabelPair in fmvwimp.cxx has a SdrView where it gets the SDrModel from anyways (using getView()->getSdrModelFromSdrView()). Checking if this can be done...
Comment 9 Commit Notification 2018-07-28 16:37:09 UTC
Armin Le Grand committed a patch related to this issue.
It has been pushed to "master":

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

tdf#118963 Hand over a SdrModel to createControlLabelPair

It will be available in 6.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 10 Xisco Faulí 2018-07-29 18:23:49 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: 72b099d279e7096d41a04fe8c0dd493a5fc18a33
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

@Armin, thanks for fixing this!!

Can it be cherry-picked to 6-1 and 6-1-0 ?
Comment 11 Xisco Faulí 2018-08-09 09:20:49 UTC
*** Bug 119166 has been marked as a duplicate of this bug. ***
Comment 12 Xisco Faulí 2018-08-09 09:23:13 UTC
Hi Armin,
Any chance this commit get cherry-picked to 6-1 ?
it also fixes bug 119166
Comment 13 Xisco Faulí 2018-10-03 15:29:55 UTC
(In reply to Xisco Faulí from comment #12)
> Hi Armin,
> Any chance this commit get cherry-picked to 6-1 ?
> it also fixes bug 119166

Still reproduced in

Version: 6.1.3.0.0+
Build ID: 316281cf1d888a4bac9f1e40e92c66405480249c
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

Cherry-picked to 6-1: https://gerrit.libreoffice.org/#/c/61316/
Comment 14 Commit Notification 2018-10-16 10:32:55 UTC
Armin Le Grand committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2cf13c31c6aa262e4bb4b075597f3543ecd3c4a6&h=libreoffice-6-1

tdf#118963 Hand over a SdrModel to createControlLabelPair

It will be available in 6.1.4.

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 15 Commit Notification 2018-10-26 19:39:31 UTC
Armin Le Grand committed a patch related to this issue.
It has been pushed to "libreoffice-6-1-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0f9fd7ec1991f8ad2a9834891f1d5aa49ceca7f2&h=libreoffice-6-1-3

tdf#118963 Hand over a SdrModel to createControlLabelPair

It will be available in 6.1.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.