Quickly test/preview didn't work

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Quickly test/preview didn't work

Postby mkornatzki » Tue Sep 29, 2009 5:05 am

Hi,

the quickly text / preview button in the toolbar didn't work.

The following happened even if i only have a jframe.

In the EclipseConsoleLog i get the following:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Buffers have not been created
at sun.awt.windows.WComponentPeer.getBackBuffer(WComponentPeer.java:846)
at java.awt.Component$FlipBufferStrategy.getBackBuffer(Component.java:3686)
at java.awt.Component$FlipBufferStrategy.updateInternalBuffers(Component.java:3671)
at java.awt.Component$FlipBufferStrategy.revalidate(Component.java:3786)
at java.awt.Component$FlipBufferStrategy.revalidate(Component.java:3768)
at java.awt.Component$FlipBufferStrategy.getDrawGraphics(Component.java:3760)
at javax.swing.BufferStrategyPaintManager.prepare(BufferStrategyPaintManager.java:507)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:263)
at javax.swing.RepaintManager.paint(RepaintManager.java:1217)
at javax.swing.JComponent.paint(JComponent.java:1013)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1762)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

currently i use the latest version of swingdesigner (7.1.0.200909290340).

regards,
michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Quickly test/preview didn't work

Postby Eric Clayberg » Tue Sep 29, 2009 1:59 pm

Never seen anything like that before, but it looks like a bug in Swing...

http://forums.java.net/jive/message.jsp ... eID=328154

http://forums.yourkit.com/viewtopic.php?f=3&t=3074
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Quickly test/preview didn't work

Postby mkornatzki » Tue Sep 29, 2009 10:17 pm

that means it is only a problem on my computer?
i didn't change the java-version (java 1.6.0_10) for nearly 3 weeks i give a workshop with this computer and the eclipse.
i only make updates for eclipse and the eclipse-plugins.
i only want to preview a simple jframe that was never before a problem?

i will test it with another installation.

regards,
michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Quickly test/preview didn't work

Postby Eric Clayberg » Wed Sep 30, 2009 5:11 am

mkornatzki wrote:that means it is only a problem on my computer?

I don't know. We tried it on 5 different computers here and it worked fine. We have not had any similar reports from anyone else either.

This is a Sun/Java bug, but I have no idea how, where or why it is triggered (your stack trace did not include any mention of our code).
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Quickly test/preview didn't work

Postby mkornatzki » Thu Oct 08, 2009 7:45 am

Hello,

now i can give more information about my problem. i have found the problem or better a configuration where the problem occurs.

i take a clean eclipse 3.5 with actual updates and the stable SwingDesigner 7.2
Make a Testproject with a TestFrame extended from JFrame.
click Preview and then the following happens:

Multiple scenarios tested:
* Start Eclipse with Java 1.5.0.16
Make a Project in Java 1.5.0.16
Preview works
* Start Eclipse with Java 1.5.0.16
Make a Project in Java 1.6.0.16
Preview works

* Start Eclipse with Java 1.6.0.16
Make a Project in Java 1.5.0.16
Preview crashs
* Start Eclipse with Java 1.6.0.16
Make a Project in Java 1.6.0.16
Preview crashs

I also make a test with the SwingDesigner 6.9.3 and there is no problem when i start the eclipse with java 6.

Do you make a test also with Java 6 as starting Java-Version for Eclipse?

regards, michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Quickly test/preview didn't work

Postby Eric Clayberg » Fri Oct 09, 2009 4:09 am

We tried Java 1.6.0.16 and did not have any problems.

Maybe try downloading it again from the Sun Java site?
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Quickly test/preview didn't work

Postby mkornatzki » Fri Oct 09, 2009 4:46 am

Thank you for your endurance.

after multiple tests and reading the links you posted i found a solution (not a good one but...)
In one posting i read that the problem starts with Java 1.6.0_07, so i test Java 1.6.0_06 and the error didn't occur.

It's very starnge because i had used eclipse and swingdesigner with a higher java version a long time (maybe a windows update make the problem?).

I will run my eclipse now under Java 1.6.0_06.

thanks,
michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Quickly test/preview didn't work

Postby Eric Clayberg » Fri Oct 09, 2009 6:22 am

With so many combinations of OS updates, drivers, and JDk versions out there, who knows what the cause might be.

We tried Java 1.6.0_06 on several different machines, and did not have a problem, but we have seen problems with other JDK releases in the past.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest