processing4 icon indicating copy to clipboard operation
processing4 copied to clipboard

P2D/P3D crash with some external monitors

Open antoineschmitt opened this issue 1 month ago • 0 comments

I use my sketches on many different setups (live shows where I plug my computer to the local videoprojector). In some cases (4 times in 5 years), my sketches would crash on startup, in the fullScreen() call. This is fixed by changing videoprojector.

What I have found ;

  • it only happens with P2D/P3D, not with JAVA2D
  • it happens on some projectors that do not have 1920x1080 resolution as their standard resolution (but not on all of these projectors).
  • changing the resolution to a lower (like 1728x1117, which is my standard resolution on my Mac) fixes the problem
  • this happens whether we are in “screen copy” or not (like fullScreen(2, P2D))
  • this has happened with Processing3 and Processing4
  • this has happened on Mac Intel and aarch
  • this has happened with external videoprojectors and external monitors, of various brands

Here is the backtrace of the crash (full crash report attached) : C [CoreFoundation+0x1d964c] CFEqual.cold.7+0xe C [CoreFoundation+0x55f94] CFArrayGetFirstIndexOfValue+0xb4 C [libnewt_head.dylib+0x2517] Java_jogamp_newt_driver_macosx_ScreenDriver_getMonitorMode0+0x277 j jogamp.newt.driver.macosx.ScreenDriver.getMonitorMode0(II)[I+0 j jogamp.newt.driver.macosx.ScreenDriver.getMonitorModeImpl(Ljogamp/newt/MonitorModeProps$Cache;II)Lcom/jogamp/newt/MonitorMode;+3 j jogamp.newt.driver.macosx.ScreenDriver.collectNativeMonitorModesAndDevicesImpl(Ljogamp/newt/MonitorModeProps$Cache;)V+151 j jogamp.newt.ScreenImpl.collectNativeMonitorModes(Ljogamp/newt/MonitorModeProps$Cache;)I+8 j jogamp.newt.ScreenImpl.initMonitorState()Ljogamp/newt/ScreenMonitorState;+89 j jogamp.newt.ScreenImpl.createNative()V+101 j jogamp.newt.ScreenImpl.addReference()I+68 j processing.opengl.PSurfaceJOGL.initDisplay()V+32 j processing.opengl.PSurfaceJOGL.initFrame(Lprocessing/core/PApplet;)V+14 j processing.core.PApplet.initSurface()Lprocessing/core/PSurface;+34 j processing.core.PApplet.runSketch([Ljava/lang/String;Lprocessing/core/PApplet;)V+1105 j processing.core.PApplet.main([Ljava/lang/String;)V+2 v ~StubRoutines::call_stub V [libjvm.dylib+0x520e36] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x2b6 V [libjvm.dylib+0x583f28] jni_invoke_static(JNIEnv_, JavaValue, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, JavaThread*)+0x158 V [libjvm.dylib+0x587418] jni_CallStaticVoidMethod+0x198 C [libjli.dylib+0x509d] JavaMain+0xc1d C [libjli.dylib+0x7749] ThreadJavaMain+0x9 C [libsystem_pthread.dylib+0x5e59] _pthread_start+0x73 C [libsystem_pthread.dylib+0x1857] thread_start+0xf

My hunch : some monitors provide to java a bogus or malformed or unexpected EDID configuration. And this crashes the P2D/P3D driver. I have attached the EDID of one faulty monitor, for your eye.

hs_err_pid35189.log

PT-VW350.txt

antoineschmitt avatar Dec 14 '25 01:12 antoineschmitt