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
Creating a temporary file in an Android app via Files.createTempFile(null, ".tmp"); works for GraalVM 22 JDK 11, but not JDK 17.
Expected Behavior
Using the reproducer below, I expect output like this in the console (which I get with JDK 11 versions of GraalVM):
[Tue. Feb. 08 14:34:16 EST 2022][INFO] [SUB] D/GraalCompiled(11718): Created temp file at: /data/user/0/com.gluonapplication.gluonmobilesingleviewproject/9221306799863213037.tmp
Current Behavior
An exception is thrown when trying to create the temp file with JDK 17 versions of GraalVM:
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): Failed to create temp file
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): java.nio.file.NoSuchFileException: /tmp/13973661146619086989.tmp
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at java.nio.file.Files.newByteChannel(Files.java:380)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at java.nio.file.Files.createFile(Files.java:658)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at java.nio.file.TempFileHelper.create(TempFileHelper.java:136)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:159)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at java.nio.file.Files.createTempFile(Files.java:923)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at com.gluonapplication.GluonApplication.<init>(GluonApplication.java:17)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at java.lang.reflect.Constructor.newInstance(Constructor.java:480)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:803)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at java.security.AccessController.doPrivileged(AccessController.java:107)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at java.lang.Thread.run(Thread.java:833)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:597)
[Tue. Feb. 08 13:39:45 EST 2022][INFO] [SUB] D/GraalCompiled( 5369): at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:194)
One potentially suspicious element is that the path it reports when it fails is completely different (in /tmp instead of /data/user/0/com.gluonapplication.gluonmobilesingleviewproject).
Creating a temporary file in an Android app via
Files.createTempFile(null, ".tmp");
works for GraalVM 22 JDK 11, but not JDK 17.Expected Behavior
Using the reproducer below, I expect output like this in the console (which I get with JDK 11 versions of GraalVM):
Current Behavior
An exception is thrown when trying to create the temp file with JDK 17 versions of GraalVM:
One potentially suspicious element is that the path it reports when it fails is completely different (in
/tmp
instead of/data/user/0/com.gluonapplication.gluonmobilesingleviewproject
).Steps to Reproduce
I have a simple reproducer here: https://github.com/marinier/androidtempfiletest
The README in there contains additional details.
Your Environment
Ubuntu 20.04 64-bit running in a VirtualBox VM on a Windows 10 64-bit host.
I have tried building with various versions of GraalVM 22:
I have tried this on Android 10, 11, and 12 (Samsung and Pixel phones) with the same result.
The text was updated successfully, but these errors were encountered: