bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/24359] JPopupMenu broken due to BoxLayout/SizeRequirements ch


From: mark at gcc dot gnu dot org
Subject: [Bug swing/24359] JPopupMenu broken due to BoxLayout/SizeRequirements changes
Date: 20 Oct 2005 10:41:39 -0000


------- Comment #3 from mark at gcc dot gnu dot org  2005-10-20 10:41 -------
Got this issue also with torero (see
http://developer.classpath.org/mediation/FreeSwingTestApps).

What happens is that while the JMenu is being constructed revalidate() is
called a couple of times. Since the JMenu is created on the main thread this
will trigger a SwingUtilities.invokeLater() in JComponent to invoke
revalidate() on the main dispatch thread. This is why it seems random. Since if
this revalidate() triggers while inside one of the BoxLayout.check*() methods
all BoxLayout fields will be cleared (set to null) and the calulation aborts
with a NullPointerException.

Roman could you take a look?
I am not sure what to correct fix is. Naturally our swing isn't thread safe.
But it is natural to create components on your main thread. But if creation
triggers one of the *Size() methods in BoxLayout and there are revalidate
requests pending on the dispatch thread we are in trouble.


-- 

mark at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |roman at kennke dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-20 10:41:38
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24359





reply via email to

[Prev in Thread] Current Thread [Next in Thread]