svkaiser / Doom64EX

Doom64EX is a reverse-engineering project aimed to recreate Doom64 as close as possible with additional modding features.
http://doom64ex.wordpress.com/
GNU General Public License v2.0
243 stars 49 forks source link

"Illegal Instruction 4" when attempting to run in OS X 10.11.5 #15

Closed DieMatratze closed 7 years ago

DieMatratze commented 8 years ago

When I attempt to run the Mac port of Doom 64 EX version 2.4 in the Terminal, this is what I get:

Z_Init: Init Zone Memory Allocator
CON_Init: Init Game Console
G_Init: Setting up game input and commands
M_LoadDefaults: Loading game configuration
G_GetConfigFileName: using config file '/Users/XXXXXXX/.doom64ex/config.cfg'
I_Init: Setting up machine state.
Illegal instruction: 4

EDIT: I've also included the complete crash report: doom64ex_2016-05-25-223716.txt

According to this "Illegal instruction" means the binary contains instructions my OS does not understand. I've tried using the fix described in that link, adding "-mmacosx-version-min=10.x" to the command, with progressively lower and lower values for x, but to no avail.

For reference, I am running Mac OS X El Capitan (10.11.5) on a mid-2010 13" MacBook Pro. I have a 2.4 GHz Intel Core 2 Duo processor, 4 GB 1067 MHz DDR3 RAM, and an NVIDIA GeForce 320M 256 MB graphics card.

This is apparently an issue that afflicts other OS X users according to these topics. It wouldn't be so bad if we knew what Doom 64 EX's current status is. Your last post on the subject was just over two years ago, where you said version 2.6 would be available sometime that month, and the Dropbox link for the pre-release is currently broken. Otherwise, I could at least use Wineskin to run the Windows executable (2.5 prevents me from saving unless the game is set to a 4:3 aspect ratio).

Your last post in general was on December 15, 2015, and the silence is unbearable. Please, at least let us know the status of the project. It would be enough to know some kind of timeline, even if actual updates are a ways off.

pinkwah commented 8 years ago

Hey. I'm kind-of sort-of the current maintainer of this project.

I was hoping to keep quiet and quickly push out 2.6, however that obviously didn't work out. I'll make a post about it on the forums.

Yes, the OS X version is broken as of El Capitan. I'd love to get it fixed, but I don't have access to a Mac, sadly.

How does 2.5 prevent you from saving? Does it crash? What resolution are you using?

Thanks for the bug report.

DieMatratze commented 8 years ago

I attempted to run the game at 1280x800, my native resolution, but it crashed when I tried to save. Saving works fine at 1024x768, however.

Here is a crash log from when I test ran 2.5 this morning: CRASHLOG.TXT

Also, I found these warning lines in the console-esque window that shows up before the game proper starts. I thought they might shed some light on the issue.

WARNING: GL_RegisterProc: Failed to get proc address: glLockArraysEXT
WARNING: GL_RegisterProc: Failed to get proc address: glUnlockArraysEXT

EDIT: I decided to run the Mac Doom 64 EX through lldb in Terminal. This is what appears after the "Setting up machine state" step:

Process 5083 stopped

* thread #1: tid = 0x19724, 0x00000001002ce4fe libSDL-1.2.0.dylib`SDL_VideoInit + 210, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x00000001002ce4fe libSDL-1.2.0.dylib`SDL_VideoInit + 210
libSDL-1.2.0.dylib`SDL_VideoInit:
->  0x1002ce4fe <+210>: vxorps %ymm0, %ymm0, %ymm0
    0x1002ce502 <+214>: vextractf128 $0x1, %ymm0, %xmm1
    0x1002ce508 <+220>: vmovups %xmm1, 0x260(%r15)
    0x1002ce511 <+229>: vmovups %xmm0, 0x250(%r15)

It looks like there's something wrong with the libSDL-1.2.0 file? I'm unable to open .dylib files at the moment.

alexey-lysiuk commented 8 years ago

Apparently vxorps instruction requires AVX which is not available in Core 2 Duo you have. This means that SDL was built for newer CPUs, i.e. it was build for AVX instruction set but SSE3 should be used for compatibility reason. You can build SDL yourself and replace faulty .dylib within the application bundle.

pinkwah commented 8 years ago

You can try grabbing a binary from here and replacing it with the one from D64EX 2.4: https://www.libsdl.org/release/SDL-1.2.15.dmg

DieMatratze commented 8 years ago

Well, that's going to be quite the project, considering I know pretty much nothing about setting this stuff up, but hey, I need something to do on the long weekend. ;) Thanks for the help, I'll see what comes out of this.

alexey-lysiuk commented 8 years ago

The latest binary release of SDL 1.2 for OS X has bunch of bugs. I strongly recommend to build source code from its Mercurial repository. Of course try the provided binary first, maybe it won't cause any issues for you.

alexey-lysiuk commented 8 years ago

IIRC I had some troubles building SDL 1.2 on the recent Xcode like 7 or 6. I have 10.6 with Xcode 3.2.6 especially for building libraries with maximum compatibility and to build some broken things like old SDL.

In fact I can build the latest code from Mercurial's SDL 1.2 branch... But honestly I think it's better to fix the current Doom64EX to be able to compile it on OS X than to try to revive some outdated versions.

If #17 will be merged anybody can build own version by herself/himself using my build environment. Well, anybody who can install Xcode from AppStore and CMake from its website. I hope it's not a big deal.