Comments (27)
Good news on my end too. I was able to do a full 4 laps on Mediterranean track, and no crashes. Thank you so much for your help.
Need For Speed II SE
Wrapper v1.3.8
Game v1.1.4-cpp_r2
OpenGL ES 2
arm_release_ver: g13p0-01eac0, rk_so_ver: 3
Joystick "retrogame_joypad" opened at system index: 0 at index: 0 at: /dev/input/event3
I'll continue testing, and update this issue if anything changes. Have a wonderful night!
from nfsiise.
Ok, I'll check if I can align floats/doubles, but tomorrow!
from nfsiise.
@edemirkan @porschemad911 Could you check align
branch? Please do not forget to update git submodule! The version is 1.1.4-cpp_r2
.
from nfsiise.
The bus error comes from (compile with -O0
):
int main()
{
char data[16] = {}; // address of `data` is dividible at least by `4` on stach (compiler must ensure it)
auto &f = *(float *)&data[1]; // `f` is a reference, address of `f` is not dividible by `4` which is needed here
f = 123.0f; // bus error
return 0;
}
from nfsiise.
@porschemad911 Added as Joystick0DPadButtons
and Joystick1DPadButtons
!
from nfsiise.
Any ideas what might be the issue ? Any suggestions what can I check further?
Could you upload the "release" binary?
from nfsiise.
Ah and second thing, try compile in debug with flags: FLAGS="-Og -g"
- if it crashes, upload it, too.
from nfsiise.
Please find release attached
Need For Speed II SE
Wrapper v1.3.8
Game v1.1.4-cpp_r1
OpenGL ES 2
arm_release_ver: g13p0-01eac0, rk_so_ver: 3
Joystick "retrogame_joypad" opened at system index: 0 at index: 0 at: /dev/input/event3
Application closed with a signal: 7
/storage/roms/ports/Need For Speed II SE.sh: line 59: 8024 Bus error $GAMEDIR/nfs2se
I'll check debug now...
from nfsiise.
Debug crashed too with FLAGS="-Og -g"
. Please find attached the binary.
Need For Speed II SE
Wrapper v1.3.8
Game v1.1.4-cpp_r1
OpenGL ES 2
arm_release_ver: g13p0-01eac0, rk_so_ver: 3
Joystick "retrogame_joypad" opened at system index: 0 at index: 0 at: /dev/input/event3
Application closed with a signal: 7
/storage/roms/ports/Need For Speed II SE.sh: line 59: 9813 Bus error $GAMEDIR/nfs2se
FLAGS="-O0 -g"
is still working, but super slow.
from nfsiise.
Hmm, I used your binary and completed one race on R-Pi 4 without problems. What should I do to reproduce? Any settings, gamepads, wheels?
from nfsiise.
Completed another race with gamepad.
from nfsiise.
Also tried on very old HTC Sensation Android phone - runs stable.
from nfsiise.
If you can crash -Og -g
, try running through gdb
and check bt
and disassemble
on crash.
from nfsiise.
I see. I'm running this on a device called RGB30, which is based on a RK3566 SoC and running an OS called JELOS This port is installed through a tool called PortMaster There might all sorts of issues, my cpu/gpu acting weird, or buggy lib32 libs. Thanks for your help on testing this so far, and at least we were able set a baseline with rpi4 and verified this was a problem on my end. I'll try the gdb method you suggested and let you know of my findings.
from nfsiise.
Ok, I see.
Bus error is by misalignment of game data in this wrapper. Float numbers must have address divisible by 4 for ARM's VFP, but here it's not, that's why I copy them to aligned stack and use them there (volatile
is doing the job, prevents compiler optimizing this part). But in your case there must be still an unaligned access somewhere. Maybe this CPU is more sensible to this?
from nfsiise.
When do you have crash? Just after loading a race?
from nfsiise.
If I use the binary provided by Portmaster as is, I get a crash during the game, not on startup - after 30-40sec e.g the first downhill in Mediterranean track.
Here's the link to that binary. https://github.com/PortsMaster/PortMaster-New/blob/main/ports/nfs2se/nfs2se/nfs2se
Now I'm not sure how that's compiled, but I know it's using an older version of your code.
If I use the latest from the master and compile myself, as I posted the binaries above - the crash just happens on game startup - just black screen, and then nothing.
Referring to a previous issue I was able to run it, but getting a crash in the game during a race. Again using an older version of your game.
Wrapper v1.3.0
Game v1.1.2-cpp_r5
OpenGL ES 2
from nfsiise.
I'm not sure if this information is useful, but every bit might help.
@edemirkan is using a Rockchip BSP 4.19 kernel plus Mali GPU drivers and KMS/DRM with their Powkiddy RGB30 on JELOS.
I am using a 6.7 mainline Linux kernel plus Panfrost GPU drivers and Weston / Wayland with my Odroid Go Ultra on JELOS.
Using the same binary (older version plus texturing and GLES2 renderer fix cherry-picked) here: #112 (comment)
I do not have any crashes, runs perfectly, while @edemirkan gets crashes in-race.
from nfsiise.
I'll check your branch shortly. This following was what I got from debug -Og -g
you previously asked.
(gdb) file ./nfs2se
Reading symbols from ./nfs2se...
(gdb) run
Starting program: /storage/roms/ports/nfs2se/nfs2se
warning: Unable to determine the number of hardware watchpoints available.
warning: Unable to determine the number of hardware breakpoints available.
warning: Loadable section "" outside of ELF segments
in /usr/lib32/libGLESv2.so.2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Need For Speed II SE
Wrapper v1.3.8
Game v1.1.4-cpp_r1
OpenGL ES 2
[New Thread 0xf10441a0 (LWP 10425)]
[New Thread 0xec71b1a0 (LWP 10426)]
[New Thread 0xeb9fd1a0 (LWP 10431)]
arm_release_ver: g13p0-01eac0, rk_so_ver: 3
[New Thread 0xeafff1a0 (LWP 10435)]
[New Thread 0xea7fe1a0 (LWP 10437)]
[New Thread 0xe9ffd1a0 (LWP 10438)]
[New Thread 0xe97fc1a0 (LWP 10439)]
[New Thread 0xe8ffb1a0 (LWP 10440)]
[New Thread 0xe87fa1a0 (LWP 10441)]
[New Thread 0xe7eb11a0 (LWP 10443)]
[New Thread 0xe75271a0 (LWP 10444)]
[New Thread 0xe6c251a0 (LWP 10445)]
[New Thread 0xe63231a0 (LWP 10446)]
Joystick "retrogame_joypad" opened at system index: 0 at index: 0 at: /dev/input/event3
Thread 4 "nfs2se" received signal SIGBUS, Bus error.
[Switching to Thread 0xeb9fd1a0 (LWP 10431)]
Application::get64f<signed char*> (addr=0x7189d6 <_data+16478> "") at Cpp/NFS2SE.cpp:291
291 Cpp/NFS2SE.cpp: No such file or directory.
(gdb)
from nfsiise.
This following was what I got from -Og -g
Bus error in get64f
- hmm. Could you use execute bt
and disassemble
commands? Just for curiosity (I hope align
branch will work...)
Edit: I removed get64f
in align
branch anyway 😄
from nfsiise.
(gdb) bt
#0 Application::get64f<signed char*> (addr=0x7189d6 <_data+16478> "") at Cpp/NFS2SE.cpp:291
#1 0x006d40a0 in Game::_sub_4BC250 (this=this@entry=0x14951a8) at Cpp/NFS2SE.cpp:241721
#2 0x006be100 in Game::_sub_4B77E0 (this=this@entry=0x14951a8) at Cpp/NFS2SE.cpp:240662
#3 0x00673bf0 in Game::_sub_4A7028 (this=this@entry=0x14951a8) at Cpp/NFS2SE.cpp:228718
#4 0x00673914 in Game::_sub_488928 (this=0x14951a8) at Cpp/NFS2SE.cpp:197744
#5 0x006ee0f0 in Application::call<int> (this=this@entry=0x14951a8, addr=16478) at Cpp/NFS2SE.cpp:360
#6 0x00659f34 in Game::_sub_481590 (this=0x14951a8) at Cpp/NFS2SE.cpp:188494
#7 0x006ed23c in wrap_stdcall4 (game=..., func=0x659af4 <sub_481590(Game*)>, arg0=<optimized out>, arg1=<optimized out>, arg2=0, arg3=0) at Cpp/NFS2SE.cpp:248901
#8 0x006f059c in DispatchMessageA_wrap (this=0x7189d6 <_data+16478>, msg=<optimized out>) at User32.c:357
#9 0x006593a4 in Game::_sub_481080 (this=0x14951a8) at Cpp/NFS2SE.cpp:188402
#10 0x0041cca8 in threadFunction (data=0x1483d90) at Kernel32.c:230
#11 0xf7ee66e4 in ?? () from /usr/lib32/libSDL2-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) disassemble
Dump of assembler code for function _ZN11Application6get64fIPaEEdT_:
0x006edf14 <+0>: sub sp, sp, #8
=> 0x006edf18 <+4>: ldrd r0, [r0]
0x006edf1c <+8>: strd r0, [sp]
0x006edf20 <+12>: vldr d0, [sp]
0x006edf24 <+16>: add sp, sp, #8
0x006edf28 <+20>: bx lr
End of assembler dump.
from nfsiise.
So you have bus error on ldrd
when copying from unaligned to aligned place 😅 I didn't expect that. It can be workarounded for sure, but let's try align
branch and fix everything there (if it'll still crash somewhere e.g. on loading integers).
Edit: Maybe I shouldn't use union
, but use volatile
on byte array and copy it byte-by-byte 😄
from nfsiise.
Attached binary recompiled from align
branch works fine, no crashes for me.
Log:
ogu_panfrost:~/roms/ports/nfs2se # cat ./log.txt
'/storage/.nfs2se' -> '/roms/ports/nfs2se/conf/.nfs2se'
Need For Speed II SE
Wrapper v1.3.8
Game v1.1.4-cpp_r2
OpenGL 2
Joystick "GO-Ultra Gamepad" opened at system index: 0 at index: 0 at: /dev/input/event2
@edemirkan how is it for you?
from nfsiise.
@porschemad911 Nice!
@edemirkan If it will crash in FnInl(void) fild(const T &val)
function let me know with bt
and disassmeble
, so I'll do byte-by-byte copy tomorrow!
from nfsiise.
@zaps166 As an aside, I notice you've removed the Joystick0Buttons
setting in nfs2se.conf
. Any particular reason for this? I was using it to disable d-pad buttons, ie 8 - 11 on my device:
Joystick0Buttons=0,1,2,3,4,5,6,7,-1,-1,-1,-1,12,13,14
I then assigned these d-pad buttons to keyboard arrow keys via the gptokeyb keyboard mapper. This just made it easy to navigate menus with the d-pad but use the analogue stick for steering via in-game axis mapping. The stick does work fine for menu navigation, but it's a bit clunky vs the d-pad.
Not a big deal of course, just wondering ... and thank you for all your work!
from nfsiise.
As an aside, I notice you've removed the Joystick0Buttons setting in nfs2se.conf. Any particular reason for this? I was using it to disable d-pad buttons, ie 8 - 11 on my device:
I removed it when introduced 32 buttons fix (see #104). I thought it's no longer needed to map buttons, because 32 is enough, but I forgot it might be used to disable buttons 😅
I can restore it as Joystick0ButtonsEnabled=1,1,1,1,....
or provide something else like Joystick0DPad=1,4,6,8
?
Good to hear, thanks for testing!
from nfsiise.
@zaps166 Something like Joystick0DPad=1,4,6,8
would be perfect. From the name I'm guessing it would be automatically map these buttons to directional inputs in-game?
from nfsiise.
Related Issues (20)
- execvp: No such file or directory. HOT 6
- If i try to start nfs2se.exe Error message: MOVIE FILE NOT FOUND HOT 4
- game not running HOT 1
- Possiblity to turn off texture filtering
- Add support for cockpits HOT 2
- Lag issue while playing HOT 3
- Question about the stf files in .nfs2se/stats/ HOT 2
- Original game bug: Gamepads with more than 15 buttons can't bind buttons HOT 18
- Implementing online sync HOT 4
- Wrong special chars in other langs HOT 1
- Error while launching HOT 15
- Widescreen support? HOT 2
- NFSIISE on a Mac HOT 4
- [Linux Mint DE 6] Works like butter but no audio HOT 3
- Help compiling APK HOT 40
- gles2 renderer - GLSL shader compilation error (aarch64 Linux / Panfrost) HOT 15
- 3D Glasses Fix: Question about adding Direct3D support (3rash/Thrash API) HOT 15
- Feature request: Use DPAD (HAT/POV) HOT 5
- Compilation error due to SDL2 not updated HOT 2
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 nfsiise.