octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: base_graphics_backend


From: Michael Goffioul
Subject: Re: base_graphics_backend
Date: Tue, 9 Sep 2008 12:24:52 +0200

On Tue, Sep 9, 2008 at 6:45 AM, Ryan Rusaw <address@hidden> wrote:
> Michael,
>
> I've implemented a implement a subclass of base_graphics_backend that
> implements a simple wire protocol with JSON-based data serialization.
> I've just encountered a few issues
>
> 1. A property_changed event is never fired for
> base_properties::children. Is this the expected behavior? I've
> resorted to keeping track of children
> myself on the plotting end of the ipc socket, as I never know when the
> children have been updated.

Yes. The "children" property is not yet a real property so
it does not fire any event. This should be changed.

> 2. I seem to get spurious object deletions and incomplete handle 
> reassignments.
>
> octave:1> autoload("__init_octave_eclipse__",
> file_in_loadpath("octave_eclipse_backend.oct"))
> octave:2> backend ("octave_eclipse")
> octave:3> figure
> octave:4> plot(0:.1:10,cos(0:.1:10))
> octave:5> exit
> error: graphics_handle::free: invalid object -6.19755
> error: graphics_handle::free: invalid object -7.33522
> error: graphics_handle::free: invalid object -8.76823
> error: graphics_handle::free: invalid object -9.27777

Can you debug octave to see the backtrace when you get
this error?

> It seems to create the figure and axes correctly, but then creates
> extra text objects ([xyz]label + title) just to delete them again.
> Could this be a byproduct of iterating through all the properties of
> an object during the object_created function call?

Yes. When an axes object is first created, its "title" and
"[xyz]label" properties are empty. Accessing them will trigger
the creation of a text object (whose handle is then stored in
the corresponding property). However, if I read your log correctly,
it seems the text objects are deleted before the line and hggroup
objects are created. I'm wondering why this happens. Could you
also break execution when the first text object is destroyed and
produce a backtrace?

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]