Bug 127354 - Erroneous path to image inserted by Basic macro causes crash on entering bounding box for image
Summary: Erroneous path to image inserted by Basic macro causes crash on entering boun...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks: Macro
  Show dependency treegraph
 
Reported: 2019-09-05 07:35 UTC by Alex Thurgood
Modified: 2023-04-18 14:47 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Backtrace from lldb session (18.42 KB, text/plain)
2019-09-06 07:51 UTC, Alex Thurgood
Details
20230418 Backtrace from lldb (375.87 KB, text/plain)
2023-04-18 14:47 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Thurgood 2019-09-05 07:35:55 UTC
Description:
1) Create a new Writer document
2) Tools > Macro > Edit
3) Copy / paste the macro from bug 127310 into the IDE - do not change the file path pointing to the image to be inserted.
4) Run the macro from the Basic IDE.
5) An error message is produced in the IDE, ignore it (OK)
6) Switch to Writer document and notice that the bounding box / frame below the blue rectangle is empty.
7) Double-click on the box ==>> crash

Reproduced under macOS with master 6.4alpha and on Linux with

Version: 6.3.0.4
Build ID: libreoffice-6.3.0.4-snap1
Threads CPU : 4; OS : Linux 4.4; UI Render : par défaut; VCL: gtk3; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded



Steps to Reproduce:
See description

Actual Results:
Crashes and launches file recovery.

Expected Results:
Shouldn't crash. Either present an error message to indicate what is wrong, or else allow the user to choose an image to fill in the background of the frame/bounding box.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Comment 1 Xisco Faulí 2019-09-05 08:41:16 UTC
Not reproducible in

Version: 6.4.0.0.alpha0+
Build ID: e8b3df5b9b0eb0a93c25b6dc2e445ae44a7e3f78
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 2 Xisco Faulí 2019-09-05 08:45:36 UTC
ok, I can reproduce it, I have to double click on the border...

Version: 6.4.0.0.alpha0+
Build ID: e8b3df5b9b0eb0a93c25b6dc2e445ae44a7e3f78
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 3 Xisco Faulí 2019-09-05 09:04:09 UTC
Not reproducible in

Versión: 6.3.1.2 (x86)
Id. de compilación: b79626edf0065ac373bd1df5c28bd630b4424273
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; VCL: win; 
Configuración regional: es-ES (es_ES); Idioma de IU: es-ES
Calc: threaded

so it seems to be linux only... maybe mac also?
Comment 4 Xisco Faulí 2019-09-05 09:06:45 UTC
Also reproduced in

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.15; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)
Comment 5 Xisco Faulí 2019-09-05 09:08:59 UTC
and

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

and

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

I don't think it's a high severity bug.
Comment 6 Julien Nabet 2019-09-05 15:40:03 UTC
On Win10 with master sources updated today, I don't reproduce the crash.

I'll give a try on Linux
Comment 7 Julien Nabet 2019-09-05 17:09:56 UTC
On pc Debian x86-64 with master sources updated today + gtk3, I don't have the transparent frame below the empty blue rectangle.
So can't reproduce it too on Linux.
Comment 8 Alex Thurgood 2019-09-06 07:48:00 UTC
The problem seems to be related to anchoring of the object :


Process 10694 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000001842dfa4b libswlo.dylib`SwFEShell::ShouldObjectBeSelected(this=0x00000001803f9f40, rPt=0x00007ffeefbfe8b8) at feshview.cxx:1361:83
   1358	            {
   1359	                if ( pObj->GetLayer() == rIDDMA.GetHellId() )
   1360	                {
-> 1361	                    const SwAnchoredObject* pAnchoredObj = ::GetUserCall( pObj )->GetAnchoredObj( pObj );
   1362	                    const SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat();
   1363	                    const SwFormatSurround& rSurround = rFormat.GetSurround();
   1364	                    if ( rSurround.GetSurround() == css::text::WrapTextMode_THROUGH )
Target 0: (soffice) stopped.
Comment 9 Alex Thurgood 2019-09-06 07:51:55 UTC
Created attachment 153976 [details]
Backtrace from lldb session
Comment 10 Julien Nabet 2019-09-06 08:13:26 UTC
Just to be sure, at the step5, do you click OK button to close the error message popup or just let it open?
Comment 11 Alex Thurgood 2019-09-06 08:35:52 UTC
(In reply to Julien Nabet from comment #10)
> Just to be sure, at the step5, do you click OK button to close the error
> message popup or just let it open?

Click on OK to make it go away, then double-click on the border around the broken image link that should have been drawn in the Writer document
Comment 12 Julien Nabet 2019-09-11 19:43:46 UTC
On pc Debian x86-64 with master sources updated today with gtk3, kf5 or gen rendering, I only have blue rectangle and no empty frame below, so can't reproduce this.
I'll give a new try on Win10 tomorrow.
Comment 13 QA Administrators 2022-09-23 04:30:57 UTC Comment hidden (obsolete)
Comment 14 Alex Thurgood 2023-04-18 14:39:26 UTC
Still reproducible in 

Version: 7.5.1.2 (AARCH64) / LibreOffice Community
Build ID: fcbaee479e84c6cd81291587d2ee68cba099e129
CPU threads: 8; OS: Mac OS X 13.3; UI render: Skia/Raster; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Comment 15 Alex Thurgood 2023-04-18 14:47:46 UTC
Created attachment 186760 [details]
20230418 Backtrace from lldb