From e05c94564f43184d6b062e13fa2f4b5082e246a6 Mon Sep 17 00:00:00 2001 From: "sha..rd" Date: Thu, 28 Apr 2011 21:58:02 +0000 Subject: [PATCH] * Uncaught exception handler now set only on render thread instead of entire VM git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7356 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../lwjgl-ogl/com/jme3/system/lwjgl/LwjglAbstractDisplay.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglAbstractDisplay.java b/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglAbstractDisplay.java index df174b6ab..b4e0d5cc6 100644 --- a/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglAbstractDisplay.java +++ b/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglAbstractDisplay.java @@ -89,7 +89,8 @@ public abstract class LwjglAbstractDisplay extends LwjglContext implements Runna protected void initInThread(){ try{ if (!JmeSystem.isLowPermissions()){ - Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { + // Enable uncaught exception handler only for current thread + Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { public void uncaughtException(Thread thread, Throwable thrown) { listener.handleError("Uncaught exception thrown in "+thread.toString(), thrown); }