Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] jgemu (jollygood) crashes.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 569
Location: Ásgarðr

PostPosted: Fri Feb 24, 2023 7:05 pm    Post subject: [SOLVED] jgemu (jollygood) crashes. Reply with quote

EDIT: Solved. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3537e031216808bf98fa5c220593d0c390dbe4e1

Hello,
I recently installed jollygood emulator but I'm unable to start any game. I tried on my main desktop (bdver2) and on my laptop (core2)
All I get is this (example) :

Code:
$ jollygood -v -w -c mednafen "Final Fantasy VI.sfc"
*** buffer overflow detected ***: terminated


I tried different emulator cores and different games, same result.
Any clue ? Or legit bug ?
live ebuild also crashes by the way (same error)

If anyone could try and tell me if it works for you, that would be great before I report it on the bug tracker.


Last edited by sdauth on Tue Mar 07, 2023 7:30 am; edited 4 times in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21639

PostPosted: Fri Feb 24, 2023 7:20 pm    Post subject: Reply with quote

Buffer overflow is always a bug. The only question is whether it is a bug in the application, or a bug in the compiler that built it. The latter has been very uncommon for many years. Please provide the output of emerge --verbose --info package-providing-jollygood, so that we can review how it was built.
Back to top
View user's profile Send private message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 569
Location: Ásgarðr

PostPosted: Fri Feb 24, 2023 9:30 pm    Post subject: Reply with quote

Code:
Portage 3.0.44 (python 3.10.9-final-0, default/linux/amd64/17.1/no-multilib/hardened, gcc-12, glibc-2.36-r5, 6.1.12-gentoo-hardened x86_64)
CFLAGS="-march=bdver2 -O2 -pipe"


jgrf-1.0.0 log
bsnes-jg-1.1.0 log
mednafen-jg-1.31.0 log

All other ebuilds (cores to use with jollygood) build flawlessly as well, no error.
Back to top
View user's profile Send private message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 569
Location: Ásgarðr

PostPosted: Fri Feb 24, 2023 9:46 pm    Post subject: Reply with quote

Found the problem.
You need to build jgrf with -D_FORTIFY_SOURCE=2 -U_GLIBCXX_ASSERTIONS.
There was a news item regarding this when I upgraded gcc 12 a month ago. Well, it seems to be the first package needing that :wink:

Added this to :
/etc/portage/env/fortifyfix
Code:
CFLAGS="${COMMON_FLAGS} -D_FORTIFY_SOURCE=2"
CXXFLAGS="${COMMON_FLAGS} -D_FORTIFY_SOURCE=2 -U_GLIBCXX_ASSERTIONS"


and :
/etc/portage/package.env/jgrf
Code:
games-emulation/jgrf fortifyfix


emerge -1 --usepkg=n jgrf

Now it starts fine 8)

EDIT :
Mmh. On my desktop (bdver2), no issue, no more crashes after fortifyfix applied as shown above. Game starts fine (windowed & fullscreen)
On the other hand, on my core2 system, I get this. (with both windowed & fullscreen option)
It seems to be related to libepoxy, which I compiled again for good measure, it still crashes though. Strange as it doesn't happen on my desktop...

Code:
jollygood -v -w -c mednafen "Final Fantasy VI.sfc"
D: Disc inserted: 0
D: Framebuffer width: 512, Framebuffer height: 480
D: Nominal width: 292, Nominal height: 224
i: Core: mednafen (Mednafen 1.31.0)
d: Core System: snes
d: Core Path: /usr/lib64/jollygood/mednafen.so
d: Core Asset Path: /usr/share/jollygood/mednafen
d: Creating window with dimensions: 876 x 672
w: Failed to create glcontext: No OpenGL context has been made current
jollygood: ../libepoxy-1.5.10/src/dispatch_common.c:872: epoxy_get_proc_address: Assertion `0 && "Couldn't find current GLX or EGL context.\n"' failed.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1678

PostPosted: Fri Mar 10, 2023 1:22 pm    Post subject: Reply with quote

For completeness, this was bug 896382. I'm not sure if OP reported it or someone else, but if you do need to temporarily apply a workaround, please file a bug for these. We want to know about them and fix them properly.

(It's also nice to see newly-added packages being used!)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum