Issue 65420 - OO crashes when 'revieve focus' event switches on the Filter Mode
Summary: OO crashes when 'revieve focus' event switches on the Filter Mode
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 680m167
Hardware: All All
: P2 Trivial (vote)
Target Milestone: OOo 2.1
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-16 06:16 UTC by drewjensen.inbox
Modified: 2006-10-20 12:55 UTC (History)
1 user (show)

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


Attachments
subject database (201.30 KB, application/vnd.sun.xml.base)
2006-05-16 06:16 UTC, drewjensen.inbox
no flags Details
Crash report (2.88 KB, text/plain)
2006-05-16 06:17 UTC, drewjensen.inbox
no flags Details
DB doc with form with macro contained (202.49 KB, application/vnd.sun.xml.base)
2006-06-12 14:28 UTC, Frank Schönheit
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description drewjensen.inbox 2006-05-16 06:16:25 UTC
NOTE - this is found in dev. build 169...

Attached is a database with a form 'eventAttendees2'.

This form contains a text field that has the events recieve and lose focus set
to call two macros. 

The receiving focus event calls the sub setFormFilterOn

sub SetFormFilterOn
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:FormFilter", "", 0, Array())

end sub

With the above macro assigned entering the text field will crash OO.
Comment 1 drewjensen.inbox 2006-05-16 06:16:58 UTC
Created attachment 36498 [details]
subject database
Comment 2 drewjensen.inbox 2006-05-16 06:17:55 UTC
Created attachment 36499 [details]
Crash report
Comment 3 drewjensen.inbox 2006-05-16 16:03:15 UTC
Couple of further tests on this. 

The crash happens under release 2.0.2 also.
It only happens when this particular macro is called - using dispatch to enter
form filter mode.
It only happens if dispatch is used to enter form filter mode, from the 'when
receiving focus' evnet. If I instead call the macro from say, 'on mouse key
release' instead then there is no problem.
Comment 4 Frank Schönheit 2006-06-12 14:25:01 UTC
uhoh, this is ambitious. When switching to filter mode, the controls in the form
are exchanged with special "filter control" versions. So when you do this from
within a focus notification, you're probably destroying the control which just
calls you.

Not sure how this can best be fixed. Of course OOo should not crash. Notifying
the events asynchronously might be an option.
Comment 5 Frank Schönheit 2006-06-12 14:28:12 UTC
Created attachment 37078 [details]
DB doc with form with macro contained
Comment 6 Frank Schönheit 2006-06-12 14:28:51 UTC
The attached file has the respective macro contained in the form (i.e. is
self-contained), so you can reproduce the crash directly.
Comment 7 Frank Schönheit 2006-06-12 14:30:01 UTC
slightly adjusting the summary to reflect that the crux is switching on the
filter mode
Comment 8 marc.neumann 2006-06-30 09:14:44 UTC
reassign to the right developer
Comment 9 Frank Schönheit 2006-06-30 10:33:39 UTC
accepting
Comment 10 Frank Schönheit 2006-07-18 12:43:24 UTC
The immediate crash is fixed in CWS 204b, i.e. for 2.0.4. However, it still
crashs when focusing the control with the mouse. Instead of also fixing symptoms
only here, we need a more comprehensive solution for the cases where a Basic
macro is called synchronously, and does unwanted things via the form UNO API
(issue 67147 is another example for this).

I have an idea, but the fix is risky, and checks need to be made whether
existing macros are affected, so this will be for 2.0.5 only.
Comment 11 Frank Schönheit 2006-07-25 14:50:28 UTC
fixed in CWS dba205a

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Fdba205a
Comment 12 Frank Schönheit 2006-08-02 11:44:00 UTC
fs-> msc: please verify in CWS dba205a
Comment 13 Frank Schönheit 2006-08-11 11:33:15 UTC
targeting to 2.1, since the fix is part of a CWS aiming for this release
Comment 14 marc.neumann 2006-08-21 10:46:29 UTC
verified in CWS dba205a

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Fdba205a
Comment 15 marc.neumann 2006-10-20 12:55:34 UTC
Hi,

this is fixed in the current master. The current master is available at
http://download.openoffice.org/680/index.html

I close this issue now.

Bye Marc