This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 35904 - EditAction may not be invoked from the thread Module-Actions
Summary: EditAction may not be invoked from the thread Module-Actions
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@xml
URL:
Keywords: THREAD
Depends on:
Blocks:
 
Reported: 2003-09-03 16:27 UTC by Martin Schovanek
Modified: 2003-12-11 14:27 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
AssertionError (1.17 KB, text/plain)
2003-09-03 16:29 UTC, Martin Schovanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schovanek 2003-09-03 16:27:33 UTC
[Nb build 200308030100, jdk1.4.2]

XML actions: GenerateDTDSupport,
GenerateDOMScannerSupport, etc throws:

java.lang.AssertionError: Action
org.openide.actions.OpenAction may not be invoked
from the thread Module-Actions
Comment 1 Martin Schovanek 2003-09-03 16:29:07 UTC
Created attachment 11508 [details]
AssertionError
Comment 2 Peter Zavadsky 2003-09-03 16:32:43 UTC
If the stack comes from xml put it there directly next time.

The error message means, the action can be invoked from AWT thread only.
Comment 3 _ pkuzel 2003-09-03 17:11:10 UTC
I talked to Peter and he agrees that it's both:
  - incompatible change in actions framework
  - and printed assertion message is wrong

Still XML module code will need to be adapted and use invokeAndWait()
depending on result retrieved from asynchronous() CallableSystemAction
method.
Comment 4 Jesse Glick 2003-09-03 18:31:49 UTC
Re. incompatible change in actions framework (that actionPerformed can
be called only in EQ) - yes, already noted in apichanges.

Re. assertion message - what is wrong? It says
OpenAction.actionPerformed may not be called from outside EQ, which is
correct.

GuiUtil.performDefaultAction should be changed to use invokeLater and
not use ActionManager. (invokeAndWait is useless and probably unwise
here.) It need not know anything about the Action in question; it must
always call actionPerformed from EQ.

Or the invokeLater can be skipped in case this method (GU.pDA) is
itself only called from EQ, e.g. if XMLGenerateAction and its like are
run directly in EQ - up to you to decide, but you must override
XMLGA.asynchronous() -> false in either case.
Comment 5 Peter Zavadsky 2003-09-04 07:48:33 UTC
:-) I didn't say the message is wrong.. just confusing.. it should
explicitly say that the action has to be called from EQ only, what
doesn't do (it just says it may not be called from the thread XXX)
otherwise people keep asking what does it mean.
Comment 6 Jesse Glick 2003-09-04 15:36:09 UTC
OK, understood, sorry - I will improve the assertion message.
Comment 8 Jesse Glick 2003-09-25 15:35:47 UTC
Ah, yes, I had forgotten this was already filed - I just encountered
it myself randomly. So the patch should have fixed the problem
reported in the stack trace.
Comment 9 Martin Schovanek 2003-10-10 07:44:51 UTC
VERIFIED