Giter Club home page Giter Club logo

Comments (21)

CalcProgrammer1 avatar CalcProgrammer1 commented on July 23, 2024

I ran with BOX86_LOG=2 and captured the last few calls before the segfault:

2043|0x81061e5: Calling ftell (/lib/arm-linux-gnueabihf/libc.so.6) (A8C6ABA8, 084E5D23, F7351C69...) => return 0x066ABCA2
2043|0x8106e4d: Calling ftell (/lib/arm-linux-gnueabihf/libc.so.6) (A8C6ABA8, 084E5D23, F7351C69...) => return 0x066ABCA2
2043|0x81061e5: Calling ftell (/lib/arm-linux-gnueabihf/libc.so.6) (A8C6ABA8, 084E5D23, F7351C69...) => return 0x066ABCA2
2043|0x8106e4d: Calling ftell (/lib/arm-linux-gnueabihf/libc.so.6) (A8C6ABA8, 084E5D23, F7351C69...) => return 0x066ABCA2
2043|0xf61c77b7: Calling __libc_malloc (/lib/arm-linux-gnueabihf/libc.so.6) (0000000C, 00000000, 00000000...) => return 0xA8C72600
2043|0xf61c77b7: Calling __libc_malloc (/lib/arm-linux-gnueabihf/libc.so.6) (00000010, 00000000, 00000000...) => return 0xA8C72610
2043|0x829bfdb: Calling SDL_AllocRW (/usr/lib/arm-linux-gnueabihf/libSDL2-2.0.so.0) (F61C779C, A8C72600, F7351BD8...) => return 0xA8C72628
2043|0x82671d5: Calling my2_SDL_LoadWAV_RW (/home/adam/box86/build/box86) (A8C72628, 00000001, F7351B78...) =>Segmentation fault

from box86.

ptitSeb avatar ptitSeb commented on July 23, 2024

A nice. You run Bit Trip Runner :) (out of curiosity, is it fast enough to be playable on the Rock Pi 4B ?).

Now, Skullgirl... So it crash on my2_SDL_LoadWAV_RW? I'll see if I can reproduce, but I only have the Steam version of the game, not the DRM free one from HB, not sure I will be abble to reproduce. But I'll double check that SDL2 function.

from box86.

ptitSeb avatar ptitSeb commented on July 23, 2024

Also, can you do a gdb backtrace of the segfault?

from box86.

 avatar commented on July 23, 2024

I have the DRM-free version as well, as soon as I can get box86 built I can assist with testing

from box86.

 avatar commented on July 23, 2024

@CalcProgrammer1, what did you do about libSDL2_locale.so.0? It appears that it's some custom file, not included with normal SDL2.

from box86.

 avatar commented on July 23, 2024

Ah right, it's included in the game files (strangely, none of the other forum posts about this mention that...)

pi@raspberrypi:/media/pi/BF63-269B/SkullGirls $ BOX86_LD_LIBRARY_PATH=`pwd`/lib/i686-pc-linux-gnu ~/src/box86/build/box86 SkullGirls.i686-pc-linux-gnu 
BOX86_LD_LIBRARY_PATH: /media/pi/BF63-269B/SkullGirls/lib/i686-pc-linux-gnu/
Using default BOX86_PATH: ./:bin/
Counted 45 Env var
Looking for SkullGirls.i686-pc-linux-gnu
Using native(wrapped) libpthread.so.0
Using native(wrapped) libSDL2-2.0.so.0
Using native(wrapped) libSDL2_mixer-2.0.so.0
Using emulated /media/pi/BF63-269B/SkullGirls/lib/i686-pc-linux-gnu/libSDL2_locale.so.0
Using native(wrapped) libm.so.6
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) librt.so.1
Error loading needed lib: "libstdc++.so.6"

I downloaded libstdc++ and libgcc1 from http://deb.debian.org/debian/pool/main/g/gcc-8/libstdc++6_8.3.0-6_i386.deb and http://deb.debian.org/debian/pool/main/g/gcc-8/libgcc1_8.3.0-6_i386.deb

I then used dpkg -x to extract the debs and put the .so files in the same path as the included SDL libraries.

