hvr / ThreadScope

Official upstream repo for ThreadScope (issue tracker still using trac)
http://trac.haskell.org/ThreadScope
Other
0 stars 0 forks source link

malloc: pointer being freed was not allocated #6

Open ghc-mirror opened 10 years ago

ghc-mirror commented 10 years ago

Original reporter: kowey

$ threadscope 
threadscope(57833,0x7fff7e0b3960) malloc: *** error for object 0x101837168: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

This is with

ghc-mirror commented 10 years ago

Original reporter: kowey

Looks like this may be related to cairo. I've gotten a similar error trying to run Clock.hs :-/

One thing also is that the Homebrew gtk package wants its own cairo dependency even though MacOS X ships with a cairo of its own. The cairo brew claims the system one is too old.

If you cabal install cairo you get the older system one.

I get a crash both with the older one and the Homebrew cairo linked in (I think)

ghc-mirror commented 10 years ago

Original reporter: kowey

Oh, the Clock.hs refers to the gtk2hs directory.

Also a C hello world for Cairo seems to run

ghc-mirror commented 10 years ago

Original reporter: kowey

Seems not be threadscope-specific at all, so have filed http://hackage.haskell.org/trac/gtk2hs/ticket/124

Note that this may be a blocker for anybody using a newer Mac

ghc-mirror commented 10 years ago

Original reporter: MikolajKonarski

Thank you for the report. I've never encountered this on Linux/amd64, whether with TS or other programs. BTW, the gtk2hs ticket URL is actually http://hackage.haskell.org/trac/gtk2hs/ticket/1241

ghc-mirror commented 10 years ago

Original reporter: MikolajKonarski

The following report by Ben Lippmeier seems to be related:

Threadscope segfaults randomly on mac. I installed gtk via homebrew and
then followed the instructions on the wiki. It's *just* stable enough to
use, but crashes every few minutes, which is very frustrating.

It crashes randomly just when I'm scrolling the plot.

When it starts up it complains:

desire:ray benl$ threadscope gloss-ray-interleave-800x600-N7.eventlog
Xlib:  extension "RANDR" missing on display "/tmp/launch-Bn2zDn/:0".

(process:27518): GLib-GObject-CRITICAL **: gtype.c:2712: You forgot to
call g_type_init()

(process:27518): GLib-GObject-CRITICAL **: gtype.c:2712: You forgot to
call g_type_init()

(threadscope:27518): GLib-GObject-WARNING **: cannot retrieve class
for invalid (unclassed) type `<invalid>'

(process:27518): GLib-GObject-CRITICAL **: gtype.c:2712: You forgot to
call g_type_init()

(threadscope:27518): GLib-GObject-WARNING **: cannot retrieve class
for invalid (unclassed) type `<invalid>'

... so I expect it's writing to unallocated memory.
ghc-mirror commented 10 years ago

Original reporter: MikolajKonarski

To which Edsko de Vries replied:

FWIW, none of those errors appear when I start threadscope on my Mac (gtk+ 2.24.9, gtksourceview-2.10.5, compiled manually direct from source). (I'm not getting crashes either but that probably doesn't mean much as I don't often use threadscope).