Well, never mind. I just fixed this myself (see rev. 1698 of 2geom, and rev. 20205 of Inkscape). unitTangentAt() falsely assumed that pointAndDerivatives(t,n) always returns a vector of size n+1, and therefore tried to access elements outside the vector bounds.

These questions remain though:
- Why was this only a problem on Windows? No one has been able to reproduce this on Linux. My hypothesis is that both platforms suffered from the same bug, but that Inkscape simply didn't die on Linux and kept running (on Windows Inkscape kept running too after the crash dialog, but only for a few seconds). Keeping Inkscape running is obviously good from a user perspective. However, it didn't even produce a warning on Linux, which is bad from a developers point of view. An out-of-bounds error should be screamed out loud!
- Why wasn't it reproducible while debugging?

Diederik


On 11/14/2008 09:49 PM, Diederik van Lierop wrote:
Forgot to mention the bug report:

https://bugs.launchpad.net/inkscape/+bug/292077

Just in case any of you would like to have a shot at reproducing it...

Diederik


On 11/14/2008 09:43 PM, Diederik van Lierop wrote:
Hi Bulia,

I think I've found the cause, if it really is the same bug we're talking about. Apparently it first occurred in rev. 18995. The crash occurs at line 784 of sh-shape.cpp (line number is only valid for rev. 18995):

     Geom::Point tang2 = curve_it2->unitTangentAt(0);

Johan, could you have a look? It's related to 2geom and its your commit. Obviously, I wouldn't have asked this if I knew how to fix it myself ;-)

Thanks,

Diederik


On 11/10/2008 06:05 PM, bulia byak wrote:
On 11/9/08, Diederik van Lierop <mail@...1689...> wrote:
  
Hi,

Bug 292077 is giving me quite some difficulties in pin-pointing it. It
crashes Inkscape, but I can only reproduce it on Windows (not on Linux),
and only when I'm _not_ running gdb. To make things worse it even
requires quite some patience to reproduce it. How does one find the
cause of such a bug? I've tried attaching gdb after the crash (is that
possible at all?), and sprinkled around lot's of std::couts, but I
didn't get any closer.  I could use some pointers here :-(
    

For the last three months (!!!), on and off, I'm fighting with a crash
that fits this description precisely: windows only, no gdb only. For
me it crashes intermittently when I arrow-key a path with markers in
one of my files. It may or may not be connected with snapping and/or
markers; even this I couldn't figure out with certainty. I now have an
idea which may allow us to debug such crashes; if it works out I will
let you know.

For now, one piece of advice I can give you is this: in
inkscape_crash_handler, place abort() as the first line. This will
make a crash to exit immediately. Without it, with my crash at least,
screen updates continued while Inkscape displayed the "crash occurred"
window, which made printf debugging incredibly difficult. With this
change, there's no crash dialog, and it exits immediately as soon as
it crashes.

  



------------------------------------------------------------------------- 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=/

_______________________________________________ Lib2geom-devel mailing list Lib2geom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lib2geom-devel