pi@raspberrypi:/media/pi/BF63-269B/SkullGirls $ BOX86_LD_LIBRARY_PATH=`pwd`/lib/i686-pc-linux-gnu ~/src/box86/build/box86 SkullGirls.i686-pc-linux-gnu 
BOX86_LD_LIBRARY_PATH: /media/pi/BF63-269B/SkullGirls/lib/i686-pc-linux-gnu/
Using default BOX86_PATH: ./:bin/
Counted 45 Env var
Looking for SkullGirls.i686-pc-linux-gnu
Using native(wrapped) libpthread.so.0
Using native(wrapped) libSDL2-2.0.so.0
Using native(wrapped) libSDL2_mixer-2.0.so.0
Using emulated /media/pi/BF63-269B/SkullGirls/lib/i686-pc-linux-gnu/libSDL2_locale.so.0
Using native(wrapped) libm.so.6
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) librt.so.1
Using emulated /media/pi/BF63-269B/SkullGirls/lib/i686-pc-linux-gnu/libstdc++.so.6
Using emulated /media/pi/BF63-269B/SkullGirls/lib/i686-pc-linux-gnu/libgcc_s.so.1
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT @0xb5795198 (0x6b666)
Warning: Weak Symbol _ZGTtdlPv not found, cannot apply R_386_JMP_SLOT @0xb5795474 (0x6c1d6)
Warning, no wrapper for glDebugMessageCallback
Warning, no wrapper for glClearTexImage
Warning, no wrapper for glClearTexSubImage
..break..
Segmentation fault

Which gdb would I use to get a backtrace, @ptitSeb?

Note that on the Pi 4, even getting to this point takes 3 and a half minutes.

from box86.

ptitSeb avatar ptitSeb commented on July 23, 2024

Just a note that you can put native x86 libs in /usr/lib/i386-linux-gnu : that should be the standard folder for multiarch libs (and that way, you can ommit the BOX_LD_LIBRARY_PATH var). But maybe its i686-pc-linux-gnu and not i386 on your system?

To use gdb, you shoud use
/media/pi/BF63-269B/SkullGirls $ BOX86_LD_LIBRARY_PATH=pwd/lib/i686-pc-linux-gnu gdb --args ~/src/box86/build/box86 SkullGirls.i686-pc-linux-gnu
then type r to run and bt to get the backtrace when it segfault.

(The lack of DynaRec make the loading time of some games very long, I know. I'll work on a DynaRec eventualy.)

from box86.

 avatar commented on July 23, 2024
Thread 1 "box86" received signal SIGSEGV, Segmentation fault.
0xb40da7d0 in ?? () from /usr/lib/arm-linux-gnueabihf/dri/vc4_dri.so
(gdb) bt
#0  0xb40da7d0 in ?? () from /usr/lib/arm-linux-gnueabihf/dri/vc4_dri.so
#1  0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

from box86.

ptitSeb avatar ptitSeb commented on July 23, 2024

This seems to be somewhere in the VC4 OpenGL driver. It could be interesting if you can try to run with software Mesa or gl4es, to see if the issue is specific to this driver or just box86 feeding incorrect GL data.

from box86.

ptitSeb avatar ptitSeb commented on July 23, 2024

Also, I can do some wrapper for the glClearTexImage and friends.

from box86.

 avatar commented on July 23, 2024

Over on my x86_64 machine with 32 bit libraries installed, I get "CRITICAL: Unable to create SDL Window", which is the same as what I get if I try to run it without box86!

from box86.

 avatar commented on July 23, 2024

I can't find the right function to break on in gdb, but it displays that error somewhere after

#1  0xf7e4681c in LOC_GetLanguageList () at /builddir/SkullGirls/tools/3rdParty/SDL2_locale/source/src/unix/SDL_syslocale.c:86
#2  0x08464ec0 in PickBestLanguage(char const**, int) ()
#3  0x084153cc in Localizer::SetDefaultLocale() ()
#4  0x081ae41b in GameState::Init(std::string const&) ()
#5  0x084614f4 in main ()

I don't think this is a box86 issue, but I'd have to run a full i386 version of Ubuntu to work it out...

from box86.

 avatar commented on July 23, 2024

How would I load a different graphics driver for this on the Pi?

from box86.

ptitSeb avatar ptitSeb commented on July 23, 2024

I don't know, I don't have any Pi. I think there are some environment variable with Mesa to force software backend, but I'm not sure it does work here.

from box86.

 avatar commented on July 23, 2024

Got it, I think - LIBGL_ALWAYS_SOFTWARE=1 from https://www.mesa3d.org/envvars.html

from box86.

 avatar commented on July 23, 2024

Hah! Just when I was going to give up, it gets through the intros and then segfaults when using the software renderer.

I wonder if glDebugMessageCallback would have any useful info?

warning: JITed object file architecture armv8-a is not compatible with target architecture armv6.
warning: JITed object file architecture armv8-a is not compatible with target architecture armv6.
warning: JITed object file architecture armv8-a is not compatible with target architecture armv6.
warning: JITed object file architecture armv8-a is not compatible with target architecture armv6.
warning: JITed object file architecture armv8-a is not compatible with target architecture armv6.
warning: JITed object file architecture armv8-a is not compatible with target architecture armv6.
warning: JITed object file architecture armv8-a is not compatible with target architecture armv6.
warning: JITed object file architecture armv8-a is not compatible with target architecture armv6.
warning: JITed object file architecture armv8-a is not compatible with target architecture armv6.
warning: JITed object file architecture armv8-a is not compatible with target architecture armv6.

Thread 12 "SDLAudioP2" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x994b2450 (LWP 1597)]
Run (emu=0x973effe0) at /home/pi/src/box86/src/emu/x86run.c:828
828	            NEXT;
(gdb) bt
#0  Run (emu=0x973effe0) at /home/pi/src/box86/src/emu/x86run.c:828
#1  0xa802388c in EmuCall (emu=emu@entry=0x973effe0, addr=<optimized out>)
    at /home/pi/src/box86/src/emu/x86emu.c:343
