Bug 95952 - LibreOffice crashes when accessing empty clipboard through a simple macro
Summary: LibreOffice crashes when accessing empty clipboard through a simple macro
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.0.3.2 release
Hardware: All Windows (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-11-20 14:54 UTC by Roland Baudin
Modified: 2016-02-11 09:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
test case (14.77 KB, application/vnd.oasis.opendocument.text)
2015-12-06 20:35 UTC, raal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Baudin 2015-11-20 14:54:03 UTC
LibreOffice 5.0.2.3 crashes on Windows when executing this simple macro (which purpose is to get and manipulate the clipboard content):

Sub Main
	Dim oClip as Variant, oClipContents as Variant, oTypes as Variant
	oClip = createUnoService( "com.sun.star.datatransfer.clipboard.SystemClipboard" )
	oClipContents = oClip.getContents()
	oTypes = oClipContents.getTransferDataFlavors()
End Sub

*and* when the clipboard is empty.

To reproduce:
1. reboot Windows to be sure the clipboard is empty and to be in a safe state
2. lauch Writer and execute the macro
3. you should expect a crash, immediately or after a few seconds, or when pressing a key

If the clipboard is not empty at step 2, then there is no crash.
On Linux (Ubuntu 15.10), there is no crash even when the clipboard is empty.
Comment 1 raal 2015-12-06 20:35:01 UTC
I can confirm with Version: 5.2.0.0.alpha0+ (x64)
Build ID: e7c78e67292ad93c6a4a0772d8b06a0e6e7d26c8
Threads 1; Ver: Windows 6.1; Render: default; 
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-11-30_22:37:14

No crash with LO  4.2.8.2 - regression
Comment 2 raal 2015-12-06 20:35:32 UTC
Created attachment 121082 [details]
test case
Comment 3 Regina Henschel 2015-12-06 21:10:16 UTC
It does not crash for me. I use Version: 5.2.0.0.alpha0+
Build ID: 81fa5340191baf8687f9c82f1f414f5afc86b529
Threads 4; Ver: Windows 6.1; Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-12-03_21:19:19
Locale: de-DE (de_DE)
Comment 4 raal 2016-02-07 21:13:22 UTC
No crash with Version: 5.2.0.0.alpha0+
Build ID: 91a7580e03d5b47c6e2513afce85ddee45e730b6
CPU Threads: 1; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-02-03_23:51:42

Roland, please test with dev version. http://dev-builds.libreoffice.org/daily/master/
Thank you
Comment 5 Roland Baudin 2016-02-11 09:02:38 UTC
OK, I tested with the dev version (build id below) and I expected no crash. I did several tests, with clipboard empty or not empty, and definitely no crash.
So I guess the bug is fixed...
Thanks!

Version: 5.2.0.0.alpha0+
Build ID: 91a7580e03d5b47c6e2513afce85ddee45e730b6
CPU Threads: 2; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-02-03_23:51:42
Locale: fr-FR (fr_FR)
Comment 6 raal 2016-02-11 09:41:28 UTC
Thanks for testing, closing bug.