Open NicoHood opened 9 years ago
"Funny" addition: I left the program open (idle) for a while now and it now looks like this. The bugged window from before is still open, and one reopened instance with two windows that stayed idle:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData
at sun.java2d.xr.XRPMBlitLoops.cacheToTmpSurface(XRPMBlitLoops.java:145)
at sun.java2d.xr.XrSwToPMBlit.Blit(XRPMBlitLoops.java:353)
at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:959)
at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:577)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:67)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1014)
at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:186)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3318)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3296)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1582)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1495)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:306)
at javax.swing.RepaintManager.paint(RepaintManager.java:1265)
at javax.swing.JComponent.paint(JComponent.java:1042)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:79)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:116)
at java.awt.Container.paint(Container.java:1973)
at java.awt.Window.paint(Window.java:3912)
at javax.swing.RepaintManager$4.run(RepaintManager.java:835)
at javax.swing.RepaintManager$4.run(RepaintManager.java:807)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:807)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:782)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:731)
at javax.swing.RepaintManager.access$1300(RepaintManager.java:64)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1720)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData
at sun.java2d.xr.XRPMBlitLoops.cacheToTmpSurface(XRPMBlitLoops.java:145)
at sun.java2d.xr.XrSwToPMBlit.Blit(XRPMBlitLoops.java:353)
at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:959)
at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:577)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:67)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1014)
at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:186)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3318)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3296)
at processing.app.EditorStatus.paintComponent(EditorStatus.java:227)
at javax.swing.JComponent.paint(JComponent.java:1056)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1047)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5226)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1572)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1495)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:306)
at javax.swing.RepaintManager.paint(RepaintManager.java:1265)
at javax.swing.JComponent.paint(JComponent.java:1042)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:79)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:116)
at java.awt.Container.paint(Container.java:1973)
at java.awt.Window.paint(Window.java:3912)
at javax.swing.RepaintManager$4.run(RepaintManager.java:835)
at javax.swing.RepaintManager$4.run(RepaintManager.java:807)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:807)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:782)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:731)
at javax.swing.RepaintManager.access$1300(RepaintManager.java:64)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1720)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
I had this issue now two times in a row, appears very often. I saw this log now several times as last info after the task kill:
./arduino: line 33: 1015 Killed $JAVA -DAPP_DIR="$APPDIR" -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel $SPLASH processing.app.Base "$@"
1.6.5 also has this issue. Dont know in which version java got bundled, but I have not installed java manually.
I get this error in Fedora 22 when the system recovers from sleep. The Arduino works as it should but if I leave the computer and the system goes to sleep it spits "Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException" when the computer is active again.
This is a side effect of #3475 (or #3475 is a side effect of this). Anyway, as written in https://github.com/arduino/Arduino/issues/3475#issuecomment-119228111, fix is not easy as the bug starts down in the way GUI components were tied with business logic. It could require a substantial rewrite which is hard to schedule atm
I want to note that i get this around every 10th time I start the IDE. Its really annoying, also you have to KILL the task, ending doesnt work.
you may want to revisit the editor init/restore code. For eg I ended up taking the loading asynchronously so that the editor window always shows cleanly no matter the errors that happen during load. Then if something really bad happens, it is delt with in the editor where it happened (the others are properly and independently restored). The other side effect is that there is a constant time to editor-visible-and-looking-ok. This is particularly useful for sketches with more source files, or on slower platform (say raspberry-pi) where full open cycle may take longer. (Revamping the load code was a 3h task)
You really should share your work. Just commenting that you did it better than it is right now doesnt help. I've seen a lot of great fixes from you, but never a PR. I've also seen similar discussion about this topic, but it gets more and more annoying. Share your work and dont just brag with it please.
@NicoHood There are opensource projects which are 100% the result of the passion of individuals who do what they do on their free time. Other projects, belong to and are clearly driven by businesses, employing salaried software professionals who tightly control where and how these project evolve, in order to keep them in sync with business priorities as well as, when this does not conflict, with end user requests.
Given how this project has more to do with the latter model than the former, it strikes me as rational to offer suggestions that the owners of the project, professionals of the software industry like myself, can review the merrits of, as opposed to throwing code around because I think that it is pretty or even effective.
In this instance a fellow professional made the assessment that altering certain parts of the codebase would be a substential rewrite (without further clarifications/quantification). Having made the choice to alter this code, I was offering 1) a short overview of a limited scope rewrite, 2) additional rational for potentially deciding in favor of altering the code (aside from strictly addressing this issue) 3) and a matching time cost, the idea being that the professionals at Arduino LLC could use this information, among many other things, to decide whether or not this was worth them investing the company's resources.
Now, offer any wording that can be used to convey this humbly and without hurting anybody's sensibilities, and I will gladly follow the pattern.
Maybe they should hire you ;)
This now happened a few times under Linux (Ubuntu 64 bit and Elementary 64 bit, also based on Ubunutu). I start the IDE via desktop icon or command line and the GUI just doesnt display anything but white. It also wont quit, I have to kill (not end, kill!) the task (java) via System Monitor. Noticed this since 1.6.0 or so. Maybe this bug is in earlier version because I started with Ubuntu when IDE 1.6.0 was up to date.
Luckly it happend when I started the IDE in command line. Here is the output. (nightly of just 15 min ago). (BTW: Java 8 integrated in the IDE works perfect so far. Very good idea!)