#2  0xa800ae50 in RunCallback (emu=0x973effe0)
    at /home/pi/src/box86/src/tools/callback.c:164
#3  0xb5f5addc in ?? ()
   from /usr/lib/arm-linux-gnueabihf/libSDL2_mixer-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) 

2019-09-15-203943_1284x752_scrot

from box86.

ptitSeb avatar ptitSeb commented on July 23, 2024

Ah, so there is an issue with the VC4 driver...

And in box86 too it seems. Crash in a callback, from sdl2_mixer, ok. I need to try my Steam version, maybe it'll work.

from box86.

 avatar commented on July 23, 2024

Gets further on the x86 machine - into the menus

#0  Run (emu=0xaa149d60) at /usr/src/box86/src/emu/x86run.c:828
#1  0xa80473da in EmuCall (emu=0xaa149d60, addr=136742560) at /usr/src/box86/src/emu/x86emu.c:343
#2  0xa802da39 in RunCallback (emu=0xaa149d60) at /usr/src/box86/src/tools/callback.c:164
#3  0xa80927f4 in sdl2ChannelFinishedCallback (channel=0) at /usr/src/box86/src/wrapped/wrappedsdl2mixer.c:189
#4  0xf6ffa842 in ?? () from /usr/lib/i386-linux-gnu/libSDL2_mixer-2.0.so.0
#5  0xf6ffb194 in ?? () from /usr/lib/i386-linux-gnu/libSDL2_mixer-2.0.so.0
#6  0xf791050e in ?? () from /usr/lib/i386-linux-gnu/libSDL2-2.0.so.0
#7  0xf795e0c6 in ?? () from /usr/lib/i386-linux-gnu/libSDL2-2.0.so.0
#8  0xf79cac68 in ?? () from /usr/lib/i386-linux-gnu/libSDL2-2.0.so.0
#9  0xf7e88004 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#10 0xf7d9fa16 in clone () from /lib/i386-linux-gnu/libc.so.6

from box86.

ptitSeb avatar ptitSeb commented on July 23, 2024

Is Skullgirlz working now, and this ticket be closed?

from box86.

mxd1365 avatar mxd1365 commented on July 23, 2024

Did anybody get SkullGirls to work?

from box86.

ptitSeb avatar ptitSeb commented on July 23, 2024

Skullgirls on Steam is only 64bits now. There is no 32bits binary anymore.

But it does work with box64
image

I propose this ticket be closed.

from box86.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.