Bugs item #2195749, was opened at 2008-10-26 02:10
Message generated for change (Comment added) made by genete
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=757416&aid=2195749&group_id=144022

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Crasher/nasty bug
Group: SVN version
Status: Open
Resolution: None
Priority: 2
Private: No
Submitted By: wtachi (hyperwiz)
Assigned to: Nobody/Anonymous (nobody)
Summary: Crash loading .sif with canvas width and height="0"

Initial Comment:
Synfig Studio SVN r2129 crashes when trying to load a file like this, with 
width and height set to 0:

<?xml version="1.0"?>
<canvas version="0.6" width="0" height="0" view-box="0 0 0 0" antialias="1" 
fps="24.000" begin-time="0f" end-time="0f" bgcolor="0.5 0.5 0.5 1.0"/>

The actual crash happens in studio::Widget_NavView::on_start_render(), called 
from studio::Widget_NavView::on_expose_draw(), called from libgtkmm.

Granted it's not a very sane .sif file, and an error message would be 
reasonable, but crashing isn't good. I came across this while writing a program 
that creates .sif files.

This patch fixes the crash by forcing the drawn width and height to be at least 
1, but raising an error might be a better solution.

----------------------------------------------------------------------

Comment By: Genete (genete)
Date: 2008-10-26 09:26

Message:
For the project you're working on, do you need a working file with a canvas
with size (0,0)? or simply it was a testing file of the application you're
working on?
Possibly, load a canvas of size 0,0 would produce other bugs in other
sections so we opine that the best thing is to avoid load that kind of
canvas. In fact it is not possible to produce a 0,0 sized canvas using
synfigstudio because the interface doesn't allow it. 

----------------------------------------------------------------------

Comment By: Genete (genete)
Date: 2008-10-26 09:03

Message:
Hey, didn't realized that you sent a pacth already. It looks good. I'll
test it.

----------------------------------------------------------------------

Comment By: Genete (genete)
Date: 2008-10-26 08:45

Message:
I would work on a patch for this bug. Thanks for raise it up. Wish me good
luck :)
Also it would be awesome if you post in the forum
(http://synfig.org/formus/) an article about the project you're working on.
We gladly would add a reference in the Related projects wiki page and
eventually someone else can give you a hand on the project of create sif
files from scratch. 


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=757416&aid=2195749&group_id=144022

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to