wxHaskell Mac OS X Runtime Error

255 views Asked by At

I followed these instructions to install wxWidgets (using Homebrew) and wxHaskell on OS X Lion. There were no errors.

When I try the examples here, the first Hello World example runs fine. However, when I try to run the Bouncing Balls example, I get:

Main(98350,0x7fff72edd960) malloc: * error for object 0x10e121580: pointer being freed was not allocated

I am building with

ghc --make Main.hs

When I simply run the executable, I get that error. If I use macosx-app to bundle it into an app, it simply crashes (presumably the same error). I've tried reinstalling both wxWidgets and the Haskell packages, but the error persists.

With gdb:

Main(10236,0x7fff72edd960) malloc: *** error for object 0x102b68580: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Program received signal SIGABRT, Aborted.
0x00007fff83cc7ce2 in __pthread_kill ()
(gdb) backtrace
#0  0x00007fff83cc7ce2 in __pthread_kill ()
#1  0x00007fff891077d2 in pthread_kill ()
#2  0x00007fff890f8a7a in abort ()
#3  0x00007fff8915784c in free ()
#4  0x00007fff866d0702 in std::string::_Rep::_M_dispose ()
#5  0x00007fff866d0740 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string ()
#6  0x00000001017e779a in wxString::~wxString ()
#7  0x00000001018957c8 in wxEventBasicPayloadMixin::~wxEventBasicPayloadMixin ()
#8  0x0000000101879da5 in wxCommandEvent::~wxCommandEvent ()
#9  0x0000000101894b42 in wxEvtHandler_GetClosure ()
#10 0x0000000100276f91 in s19gn_info ()
0

There are 0 answers