-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mac Lion SFML 1.6 Crash #46
Comments
It looks like we're overflowing the stack on MacOSX due to all foo[PATH_MAX] arrays allocated out of the stack. This should fix it: diff --git a/common/os_posix.cpp b/common/os_posix.cpp
|
Formatting got broken. I'll try paste once again:
I won't commit this immediately because static arrays are a bit unclean (subject to race conditions), but I don't want to use malloc here neither... I'll just have to think a bit more about this. |
This should be now fixed with commit 0a41c9b |
[omegaice@MacPheonix:~/Documents/Code/visarray/viewer/molecular/build/Debug]% DYLD_LIBRARY_PATH=/usr/local/Cellar/apitrace/HEAD/wrappers/ gdb Molecular
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...
warning: Unable to read symbols for @executable_path/../Frameworks/sfml-system.framework/Versions/A/sfml-system (file not found).
warning: Unable to read symbols from "sfml-system" (not yet mapped into memory).
warning: Unable to read symbols for @executable_path/../Frameworks/sfml-window.framework/Versions/A/sfml-window (file not found).
warning: Unable to read symbols from "sfml-window" (not yet mapped into memory).
warning: Unable to read symbols for @executable_path/../Frameworks/sfml-graphics.framework/Versions/A/sfml-graphics (file not found).
warning: Unable to read symbols from "sfml-graphics" (not yet mapped into memory).
Reading symbols for shared libraries ..... done
(gdb) r
Starting program: /Users/omegaice/Documents/Code/visarray/viewer/molecular/build/Debug/Molecular
Reading symbols for shared libraries ...++++......................................................................................................................................... done
Reading symbols for shared libraries . done
Program received signal SIGABRT, Aborted.
0x00007fff8bbc9ce2 in __pthread_kill ()
(gdb) backtrace
#0 0x00007fff8bbc9ce2 in __pthread_kill ()
#1 0x00007fff8c17b7d2 in pthread_kill ()
#2 0x00007fff8c16cb4a in __abort ()
#3 0x00007fff8c169070 in __stack_chk_fail ()
#4 0x0000000100551a6b in OS::GetProcessName ()
#5 0x00000001005513a5 in Trace::LocalWriter::open ()
#6 0x000000010055147e in Trace::LocalWriter::beginEnter ()
#7 0x00000001004a97a6 in CGLSetOption ()
#8 0x00007fff91750115 in createPixelFormat ()
#9 0x00007fff917500be in -NSOpenGLPixelFormat initWithAttributes:
#10 0x00000001001d3f86 in -sfPrivGLContext initWithAttributes:mode:sharedContext:
#11 0x00000001001d3dde in +sfPrivGLContext sharedContext
#12 0x00000001001c813c in sf::priv::WindowImplCocoa::WindowImplCocoa ()
#13 0x00000001001c7e15 in sf::priv::WindowImpl::New ()
#14 0x00000001001c7bf1 in sf::Context::Context ()
#15 0x00000001001c7c65 in sf::Context::GetGlobal ()
#16 0x00000001001c7cd5 in __static_initialization_and_destruction_0 ()
#17 0x00007fff5fc0fd1a in __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE ()
#18 0x00007fff5fc0fa66 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE ()
#19 0x00007fff5fc0d258 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#20 0x00007fff5fc0d1f1 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#21 0x00007fff5fc0e02b in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE ()
#22 0x00007fff5fc034ad in __dyld__ZN4dyld24initializeMainExecutableEv ()
#23 0x00007fff5fc07580 in _dyld__ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5 ()
#24 0x00007fff5fc01059 in __dyld__dyld_start ()
The text was updated successfully, but these errors were encountered: