Help about Animate Document in Inkscape
Hello Bryce and M-List member, you remembar that I'm an Italian student and I'm writing my Thesis of bachelor in engineering on the diagrams animated in inkscape. I explain you my problem: I would have the necessity to modify the attributes of field STYLE of an object to regular intervals of time. More in the detail, I would have necessity to write a “extension” of Inkscape that reads the data of an object (rect, path, star, etc.) from a DBMS and he applies them to the present object on the screen. As I said to you in one mail of some day makes (the bringing back under):
--------------------------------- On Tue, Mar 13, 2007 at 12:08:15PM +0100, Federico wrote:
Hello, remembered of me! I'm a student graduating in Computer science Engineering and I'm
leading a
thesis on the Vectorial Diagrams Animated in Inkscape.
I had successful to insert of inkscape a "parallel" Thread to the
main
program, that it reads of the regarding data the characteristics of
an
object and then assigns them to the object by means of the endured
function
sp_repr_set_attr(nodes[i],style.c_str(),attrib.c_str());
nodes[i] -> it is a carrier of gunlayers "Node" (std::vector<Inkscape::XML::Node *> nodes;) style & attrib -> are strings.
But after this call, the program crasha and it is closed without
some
message. By means of the debuggher they are successful to
understand that
there is an error of Segmentation Fault:
Program received signal SIGSEGV, Segmentation fault. ---Type <return> to continue, or q <return> to quit--- [Switching to thread 3236.0x6a8] GC_clear_stack_inner (arg=0x47429a0 "", limit=2284336) at misc.c:293 293 misc.c: No such file or directory. in misc.c Current language: auto; currently c
You can help me to resolve this problem being given to me some
council to
follow?
When you are in the debugger, issue the command 'bt'; this should give you a backtrace to show the functions that were being called to reach this crash. You will probably also need to specify which thread you're debugging; since Inkscape is single threaded we don't have directions on this, however they can be found on the internet - Ubuntu has good directions for debugging multithreaded applications.
A technique that I find useful to help identify bugs like this is to set a break point in the code somewhere prior to the segmentation fault, and then step through the lines until the segmentation fault, and look at the values of some variables that might be causing the problem.
Generally segmentation faults are caused by mis-used pointers. For instance, trying to use a pointer with a NULL or undefined value.
Regarding adding multi-threaded capabilities to Inkscape, this is something which we have avoided. In part, it makes debugging more complex, and it opens a large class of bugs that are challenging to deal with. We've also heard that some of the libraries we use may not behave as well when used in a multithreaded app. If it is very important for you to have the multithreaded capabilities, please explain why; otherwise you may wish to go single threaded to save yourself a lot of difficult work. Either way though, it's exciting to hear of your work on animated diagrams in Inkscape! I'd love to hear more about it.
Bryce ---------------------------------
I have used a Thread parallel that goes to write field STYLE of the rappresentazione of an object. But in this way a Segmentation Fault is generated. How I can avoid this problem? For me it is not binding that my extension is multithread, only interests to me that to regular intervali of time they can be applied of the changes to of the present objects on the canvas and that they have a particular ID or one particular LABEL. You can give me of the straight ones in order to resolve the problem?
Thanks
Federico
Naviga e telefona senza limiti con Tiscali Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom
On Mon, 19 Mar 2007 19:31:12 +0100 (CET), Federico <fedemil@...92...> wrote:
I would have the necessity to modify the attributes of field STYLE of an object to regular intervals of time.
More in the detail, I would have necessity to write a “extension” of Inkscape that reads the data of an object (rect, path, star, etc.) from a DBMS and he applies them to the present object on the screen.
Could you please clarify the way in which these two requirements are related to one another?
-mental
participants (2)
-
Federico
-
MenTaLguY