Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Crash at function Blit_3or4_to_3or4__same_rgb #9332

Closed
arnzel opened this issue Mar 22, 2024 · 3 comments
Closed

Crash at function Blit_3or4_to_3or4__same_rgb #9332

arnzel opened this issue Mar 22, 2024 · 3 comments
Labels
waiting Waiting on user response
Milestone

Comments

@arnzel
Copy link

arnzel commented Mar 22, 2024

Hi i tried ton run some old dos game The Clou (https://github.com/vcosta/derclou) with jnr-ffi. This game use SDL libary for graphics and other functions (https://www.libsdl.org/) . I try to run this game with Java and the jnr-ffi library (https://github.com/jnr/jnr-ffi Java Abstracted Foreign Function Layer). But it seems to crash when invoking the function "Blit_3or4_to_3or4__same_rgb".

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libSDL2-2.0.0.dylib+0x86367] Blit_3or4_to_3or4__same_rgb+0x1ff
C [libSDL2-2.0.0.dylib+0x6c4ac] SDL_SoftBlit+0x135
C [libSDL2-2.0.0.dylib+0xa0725] SDL_ConvertPixels_REAL+0x2b4
C [base.so+0x12651] gfxSetRGB+0x91
C [base.so+0x12012] gfxInit+0x6f2
C [base.so+0x8266] main+0x336

Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000010927d128
Exception Codes: 0x0000000000000002, 0x000000010927d128

Maybe you can help me to understand where the problem can be. I have completely no idea if this is a problem of the JVM,jnr-ffi or the sdl library.

See also jnr/jnr-ffi#344

@slouken
Copy link
Collaborator

slouken commented Mar 22, 2024

SDL should never crash internally with valid input. What version of SDL are you using? Are you able to build a debug version of the latest release and try it with that?

@1bsyl
Copy link
Contributor

1bsyl commented Mar 22, 2024

you can force to use the slow_blit_function by modifying SDL
https://github.com/libsdl-org/SDL/blob/main/src/video/SDL_blit.c#L280
(#define TEST_SLOW_BLIT 1)
and see if this still crashes ...

@slouken slouken added this to the 3.2.0 milestone May 23, 2024
@slouken slouken added the waiting Waiting on user response label May 23, 2024
@slouken
Copy link
Collaborator

slouken commented Oct 6, 2024

No response, I'll go ahead and close this for now. Please let us know if it's still an issue.

@slouken slouken closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
waiting Waiting on user response
Projects
None yet
Development

No branches or pull requests

3 participants