gnumexp plot window crashes

Bug #212965 reported by David Boucher
2
Affects Status Importance Assigned to Milestone
gNumExp
Fix Committed
Critical
Unassigned

Bug Description

I've upgraded gnome to the 2.22 version. And now, if I lauch gnumexp, open a plot window, ask for a new function, for example sin[x]. When I validate, I get a segfault.

I can reproduce it everytime.

I get this behaviour with numexp-core-0.16.2 and my last version in branches/david/

This happens with gnome-python-2.22 / pygtk-2.12.1 / python-2.5.1

Cheers.
David.

David Boucher (bouda1)
Changed in gnumexp:
importance: Undecided → Critical
Revision history for this message
David Boucher (bouda1) wrote :

The crash seems to appear in plotarea.py, in the plot_object_added function when self.emit("plot-object-added", plot_object)

Hope that helps :-)

Revision history for this message
David Boucher (bouda1) wrote :

If I comment that line, I don't get any legend, but curves are drawn.

Revision history for this message
Gustavo Carneiro (gjc) wrote :

Showing me a traceback would help more... :-)

Revision history for this message
David Boucher (bouda1) wrote :

So you don't have this bug ?

I don't use python a lot ! So when I debug a little program, I abuse of "print"s, and arrive to the bug little by little. Now, for gnumexp, it's a little more difficult... :-)

And I don't know anything about tracebacks... :-S

Revision history for this message
David Boucher (bouda1) wrote :

After debugging a little more, I get something.

I've found that the segfault arrives in the pycairo package, exactly in cairo/pycairo-context.c file, in the function PycairoContext_FromContext.

This function is called with type = NULL and o = PycairoContext_Type.tp_alloc (type, 0) fails in that case.

After digging on google, I've found a work around, I replace :

   o = PycairoContext_Type.tp_alloc (type, 0);

by

    if (type == NULL)
 type = &PycairoContext_Type;
    o = PycairoContext_Type.tp_alloc (type, 0);

I don't know what I do here :-), if it is a good solution or not, but plotting sin(x) with gnumexp works again.

So, can we say that the bug is a pycairo bug ?

Sorry to insist, but I need a working version of gnumexp to test numexp. :-)

Revision history for this message
David Boucher (bouda1) wrote :

It's fixed now if we require pygoocanvas-0.10.0.

Changed in gnumexp:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.