Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upSegfault after Main Menu #17714
Comments
OneManEquipe
changed the title
Segfault after data load
Segfault after Main Menu
Jul 17, 2016
This comment has been minimized.
This comment has been minimized.
|
Small update: the problem occurs on other Macs too, I tried the latest Jenkins build (5254) on another Mac (El Capitan) and the same crash happened. I also tried the Curses build, with the same results. |
This comment has been minimized.
This comment has been minimized.
pollodigomma
commented
Jul 17, 2016
•
|
Process: cataclysm-tiles [19017] Date/Time: 2016-07-17 16:56:53.443 +0200 Sleep/Wake UUID: 9E3B02B6-7A60-463B-B813-386F293976AE Time Awake Since Boot: 54000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Thread 0 Crashed:: Dispatch queue: com.apple.main-thread Thread 1: Thread 2:: Dispatch queue: com.apple.libdispatch-manager Thread 3: Thread 4:: SDLTimer Thread 5: Thread 6: Thread 7:: com.apple.NSEventThread Thread 0 crashed with X86 Thread State (64-bit): Logical CPU: 0 Binary Images: External Modification Summary: VM Region Summary:
REGION TYPE SIZE COUNT (non-coalesced) Model: MacBookAir4,2, BootROM MBA41.0077.B14, 2 processors, Intel Core i5, 1,7 GHz, 4 GB, SMC 1.73f66 |
illi-kun
added
the
<Crash / Freeze>
label
Jul 17, 2016
This comment has been minimized.
This comment has been minimized.
|
Another update: I've done a few builds and the culprit seems to be commit 65ccc57 . Also, commit 65ccc57 is the one that introduces a call to npc_class::finalize_all() in the init.cpp file, which a comment describes as "Horrible - can't be done better?". |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 25, 2016
|
Could you please compile a debug version, so everybody could see the call stack and know which place causes the crash. |
This comment has been minimized.
This comment has been minimized.
|
Uhm.. Can you help me with that? Where do I find the call stack? |
OneManEquipe
closed this
Jul 25, 2016
OneManEquipe
reopened this
Jul 25, 2016
This comment has been minimized.
This comment has been minimized.
|
Sorry, I closed it by mistake.. |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 25, 2016
|
Launch cataclysm within the debugger by |
This comment has been minimized.
This comment has been minimized.
|
This is all I got: lldb output.txt (I'm uploading it as a file because it displays wrong if I paste it here directly). As before, I compiled with: |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 25, 2016
|
Sorry forgot to tell you, you'd better compile with |
This comment has been minimized.
This comment has been minimized.
|
It still doesn't know function names, for some reason. Am I doing something wrong? |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 25, 2016
•
|
Weird. How about building in this way:
If you see |
This comment has been minimized.
This comment has been minimized.
|
With the Now I have tried omitting that and compiled it with And.. It works T_T no segfault this time. Here is the build output, I don't know if it can be useful: debug build output.txt |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 25, 2016
|
Oh it is weird, crash on release builds, no problem on debug builds. A compiler optimization bug? |
This comment has been minimized.
This comment has been minimized.
|
Yeah, that seems likely. But I'm not a C++ developer, so I have no idea how to look for a solution. But if you, or anyone else, needs somebody with a Mac to test potential solutions, I'm available. |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 27, 2016
|
Tried with
|
This comment has been minimized.
This comment has been minimized.
|
For some reason I cannot compile with |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 27, 2016
|
I installed Mac OS X 10.11.6 just a few hours ago, and I can reproduce this crash.
That's easy to resolve, with Homebrew package manager, install it by
You mean with |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 27, 2016
|
So terrible. The program executes perfectly in debug version, only crashes in release version. Although I tried to generate debug information inside the release version binary by that dirty hack, lots of important variable are optimized out, and a lot of functions are inlined....
|
This comment has been minimized.
This comment has been minimized.
|
Thanks about the tip, now it compiles with your settings. I'm on OS X 10.11.5 and I get no crash even with localization (using the options above, I still crash with a release build). I'll update to 10.11.6 and see if I get your results. Also it might be worth to check whether commit 67d8e1f is still the last working one and 65ccc57 still the first to crash. |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 27, 2016
|
Thanks for your update. Now I give up debugging, begin to statically checking the code. |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 27, 2016
|
I installed GCC 6.1.0 compiler, and the binary built by GCC has no problem, either debug or release. |
This comment has been minimized.
This comment has been minimized.
|
Cool! Does the Jenkins build work for you? If not, maybe it should be changed to build with GCC? |
This comment has been minimized.
This comment has been minimized.
|
Ok I tried on my Mac too, I can confirm that it works perfectly with |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 28, 2016
|
However, binary produced by GCC on Mac OS X since 4.9 is not debuggable. |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 28, 2016
•
|
GNU's compilers and debuggers aren't very acclimatized on OS X, I personally feel. When building tests, it produces massive So there are two solutions for this issue:
|
This comment has been minimized.
This comment has been minimized.
|
It looks like the crash happens because of map addressing. |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Jul 28, 2016
|
Tried with LLVM/Clang 3.8.1. Also crashes.
|
This comment has been minimized.
This comment has been minimized.
slater
commented
Aug 1, 2016
|
Any update on this? I'd really like to play the binaries posted at http://dev.narc.ro/cataclysm/jenkins-latest/OSX/Tiles/ :/ |
This comment has been minimized.
This comment has been minimized.
|
"Release debugging" is kinda hard to do... I can only suggest tests, but I can't fix it myself since I don't have mac os anywhere nearby. Since the crashing line seems to be
It could be tested by extracting the
The double debugmsg would help catch a possible crash with initialization. |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Aug 1, 2016
|
Two IDs are identical.
|
This comment has been minimized.
This comment has been minimized.
|
Options I see:
|
This comment has been minimized.
This comment has been minimized.
ghost
commented
Aug 3, 2016
|
Oh you're right @Coolthulhu ! I printed the address of that |
This comment has been minimized.
This comment has been minimized.
fubeca
commented
Aug 8, 2016
|
I can confirm that the bug is still present on my Macbook Pro running El Capitan 10.11. Compiling the lastest version with "make NATIVE=osx OSX_MIN=10.11 TILES=1 SOUND=1 LOCALIZE=0 CLANG=1 LUA=1 FRAMEWORK=1 RELEASE=1 USE_HOME_DIR=1 DEBUGINFO=1" It crashes at world gen with the following back trace:
Since we're suspicious of optimization by the compiler as the culprit, I compiled the source using the "-O3", "-O2", and "-O1" optimization flags, each in turn. The crash was present each time with the same backtrace. Using "-O0" (optimizations off?) resulted in a functioning binary. |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Aug 8, 2016
|
Fixed in my #17898 , but hasn't been merged by core developers yet. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This bug is now fixed via #18092 . |
OneManEquipe commentedJul 16, 2016
In the latest experimental builds the game crashes with a SIGSEGV as soon as I enter character creation or load a game.
The issue is only present in latest builds, I currently play build 5194 which is version 0.C-16370-g75a3362 with no crashes.
I've been using the tiles version on OS X 10.11 (El Capitan), both from the Jenkins build, homebrew install and building from source myself.
Here is a screenshot of the last thing I see before the crash.
Here is the debug log from the game:
debug.log.txt
And here is the crash report from the OS:
Crash Report.txt