Issue 77991 - testtool: crash on closing after a test run
Summary: testtool: crash on closing after a test run
Status: CLOSED DUPLICATE of issue 78284
Alias: None
Product: utilities
Classification: Unclassified
Component: automation (show other issues)
Version: OOo 1.0.0
Hardware: PC Windows, all
: P3 Trivial (vote)
Target Milestone: OOo 2.3
Assignee: kay.ramme
QA Contact: Unknown
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-31 14:40 UTC by b.osi.ooo
Modified: 2008-08-09 23:41 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description b.osi.ooo 2007-05-31 14:40:09 UTC
after running a test and closing the testtool, it crashes.
seen in testtool from src680m212
Comment 1 b.osi.ooo 2007-05-31 14:42:30 UTC
text of crash on win32, but also on linux

Die Anwendung in 0x5decf333 verweist auf Speicher in0x00eb00f0
Der Vorgang read konnte nicht auf dem Speicher durchgeführt werden... 
Comment 2 gregor.hartmann 2007-06-01 08:39:00 UTC
this happens when destroying the following static object

    static Reference< XComponentContext > xContext;

from basic/source/classes/sbunoobj.cxx:170 in getComponentContext_Impl

The memory of the refered Object is not mapped anymore. (it was there after
initialisation and the pointer did not change since)
Comment 3 gregor.hartmann 2007-06-01 14:05:26 UTC
.
Comment 4 gregor.hartmann 2007-06-01 14:13:55 UTC
Seems to happen only on windows.

To reproduce copy from automation the files testtool.exe and the simplecm and
communi libs in the program dir of an office and from basic the stt*.res file in
the ressource directory of the office.

Start the testtool and enter the following script:

sub  main
  bla
end sub

Run it!
It will fail but that's irrelevant for reproducing.
The Testtool will break on closing
Comment 5 gregor.hartmann 2007-06-01 15:11:31 UTC
kr wants the issue so I won't argue ;-)
Comment 6 kay.ramme 2007-06-06 10:23:11 UTC
The problem is, that Windows de-initializes msci_uno during termination despite
the fact, that BASIC still holds some global objects in static references, later
on Windows tries to de-initialize the BASIC library, while the virtual vtables
(these objects are Uno C++ proxies) are already un-mapped (see VTableFactory in
bridges/source/cpp_uno/shared).

So, actually, what I see is a wrong order of de-initialization, I don't know
yet, if this is a Windows feature or a dependency bug somewhere.

Comment 7 kay.ramme 2007-06-06 15:42:45 UTC
So, others are experiencing the same:

http://blogs.gotdotnet.com/larryosterman/archive/2004/06/10/152794.aspx

It seems, that holding references to Uno objects in global variables while dying
needs to be forbidden, because the Windows OS loader is too smart ... stupid.

Going to fix this, by avoiding the global variable.
Comment 8 kay.ramme 2007-06-06 16:03:43 UTC
.
Comment 9 kay.ramme 2007-06-20 11:19:47 UTC
.
Comment 10 kay.ramme 2007-06-20 11:20:29 UTC
This is duplicate to 78284.

*** This issue has been marked as a duplicate of 78284 ***
Comment 11 b.osi.ooo 2008-08-09 23:41:31 UTC
cleanup - fixed long time ago - closing