Bug 92446 - Crash in Windows and Runtime exception on Linux with Basic Clipboard function
Summary: Crash in Windows and Runtime exception on Linux with Basic Clipboard function
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: Other All
: medium normal
Assignee: Stephan Bergmann
URL:
Whiteboard: target:5.1.0 target:5.0.2 target:5.0....
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-06-30 08:39 UTC by Cor Nouws
Modified: 2016-10-25 19:20 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
test document for error / crash (12.70 KB, application/3dr)
2015-06-30 08:40 UTC, Cor Nouws
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2015-06-30 08:39:39 UTC
I'll attach a test document with macro and explanation.

Runs fine in for example 4.2.x
Does not run in 4.4.x

Crash on Windows:

Error on Linux:
Basic runtime error / An exception occured
Type: com.sun.star.uno.RunTimeException
Message: type coercion failed: conversion not possible

at line 26:  oClipContents = oClip.setContents(oTRX, null).
on exiting function Function TR_getTransferDataFlavors() As Any (line 46)
Comment 1 Cor Nouws 2015-06-30 08:40:57 UTC
Created attachment 116946 [details]
test document for error / crash
Comment 2 Marc Kaulisch 2015-06-30 09:46:01 UTC
I can confirm that the bug is present in LO 5.0.0.2 64bit and 4.4.5.0 on Win8.1.
Comment 3 Julien Nabet 2015-06-30 20:33:21 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
I noticed this on console:
warn:stoc:22698:1:stoc/source/inspect/introspection.cxx:1643: object of type "com.sun.star.datatransfer.XTransferable" lacks XTypeProvider
Comment 4 Matthew Francis 2015-08-14 03:52:17 UTC
This seems to have begun at the below commit.
Adding Cc: to sbergman@redhat.com; Could you possibly take a look at this one? Thanks

    commit 6b4c596b01039324cfe78f38c4e3ffb9080bcd34
    Author:     Stephan Bergmann <sbergman@redhat.com>
    AuthorDate: Mon Jun 2 11:12:11 2014 +0200
    Commit:     Stephan Bergmann <sbergman@redhat.com>
    CommitDate: Mon Jun 2 11:12:11 2014 +0200
    
        Fix memory leak for BASIC sub (as well as void function)
    
        d88593af59d9126cdbcd6c0a5b06fb9c673dc6f9 "INTEGRATION: CWS ab34: #i73457#
        Prevent sub from beeing set as param 0 for return type void" to fix i#73457
        "Memory Leak in all Basic type void Method calls" had made the PutDirect call
        dependent on != SbxVOID only (which would cover void functions) but not also on
        != SbxEMPTY (which would apparently be required to also cover subs, as seen with
        CppunitTest_basic_vba run under lsan).  Either this was an oversight with the
        original fix, or subs have meanwhile changed from GetType() == SbxVOID to
        SbxEMPTY?
    
        Change-Id: I3e5dbf79bfd5eea3cfec8ed3fa984d13167aa501
Comment 5 Commit Notification 2015-08-14 11:20:16 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

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

tdf#92446: Revert apparently bogus attempt at fixing a memory leak

It will be available in 5.1.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 6 Commit Notification 2015-08-14 11:29:14 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c79c5d8066538001959f18cab81f74bd6dacf4c8&h=libreoffice-5-0

tdf#92446: Revert apparently bogus attempt at fixing a memory leak

It will be available in 5.0.2.

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 7 Stephan Bergmann 2015-08-14 11:55:11 UTC
"So revert it and leave a fix for the memory leak to somebody who actually understands all this code."

Filed bug 93423 for that.
Comment 8 Commit Notification 2015-08-17 12:30:47 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-5-0-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=40bbc0958478627081704c7c86cfa048553fe451&h=libreoffice-5-0-1

tdf#92446: Revert apparently bogus attempt at fixing a memory leak

It will be available in 5.0.1.

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 9 Commit Notification 2015-08-17 12:32:22 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=60c6bf6e60f788ebfb7305fda97e856b67fd2e29&h=libreoffice-4-4

tdf#92446: Revert apparently bogus attempt at fixing a memory leak

It will be available in 4.4.6.

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 Robinson Tryon (qubit) 2015-12-17 09:15:28 UTC Comment hidden (obsolete)