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
Crash with fullscreen(P3D) / Processing 3.1 #4468
Comments
Plus Processing crash not all the time at the same line in the program |
I understand nothing what happen with fullscreen() sometimes that's work, sometime no. |
@StanLepunK Are you running this on the Raspberry Pi or an ARM device perhaps? |
nop, sorry only test on mac OSX. I don't use Raspberry Pi or ARM |
Sadly I can't reproduce your issue. Your sketch has 50 tabs and 15k lines of code and I didn't even manage to launch it when I got all the libraries because it does not compile. If it works with simpler sketches, I would bet there is some problem somewhere in your sketch. Unless you provide some shorter example I'm sorry but I can't really help. P.S.: I think you should move this to some better IDE like Eclipse or IntelliJ IDEA. It would make your life much easier. |
I take my day to try to isolated the problem and write a simplest code to see where is the problem...but I just find a few tracks.
with a but only in my huge code not in the simple one. |
If that happens only when there are two OscP5, you may have problem with synchronization. I believe each OscP5 runs its own thread and both can be calling void synchronized oscEvent(OscMessage receive) {
...
} If it does not help, try to put received import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
BlockingQueue<OscMessage> oscQueue = LinkedBlockingQueue<OscMessage>();
void oscEvent(OscMessage receive) {
oscQueue.offer(receive);
}
void processOscEvent(OscMessage receive) {
if(receive.addrPattern().equals("Controller")) {
catchDataFromController(receive) ;
splitDataButton() ;
splitDataSlider() ;
splitDataLoadSaveController() ;
}
if(receive.addrPattern().equals("Prescene")) {
catchDataFromPrescene(receive) ;
splitDataFromPrescene() ;
splitDataLoadSavePrescene() ;
}
}
void draw() {
while (!oscQueue.isEmpty()) {
OscMessage receive = oscQueue.poll();
processOscEvent(receive);
}
} Otherwise I'm out of ideas. |
Thanks a lot I try this solution asap. And keep in touch if that's resolve this problem of crash |
That's change nothing ! |
I think that I managed to reproduce your problem: void setup() {
size(300, 300, P3D);
surface.setLocation(100, 100);
try { Thread.sleep(6000); } catch (InterruptedException e) { }
} You call |
The problem is solve with new ordering launch. Now if Scene is launching in first and OSC can wait the receive message quietly. I don't do a lot of opening to be sure if it's ok, but that's sound good. To be sure I will add your security to be sure. Thx a lot for to be take a time on it. |
You're welcome. |
@JakubValtar Now you saw and put your hand magic hands in a little part of my project you should add a tiny star on my project :) https://github.com/StanLepunK/ROMANESCO-Processing |
I saw exactly this error in a project of a student of me on a Windows system. This happened when I combined the Arduino library and the OpenCV library. Turning on Arduino would throw this error. I'll try if I can reproduce this, but to what is this error related? Has it to do with where you call the size() function? Running your code, throws an error on osx as well. However what is this surface.setLocation() call? I can't find it in the Processing reference.
|
@kasperkamperman The problem is that you block the main thread for more than 5 seconds after you call setLocation. Put the setLocation at the end of setup and the problem will go away. The long sleep is triggering JOGL's detection of blocked thread. |
@JakubValtar The problem is that I don't use setLocation... I could reproduce the error on my mac as well with the following code (of course part of a bigger project).
|
@JakubValtar Do you prefer I create a separate issue for this, because it doesn't completely relate to fullscreen(P3D)? |
Sorry for not getting back to you earlier. The problematic call here is Let's keep it here for now and I will investigate what we can do and create Thanks! On Sat, 25 Jun 2016, 13:00 kasperkamperman, notifications@github.com
|
Don't know if it can help somebody, I had the same issue (java.lang.RuntimeException: Waited 5000ms ). |
Prevent a (presumably) rendering-related timeout by moving the frameRate() call to the very end of setup(), after all the time-consuming resource loading has finished. The call seems to start a rendering thread that times out in five seconds. If the setup function takes a long time after frameRate() (like on my ancient laptop), this happens: java.lang.RuntimeException: Waited 5000ms for: <b788508, 5bf6a17>[count 2, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-FPSAWTAnimator#00-Timer0-FPSAWTAnimator#00-Timer1> at processing.opengl.PSurfaceJOGL$2.run(PSurfaceJOGL.java:410) at java.lang.Thread.run(Thread.java:748) See processing/processing#4468 and/or just google around for "Waited 5000ms" for more details. This "FPSAWTAnimator" doesn't seem to be purely Processing-related: - https://bugs.freedesktop.org/show_bug.cgi?id=103078 - http://forum.jogamp.org/Where-when-is-it-ok-to-call-setFullscreen-td4032828.html - https://stackoverflow.com/questions/15817476/avoid-recursivelockimpl01unfairish-lock-runtimeexception-timeout This appears to be the origin of the message: https://github.com/sgothel/gluegen/blob/df9ff7f340a5ab4e07efc613f5f264eeae63d4c7/src/java/jogamp/common/util/locks/RecursiveLockImpl01Unfairish.java#L198 .. but the real problem would then be in FPSAWTAnimator, a part of JOGL, that doesn't handle the timeout.
Prevent a (presumably) rendering-related timeout by moving the frameRate() call to the very end of setup(), after all the time-consuming resource loading has finished. The call seems to start a rendering thread that times out in five seconds. If the setup function takes a long time after frameRate() (like on my ancient laptop), this happens: java.lang.RuntimeException: Waited 5000ms for: <b788508, 5bf6a17>[count 2, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-FPSAWTAnimator#00-Timer0-FPSAWTAnimator#00-Timer1> at processing.opengl.PSurfaceJOGL$2.run(PSurfaceJOGL.java:410) at java.lang.Thread.run(Thread.java:748) See processing/processing#4468 and/or just google around for "Waited 5000ms" for more details. This "FPSAWTAnimator" doesn't seem to be purely Processing-related: - https://bugs.freedesktop.org/show_bug.cgi?id=103078 - http://forum.jogamp.org/Where-when-is-it-ok-to-call-setFullscreen-td4032828.html - https://stackoverflow.com/questions/15817476/avoid-recursivelockimpl01unfairish-lock-runtimeexception-timeout This appears to be the origin of the message: https://github.com/sgothel/gluegen/blob/df9ff7f340a5ab4e07efc613f5f264eeae63d4c7/src/java/jogamp/common/util/locks/RecursiveLockImpl01Unfairish.java#L198 .. but the real problem would then be in FPSAWTAnimator, a part of JOGL, that doesn't handle the timeout.
…ading all of processing/processing#4468 -- getting new error now, possibly need to delay start of attempted rendering until after project has initialised..? or maybe just need to make sure that gfx buffers are initialise
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I write a complex code, who use sometime size, sometime fullscreen.
the program work perfectly with size(,,P3D) but crash 99% of the time with fullscreen(P3D) ;
I try all my last two day I reproduce this bug in something simple to post it, but I fail to do that
So the error message :
The bug is the same with Processing 3.0.2
I try to continue to find a simple code to isolate the bug !
The text was updated successfully, but these errors were encountered: