Comments (12)
No, I haven't started looking at this yet, sorry.
from box64.
0x60000000
is not a reserved area. It's just an arbitrary value used as a starting point for mmap64.
Can you put the jvm/jre you used and the .java binary also, for local debugging? I have run some java games succesfully already, so it should work.
from box64.
The jdk and javafx is too large to upload, so I put the link.
jdk: https://aka.ms/download-jdk/microsoft-jdk-11.0.22-linux-x64.tar.gz
javafx: https://download2.gluonhq.com/openjfx/11.0.2/openjfx-11.0.2_linux-x64_bin-sdk.zip
.java files:
java-program.zip
from box64.
FYI, here is the way to run the java program.
- Download and decompress the jdk and javafx.
cd /tmp
wget https://aka.ms/download-jdk/microsoft-jdk-11.0.22-linux-x64.tar.gz
wget https://download2.gluonhq.com/openjfx/11.0.2/openjfx-11.0.2_linux-x64_bin-sdk.zip
tar -xvf microsoft-jdk-11.0.22-linux-x64.tar.gz
unzip openjfx-11.0.2_linux-x64_bin-sdk.zip
mv javafx-sdk-11.0.2 jdk-11.0.22+7/
- Download the java src/binary files.
cd /tmp
wget https://github.com/ptitSeb/box64/files/14971196/java-program.zip
unzip java-program.zip
# Now we will see HelloJNI.class and HelloJNI.java
- Create a script named
run.sh
that is located in the same directory as HelloJNI.class.
# run.sh
JAVA_HOME=/tmp/jdk-11.0.22+7
PATH=$JAVA_HOME/bin:$PATH:.
CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
export JAVA_HOME
export PATH
export CLASSPATH
export PATH_TO_JAVAFX="${JAVA_HOME}/javafx-sdk-11.0.2/lib"
BOX64_LOG=1 BOX64_DLSYM_ERROR=1 BOX64_TRACE_XMM=1 BOX64_JITGDB=1 BOX64_TRACE=1 box64 java -Dprism.order=sw --module-path ${PATH_TO_JAVAFX} --add-modules javafx.controls -Djava.library.path=. HelloJNI
It's just a simple Java demo that creates a window using the JavaFX library. If we use an ARM64 native JVM to run this Java program, the expected result is a window popping up on the screen like this:
This issue is easy to reproduce, although there is a small chance that it might not occur, with approximately a 5% probability of running normally.
from box64.
Continue tracking this issue. Let me know if more information is needed.
Thanks for the effort!
from box64.
don't mean to rush, just want to know are there any updates?
from box64.
I suspect that Java allocates a memory area using mmap64, and box64 returns the area at 0x60000000
. Subsequently, Java changes the privileges of this area to ---p
by invoking mprotect
.
I reviewed the logs for my_mmap64
and my_mprotect
to monitor the area at 0x60000000
.
box64/src/wrapped/wrappedlibc.c
Lines 2663 to 2669 in b64e6bd
box64/src/wrapped/wrappedlibc.c
Lines 2817 to 2821 in b64e6bd
Here is the related log:
mmap64((nil), 0x1000, 0x3, 0x22, -1, 0) => mprotect(0x60000000, 4096, 0x6)
mprotect(0x60000000, 4096, 0x6)
mprotect(0x60000000, 4096, 0x0)
Thus, the assumption appears to be correct: Java allocates an area and marks it as reserved.
However, why does ED
point to this reserved area?
from box64.
This is probably a stack. And the 4096 byte (a page) that are protected is the "stack guard" to detect stack overflow. The error is probably comming from some place else, like a stack search for something. I still haven't started debugging this one.
from box64.
Thanks for the response! I will keep waiting for support from the community.
from box64.
Is the troubleshooting underway? I noticed that the latest commit in master branch seems to be related to this issue. :D
from box64.
it wasn't for this issue, but there are a few similar ones. I'll start analysing this issue soon-ish now.
from box64.
okay
from box64.
Related Issues (20)
- Unsupported Syscall 0x10Dh (269)
- box64 gallium nine
- Nintendo switch steam being weird HOT 30
- Anydesk: error initializing needed lib HOT 1
- Installing box64rc configurations HOT 2
- Wine on an M1 doesn’t show the toolbar HOT 3
- Right clicking in the wine registry editor is broken on m1 HOT 5
- Mouse not working when using keyboard when using apple silicon HOT 20
- [Steam] Games with native linux and proton support don't work HOT 6
- Missing libc symbols with glibc 2.39 on Fedora 40 HOT 5
- Missing symbol errors with bash on M1 Pro running NixOS 24.05 HOT 3
- Viber on m1 HOT 3
- QT 6.7
- Fallout 3 crashes on hangover with box64 when you press play HOT 1
- Steam doesnt work in wine 9.5 on apple silicon (working on native x86) HOT 1
- Successfully initiated a Debian X86 container with box64 HOT 1
- Error compiling box64 0.2.8 with GCC 13.3.0 within Buildroot HOT 6
- visual novel games dowloaded in itch.io HOT 3
- (Ark Survival Ascended) Unimplemented Opcode (C0 D1 48 06) HOT 1
- Unimplemented function propsys.dll.VariantToString HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from box64.