New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.2 IDE - code disappears #4322

Closed
zdjurisic opened this Issue Feb 22, 2016 · 6 comments

Comments

Projects
None yet
4 participants
@zdjurisic

zdjurisic commented Feb 22, 2016

I am not sure I can reproduce the problem but this is the second time it happened in a week, so here it goes:

While editing code in 3.0.2 IDE, the code window goes completely white, but as I press the up/down arrow to move cursor across lines, the lines of code appear. Here is the console contents that appeared at the moment the code window went white:

Error repainting line range {80,121}:
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
at java.util.ArrayList$Itr.next(ArrayList.java:851)
at processing.mode.java.JavaEditor.findError(JavaEditor.java:2532)
at processing.mode.java.pdex.JavaTextAreaPainter.paintErrorLine(JavaTextAreaPainter.java:359)
at processing.mode.java.pdex.JavaTextAreaPainter.paintLine(JavaTextAreaPainter.java:217)
at processing.app.syntax.TextAreaPainter.paint(TextAreaPainter.java:490)
at processing.mode.java.pdex.JavaTextAreaPainter.paint(JavaTextAreaPainter.java:587)
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.paintToOffscreen(JComponent.java:5210)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
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$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
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)

@JakubValtar JakubValtar self-assigned this Feb 22, 2016

qiubit added a commit to qiubit/processing that referenced this issue Feb 23, 2016

@qiubit

This comment has been minimized.

Show comment
Hide comment
@qiubit

qiubit Feb 23, 2016

Contributor

Bug can be artificially reproduced in the following way (I have seen it during normal use as well too): qiubit@62138e7 (basically after some time this spawns dummy thread which tries to manipulate list that we're iterating through, which succeeds causing an exception)

Basically it is caused because code manipulating errorPoints is not thread-safe (although the cause is quite subtle, I'll write details in my pull request shortly).

Contributor

qiubit commented Feb 23, 2016

Bug can be artificially reproduced in the following way (I have seen it during normal use as well too): qiubit@62138e7 (basically after some time this spawns dummy thread which tries to manipulate list that we're iterating through, which succeeds causing an exception)

Basically it is caused because code manipulating errorPoints is not thread-safe (although the cause is quite subtle, I'll write details in my pull request shortly).

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Feb 23, 2016

Contributor

Thanks @qiubit, I know where the problem is.

I'll post some comments to your pull request.

Contributor

JakubValtar commented Feb 23, 2016

Thanks @qiubit, I know where the problem is.

I'll post some comments to your pull request.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Mar 6, 2016

Member

Is this a regression in 3.0.2 or something since 3.0? How serious is it? If it's actually destroying code in a non-recoverable way, then we need to push 3.0.3 asap. Or if it's an occasional annoyance introduced in 3.0.2 then 3.0.3 just needs to happen "soon."

Member

benfry commented Mar 6, 2016

Is this a regression in 3.0.2 or something since 3.0? How serious is it? If it's actually destroying code in a non-recoverable way, then we need to push 3.0.3 asap. Or if it's an occasional annoyance introduced in 3.0.2 then 3.0.3 just needs to happen "soon."

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Mar 6, 2016

Contributor

This is a problem with redrawing lines, e.g. displaying. No code should be harmed. Error checker updating errors fighting with redrawing on EDT. I think it got introduced Aug 21 in 55713f8 by some synchronization juggling, so it's pre 3.0. I never encountered it, I don't think this is very common, however if it happens few times a week on some other machines it might be high-ish priority.

Contributor

JakubValtar commented Mar 6, 2016

This is a problem with redrawing lines, e.g. displaying. No code should be harmed. Error checker updating errors fighting with redrawing on EDT. I think it got introduced Aug 21 in 55713f8 by some synchronization juggling, so it's pre 3.0. I never encountered it, I don't think this is very common, however if it happens few times a week on some other machines it might be high-ish priority.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Mar 6, 2016

Member

Got it, thanks. Will try to do a release soon but won't drop everything today to handle it.

Member

benfry commented Mar 6, 2016

Got it, thanks. Will try to do a release soon but won't drop everything today to handle it.

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Apr 18, 2016

Contributor

Fixed in #4325

Contributor

JakubValtar commented Apr 18, 2016

Fixed in #4325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment