Android 7.0 throws MODE_WORLD_READABLE no longer supported

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Android 7.0 throws MODE_WORLD_READABLE no longer supported

philjord
Hi,
I've just started to get error on Android 7.0 devices I call the font loader

jogamp.graph.font.UbuntuFontLoader.get(UbuntuFontLoader.java)

For rendering with Newt

That call throws
 
java.io.IOException: Problem loading font Ubuntu-R.ttf, stream jogamp/graph/font/fonts/ubuntu/Ubuntu-R.ttf

And it's all caused by

Caused by: java.lang.SecurityException: MODE_WORLD_READABLE no longer supported
        at android.app.ContextImpl.checkMode(ContextImpl.java:2134)
        at android.app.ContextImpl.getDir(ContextImpl.java:1955)
        at android.content.ContextWrapper.getDir(ContextWrapper.java:278)
        at jogamp.common.os.android.AndroidUtilsImpl.getTempRoot(AndroidUtilsImpl.java)

A quick stack overflow shows MODE_WORLD_READABLE should be replaced by MODE_PRIVATE

I suspect this is going to cause serious troubles for Jogl on Android as devices move to Android 7

Does anyone have any advice on this? Should I just log a bug, or is it already known?

As far as I can tell this is the only use of that mode in the code, and it doesn't need to be sharable data anyway. My work around is to take that class out of the jar and swap the mode in my project.
Reply | Threaded
Open this post in threaded view
|

Re: Android 7.0 throws MODE_WORLD_READABLE no longer supported

gouessej
Administrator
Please write a bug report.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Android 7.0 throws MODE_WORLD_READABLE no longer supported

philjord
Ok, will do when I get a bit of time, and feedback confirms the bug and my work around.

Also this is actually a gluegen issue, so you could move it to that sub forum if you get a minute.

Thanks,
Phil.
Reply | Threaded
Open this post in threaded view
|

Re: Android 7.0 throws MODE_WORLD_READABLE no longer supported

gouessej
Administrator
Hi Phil

Don't forget to fill a bug report against GlueGen.
Julien Gouesse | Personal blog | Website