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 36400 - IllegalStateException when opening properties file
Summary: IllegalStateException when opening properties file
Status: VERIFIED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Properties (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Marian Petras
URL:
Keywords: TEST, THREAD
: 36783 39170 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-02 12:43 UTC by Jiri Skrivanek
Modified: 2004-02-24 13:06 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Full stack trace (1.01 KB, text/plain)
2003-10-02 12:44 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2003-10-02 12:43:28 UTC
To reproduce create properties file from template
(Other|Properties File). It is automatically
opened and the following is logged into console:

java.lang.IllegalStateException: This must happen
in the event thread!

It seems it is caused by calling

    findAction.setActionPerformer(...)

as was identified in issue 35953.
Comment 1 Jiri Skrivanek 2003-10-02 12:44:37 UTC
Created attachment 11776 [details]
Full stack trace
Comment 2 Marian Petras 2003-10-02 16:01:54 UTC
Yes, indeed. I will make a change so that the method is called
directly (from the current thread), instead of posting it as a task
for a request processor.
Comment 3 Jesse Glick 2003-10-02 18:42:54 UTC
Better to get rid of the call to setActionPerformer and the override
of componentActivated altogether. This style is deprecated as of NB
3.5. Instead, make FindPerformer impl Action (not just
ActionPerformer), and in the constructor for
PropertiesCloneableTopComponent, get your ActionMap and bind
"org.openide.actions.FindAction" to the desired FindPerformer
instance. Simpler and safer.
Comment 4 Marian Petras 2003-10-03 08:38:02 UTC
I have tried it for the Search module. It didn't work. I've also
looked whether any other module uses the recommended solution and
found that all modules using the FindAction use the deprecated
setActionPerformer().

I'am starting a discussion about this issue on mailing list
nbdev@netbeans.org.
Comment 5 Jesse Glick 2003-10-03 16:33:16 UTC
So you tried it and it didn't work - either you didn't do it quite
right, or there is a core bug (P2 probably), please file.

I know modules are not yet using the proper technique - that's why you
have to start!
Comment 6 ehucka 2003-11-26 14:31:24 UTC
*** Issue 36783 has been marked as a duplicate of this issue. ***
Comment 7 Marian Petras 2004-01-23 12:54:54 UTC
*** Issue 39170 has been marked as a duplicate of this issue. ***
Comment 8 ehucka 2004-01-28 15:05:54 UTC
It seems this issue has critical impact on automated test run. It
blocks xtest on windows machines.

It throws these messages:

Warning: use of system property netbeans.debug.exceptions in
org.netbeans.modules.properties.PropertiesTableModel$TablePropertyBundleListener
has been obsoleted in favor of ErrorManager
The following property was fired by Node
org.netbeans.modules.properties.PropertiesLocaleNode@16103c7[Name=,
displayName=Default]: cookie.  This should be fired only to Node
listeners, not general
property change listeners
Comment 9 Jesse Glick 2004-01-28 15:50:22 UTC
Emanuel: the two warnings just added to this issue are indeed (minor)
bugs in the properties module, but have nothing to do with this issue
whatsoever.
Comment 10 ehucka 2004-01-28 16:01:04 UTC
Well. I add them because they are usually the last messages which are
logged before deadlock of automated test.
Comment 11 Jesse Glick 2004-01-28 16:08:46 UTC
Just a coincidence.
Comment 12 Marian Petras 2004-01-29 12:24:20 UTC
The call stack originates from method

    PropertiesOpen.PropertiesCloneableTopComponent.componentActivated()

    (its beginning is currently at line 840)
Comment 13 Marian Petras 2004-02-23 13:15:01 UTC
Fixed in the trunk.
Comment 14 Jiri Skrivanek 2004-02-24 13:06:47 UTC
Verified in build 20040224-0536.

It should override getPersistenceType() to get rid of the following note:

Note -
org.netbeans.modules.properties.PropertiesOpen$PropertiesCloneableTopComp
onent ought to override getPersistenceType() rather than using the
client proper
ty or accepting the default.