|
From: Mojca M. <moj...@gm...> - 2008-03-04 00:30:49
|
Hello,
someone working on windows has sent me some code which apparently
worked there, but is crashing/segfaulting on my mac.
I'm using Mac OS X Tiger 10.4, with gnuplot compiled from CVS
approximately 2 weeks ago (but the same problem happens with the
version provided by fink, which is 4.2 patchlevel 2). (It might have
something to do with readline perhaps?)
A minimal example includes downloading this code:
http://cheminfo.informatics.indiana.edu/~rguha/code/cc++/gnuplot_i++.tgz
(from http://jijo.cjb.net/)
and unzipping, making it and running an example
> cd gnuplot_i++
/tmp/gnuplot_i++> make
g++ -c -ggdb -DDEBUGGA example.cc
g++ -c -ggdb -DDEBUGGA gnuplot_i.cc
g++ -o example -ggdb example.o gnuplot_i.o -lstdc++
/tmp/gnuplot_i++> ./example
*** example of gnuplot control through C++ ***
Segmentation fault
------
If I run gdb, then I get a problem in fputs reported:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x2f706dac
0x9002990c in fputs ()
Any idea about what could go wrong?
Thanks a lot,
Mojca
|