Hello,

I'm having some troubles; namely the PNG export segfaults on me. I
tried also the EPS export but it works fine. I think this situation
looks very strange.

Consider the following situation: breakpoint at app_procs.c:263 which
is the line:

        ef->export(diagram->data, export_file_name, in_file_name, ef->user_data);

Let's examine the arguments:

(gdb) print diagram->data
$4 = (DiagramData *) 0x8186a60
(gdb) print export_file_name
$5 = 0x80d6230 "3D-engine.png"
(gdb) print in_file_name
$6 = 0xbffffc6f "3D-engine.dia"
(gdb) print ef->user_data
$7 = (void *) 0x0

Then step to the next line

(gdb) step 
export_png (data=0xbffffc61, filename=0xbffffc6f "3D-engine.dia", 
    diafilename=0x0, user_data=0xbffffc7d) at export_png.c:48
48        Rectangle *ext = &data->extents;

Now look at the arguments, they are not in the proper position.
filename is "3D-engine.dia" which was the value of 3rd argument
in_file_name, and look at the first argument:

(gdb) print (char*) data
$8 = 0xbffffc61 "3D-engine.png"

This is the string passed as 2nd argument. No wonder it segfaults.

So has anybody else had problems with the PNG export? Or is this a
compiler bug? I use gcc version 2.95.3 from Debian unstable. Any help
is appreciated.

Regards,

Pontus

-- 
Pontus Lidman, [EMAIL PROTECTED], Software Engineer
No matter how cynical you get, it's impossible to keep up.
Scene: www.dc-s.com | MUD: tyme.envy.com 6969 | irc: irc.quakenet.eu.org

Reply via email to