You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
getJAI() fails with exception causing the application to crash #41
I just stumbled over an exception inside the BufferedImageHelper, that causes my application to crash.
I'm running in an plugin environment and are not able to load the JAI object, using the ComponentFactory (as indicated by the comments inside the ComponentFactory.create method).
However switching the order of statements inside the BufferedImageHelper.getJAI() method solves the issue for me.
Now I'm just getting one exception at the beginning and can use the fallback method you provided.
In my solution the BufferedImageHelper.getJAI() method looks like:
protected static Object getJAI() {
if (!checkedForJAI) {
checkedForJAI = true; //mark as checked before the exception occurs to not check again
jaiObj = ComponentFactory.create("javax.media.jai.JAI");
}
return jaiObj;
}
Activity