Issue 126709 - OO writer hangs when client application is notified of document modification (Cannot get selection while being notified of modification)
Summary: OO writer hangs when client application is notified of document modification ...
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 4.1.2
Hardware: PC All
: P2 Normal
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2015-11-29 07:17 UTC by openofficebugs
Modified: 2017-05-20 11:53 UTC (History)
0 users

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

Test program (5.47 KB, text/plain)
2015-11-29 07:17 UTC, openofficebugs
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description openofficebugs 2015-11-29 07:17:08 UTC
Created attachment 85179 [details]
Test program

When a Writer document gets modified, I want to find the currently selected text to help me understand what modification has been made.  This usually occurs within a very complicated C++ extension and goes wrong, so I've isolated the code and attached it.  When translated to Java or into a macro, the equivalent code does not show the same problem.  This C++ code hangs OpenOffice 4.0.1 and 4.1.2.  Shortly after the return from modified(), control is never transferred back to run() if getSelection() has been called in the meantime.  Many other different calls are possible, including getting the text, but getting the selection with getSelection() reliably hangs the test program.
Comment 1 openofficebugs 2016-01-18 18:19:48 UTC
Does not work on Windows 7 or Windows 10, OpenOffice 4.0.1 or 4.1.1 or 4.1.2.  It is blocking my development project.
Comment 2 openofficebugs 2016-01-21 04:11:25 UTC
This is also a problem under Linux.  I happened to be testing OpenOffice 4.0.1 on Fedora, but I believe the problem to be generic.  Even LibreOffice has the problem on Windows.  On Linux I do get a message to the console of

terminate called after throwing an instance of 'com::sun::star::lang::WrappedTargetRuntimeException'

when OpenOffice [threads] seem to hang, that is, control is not returned to my test application.