Results 1 to 9 of 9
  1. #1
    EmuTalk Member
    Join Date
    Oct 2007
    Posts
    7

    Mupen (32 bits) crashes @ x86_64 platform

    Hi,



    I have Ubuntu 7.04 64 bits OS installed and I'm trying to run Mupen on this environment. I think I have all the 32 bits libraries correctly installed (gtk, sdl, etc.), Mupen doesn't complain about anyone. But when I try to run a game, Mupen crashes.

    It doesn't crash if I turn off the dynamic recompiler (using Interpreter).

    I already know that dynamic recompiler needs to be rewritten for the 64 bits platform; but since I'm running the 32 bits version, I have no idea about why is it crashing, since mupen should be running in compatibility mode just like any other 32 bits process.

    Any help would be appreciated, I would like to able again to play my games (many games works badly in interpreter mode).


    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  2. #2
    Moderator Hacktarux's Avatar
    Join Date
    Nov 2001
    Location
    France
    Posts
    1,174
    Maybe the problem is the nx bit protection.

    Try to disable it and see if it changes something:
    http://www.cyberciti.biz/faq/what-is...re-execshield/

  3. #3
    EmuTalk Member
    Join Date
    Oct 2007
    Posts
    7
    Great! It worked!

    I wasn't able to disable NX bit protection using the command you gave me, tough. I disabled it in my motherboard's BIOS.

    I'll search if there's a way to disable it only for one application (like under Windows), because I would not like to disable it system-widely just because one program. Please, if anyone knows how to do this, post here. I'll do the same if I find how.

    Hactarux, do you think this problem is easy to fix for the 32-bit version? Would the 64-bit version have this problem?

    Thank you for the attention.

  4. #4
    Moderator Hacktarux's Avatar
    Join Date
    Nov 2001
    Location
    France
    Posts
    1,174
    I don't know how to disable it for one application. I will check how to solve this problem, my main concern is to not break portability to other operating systems.

  5. #5
    EmuTalk Member
    Join Date
    Oct 2007
    Posts
    1
    You can use the execstack tool from the prelink package to disable the NX protection (i.e. making the stack executable) for one application. After running the following command the dynamic recompiler worked for me
    Code:
    execstack -s /usr/games/bin/mupen64_nogui
    Last edited by svpe; October 14th, 2007 at 19:53.

  6. #6
    Moderator
    Join Date
    Oct 2007
    Posts
    473
    I also have this problem - on both a Gentoo Athlon64 system and a Core 2 duo mobile running Fedora 8 test 3. I have mupen64 v0.5 and had to modify the makefile to force 32-bit compilation and linking, but the emulator runs with the interpreter or pure interpreter.

    I ran it with --emumode 2 on the core 2 duo in a debugger (gdb) and caught the exception. It jumped from a 0x0800xxxx memory address (dyna_start()) to a 0x09f9xxxx address, which was readable but (I guess?) not executable. I disassembled starting at the current program counter from the crash (the 0x09f9 address) and it was 3 instructions repeating over and over making calls to indirect functions. It looked like a state machine.

    I have the kernel loaded with 'exec-shield=0' and sysctl shows it to be off, so that kernel feature shouldn't be a problem. I also set the memory protection settings in SELinux to the most permissive. But still it crashes.

  7. #7
    Mupen64Plus Dev.
    Join Date
    Oct 2007
    Location
    Michigan (United States of America)
    Posts
    448
    Code:
    execstack -s /usr/games/bin/mupen64_nogui
    YES!!!

    This fixes MY recompiler problem. I installed a libselinux.so.0 rpm, a libelf.so.1 rpm, and Debian's prelink package and the command to get this successfully working. I may release a couple scripts that do this(One for i386 and one for AMD64, and regardless of if you have the necessary files) but the 32bit version of it should be considered dangerous (Though not much wrong it can do as long as you got the right version)

    BTW, I grabbed a bunch of random packages for many different Linux distros to do this - proof that dependency hell is beginning to disappear for libraries using proper versioning convention to separate the ABI incompatibility. In fact, i didn't use one native package to do this. (I happen to run Gentoo. Which means normally the exact command would've worked after installing the packages for the official Mupen64 packages, but i build from source so it would be slightly different. I also don't install, so its dramatically different XD)

  8. #8
    Moderator
    Join Date
    Oct 2007
    Posts
    473
    Great, that fixes mine too!

  9. #9
    EmuTalk Member
    Join Date
    Oct 2007
    Posts
    7
    Worked for me also!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •