trunk 8377 MacOSX 10.12 assertion failure on FullscreenMenuAbout()

Bug #1697242 reported by Ken Cunningham
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

Process: widelands [36659]
Path: /Applications/MacPorts/Widelands.app/Contents/MacOS/widelands
Identifier: org.widelands.wl
Version: 20170607
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: widelands [36659]
User ID: 501

Date/Time: 2017-06-10 19:53:11.525 -0700
OS Version: Mac OS X 10.12.5 (16F73)
Report Version: 12
Anonymous UUID: F49C63B1-A38B-D268-55E1-E7224AAAFF41

Sleep/Wake UUID: AD37BEF3-6083-4AEA-8329-0C5EF965E641

Time Awake Since Boot: 17000 seconds
Time Since Wake: 11000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
Assertion failed: (nh >= 0), function set_size, file /opt/local/var/macports/build/_opt_myports_games_widelands/widelands-devel/work/widelands-20170607/src/ui_basic/panel.cc, line 242.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fffa6bfdd42 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fffa6ceb457 pthread_kill + 90
2 libsystem_c.dylib 0x00007fffa6b63420 abort + 129
3 libsystem_c.dylib 0x00007fffa6b2a893 __assert_rtn + 320
4 org.widelands.wl 0x00000001091f1854 UI::Panel::set_size(int, int) + 140
5 org.widelands.wl 0x00000001091e6a67 UI::FileViewPanel::add_tab(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 1277
6 org.widelands.wl 0x0000000109202b50 FullscreenMenuAbout::FullscreenMenuAbout() + 592
7 org.widelands.wl 0x000000010909099d WLApplication::mainmenu() + 807
8 org.widelands.wl 0x000000010908fc2e WLApplication::run() + 522
9 org.widelands.wl 0x000000010908cd57 main + 103
10 libdyld.dylib 0x00007fffa6acf235 start + 1

Full crash report attached

Tags: crash ui

Related branches

Revision history for this message
Ken Cunningham (kencu) wrote :
GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build20-rc1
assignee: nobody → GunChleoc (gunchleoc)
status: New → In Progress
tags: added: crash ui
Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for reporting!

Since I can't reproduce the crash, could you test the attached branch for me to see if that fixes it?

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Could you give us the Graphics output (Screensize etc)
and eventually when this happend?

I must admit, I rarely open the abiut screen :-)

Revision history for this message
Ken Cunningham (kencu) wrote :
Download full text (3.9 KiB)

Hmmm. Still happens just the same with this branch, both full-screen or in windowed mode.

However, I'm building this from source using a Macports build file (I'm maintaining this on MacPorts) <https://github.com/kencu/macports-staging/blob/master/games/widelands/Portfile>

When I use sirver's prebuilt MacOS version, I don't get the error.

This business suggests a possible standard library linking issue to me:
std::__1::basic_string

and sure enough, I note sirver's version is built against libstdc++, whereas our MacPorts version and all the supporting libraries are built against libc++ (macOS doesn't usually link against libstdc++ since 10.9, but it does still work to do so, clearly).

Sirver's version:
$ otool -L widelands
widelands:
 @executable_path/libSDL2-2.0.0.dylib (compatibility version 5.0.0, current version 5.1.0)
 /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 17.0.0)
 @executable_path/libSDL2_mixer-2.0.0.dylib (compatibility version 1.0.0, current version 1.1.0)
 @executable_path/libboost_unit_test_framework-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
 @executable_path/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
 @executable_path/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
 @executable_path/libpng16.16.dylib (compatibility version 43.0.0, current version 43.0.0)
 @executable_path/libSDL2_image-2.0.0.dylib (compatibility version 1.0.0, current version 1.1.0)
 @executable_path/libSDL2_ttf-2.0.0.dylib (compatibility version 15.0.0, current version 15.0.0)
 @executable_path/libicuuc.58.1.dylib (compatibility version 58.0.0, current version 58.1.0)
 @executable_path/libintl.8.dylib (compatibility version 10.0.0, current version 10.5.0)
 @executable_path/libz.1.2.8.dylib (compatibility version 1.0.0, current version 1.2.8)
 @executable_path/libGLEW.2.0.0.dylib (compatibility version 2.0.0, current version 2.0.0)
 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
 @executable_path/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.22.0)
 /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
 @executable_path/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

Everything else in Widelands 8377 other than the about screen seems to come up and work correctly :>

I'll dig around for a hard-coded link to libstdc++ in widelands that might be causing this; otherwise maybe there is a wrongly-linked binary somewhere in the macports support libraries that is throwing this off. At any rate, it's not looking like a coding issue on your end.

Thanks,

ken

This system is a MacBook Pro that has two graphics cards in it, and automatically switches between them based on some system-derived parameter, as I understand it.

Model Name: MacBook Pro
  Model Identifier: MacBookPro6,1
  Processor Name: Intel Core i5
  Processor Speed: 2.53 GHz
  Number of Processors: 1
  Total Number of Cores: 2
  L2 Cache (per Core): 256 KB
  L3 Cache: 3 MB
  Memory: 4 GB
  Processor Interconnect Spee...

Read more...

Revision history for this message
Ken Cunningham (kencu) wrote :

I suppose will add that build19 rebuilds just fine just now against libc++ and all the current supporting libraries, and the about box works there ... so something is subtly different somehow...

(build19, against libc++, macports) works

$ otool -L widelands
widelands:
 /opt/local/lib/libSDL2-2.0.0.dylib (compatibility version 5.0.0, current version 5.1.0)
 /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 22.0.0)
 /opt/local/lib/libSDL2_ttf-2.0.0.dylib (compatibility version 15.0.0, current version 15.0.0)
 /opt/local/lib/libicuuc.58.dylib (compatibility version 58.0.0, current version 58.2.0)
 /opt/local/lib/libSDL2_net-2.0.0.dylib (compatibility version 1.0.0, current version 1.1.0)
 /opt/local/lib/libSDL2_mixer-2.0.0.dylib (compatibility version 1.0.0, current version 1.1.0)
 /opt/local/lib/libboost_unit_test_framework-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
 /opt/local/lib/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
 /opt/local/lib/libpng16.16.dylib (compatibility version 46.0.0, current version 46.0.0)
 /opt/local/lib/libSDL2_image-2.0.0.dylib (compatibility version 1.0.0, current version 1.1.0)
 /opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.5.0)
 /opt/local/lib/libGLEW.2.0.0.dylib (compatibility version 2.0.0, current version 2.0.0)
 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
 /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
 /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)
 /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)

Revision history for this message
GunChleoc (gunchleoc) wrote :

The difference is that our layouting code has become more dynamic, to support fullscreen switching and things like that.

I have now managed to trigger this while fiddling with the code, so I now have a chance of finding the bug :)

Revision history for this message
GunChleoc (gunchleoc) wrote :

This is ready for testing again.

Revision history for this message
Ken Cunningham (kencu) wrote :

That fixed it. Thanks!

Revision history for this message
GunChleoc (gunchleoc) wrote :

Excellent! Thanks for testing and for the ports :)

Revision history for this message
GunChleoc (gunchleoc) wrote :

Hi Ken,

the fix introduced more bugs, so I had to fiddle with this some more. Would you have time to test this one more time?

Revision history for this message
Ken Cunningham (kencu) wrote :

Just rebuilt this branch, commit 8384 (tip).

All seems well. No errors on the build, all the menus and dialogs I tried appear to work normally.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for testing again :)

The branch is now clear to go in once somebody has done a code review.

GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.