I’m running Ubuntu 18.04 with an AMD Radeon R7 M445 GPU, the amdgpu drivers and Processing 3.5.1. When running a simple sketch like the one below, the entire system hangs after some time (70-120 seconds) and I have to power cycle the machine. Other than the solution (revert) of this thread, is there a fix (and reason) for this bug?
I wonder how hard does it hang. It may be just the sketch hanging and locking the desktop environment, or the desktop environment itself hanging, or the X11 server hanging, or the entire Linux kernel screwing up. I had stuff locking up GNOME before on Ubuntu 18.04.
I think it’s reasonable to try see what it can be.
Can you test it with other desktop environments (xfce4, KDE Plasma, whatever?)
Can you log into a TTY by pressing CTRL+ALT+F2, and then try to run killall -9 java from there to force close Processing? (then CTRL+ALT+F1 or CTRL+ALT+F7 to return back)
Can you (turn on and) test X11 zapping with CTRL+ALT+BACKSPACE in the middle of such a hang? It should drop you to the login screen.
Can you (turn on and) try the Magic SysRq sequence in the middle of such a hang? (i.e. holding ALT+PrintScreen and, without releasing them, pressing keys R,E,I,S,U,B one after another with a second or two of delay between each)
@kll There is no particular reason for 3.5.1 other than being kinda bored to update every minor version .
@Architector_4 I was able to log into a TTY and kill Processing. So that is better than power-cycling.
But I still cannot figure out what is happening.
P.S.: I’m specifying P2D in fullScreen so that it is true fullscreen. If you know any other way I can do this, it would eliminate the problem.
You should try with the latest version. Who knows, maybe it has this specific thing fixed?
This means that sketch itself hangs, and, therefore, locks up the desktop environment. Is this specific to fullscreen(P2D); exactly? Does the sketch hang after 70-120 seconds if you do something like size(1920,1080, P2D); i.e. not fullscreen, but with your screen size?
Doesn’t work in what way? You can’t switch to it? ALT+PrintScreen+R is supposed to reset keyboard layout which might make CTRL+ALT+F2 work.
And if that doesn’t, maybe your system gets overloaded. Try launching such a sketch with a task manager open i.e. while watching RAM usage. If it peaks to 100%, then that should indicate a problem. In that case, ALT+PrintScreen+F manually triggers the Out Of Memory condition i.e. instantly kills the most memory hungry process, which should also be better than REISUB or hardware power cycling. Although you might need to press it several times, as it might first kill a few browser tabs or other applications depending on what you have other.
Also, when TTY doesn’t work, does CTRL+ALT+Backspace (to kill X11) work?
Yes it does not switch to it (sorry for being unclear). Or sometimes it tries to switch to it (screen goes all black) but never quite gets there.
Something I just noticed, RAM usage does not seem normal to me!! When I run the sketch above with the task manager open as you suggested, I see the memory usage going up significantly. For that sketch, it starts at ~100MiB and during the first two minutes it goes up to ~150MiB. If I run the sketch below, the situation becomes more interesting, as memory usage starts at 130MiB and after one minute it reaches almost 700MiB (hangs at 730-740MiB).
Ubuntu 18.04 with amdgpu and Processing 3.5.3 here. But an RX 560 which I think is next generation from yours? Original sketch works fine without problem.
Are you using the default Processing install? You mention JDK 11 - why? Are you using Processing with system JDK? (I assume not since P2D, well JOGL, hard crashes with stock OpenJDK 11 on Ubuntu anyway, although works fine with other ones).
@neilcsmith Yes I am using the default install. I just checked which version is installed in the system through the terminal, not sure if that’s the one Processing uses (can I check that?). I haven’t done anything weird though, just the regular processing installation.