Inkscape: A Vector Drawing Tool

'malloc: *** error' after changing numeric precision to 1 or 2

Reported by ~suv on 2009-07-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
High
Jon A. Cruz
0.47.x
Undecided
Unassigned

Bug Description

After lowering SVG output numeric precision in preferences (tested with '1' and '2') Inkscape.app hangs after launch and has to be forcefully quit. Renaming preferences.xml or editing it and changing numericprecision="2" back to "8" lets Inkscape launch and run without issues.

Mac OS X 10.5.7 (9J61)
XQuartz 2.3.3.2 (xorg-server 1.4.2-apple42)
Inkscape 0.47pre1 r21720, built Jul 6 2009

console.log:

Xlib: extension "RANDR" missing on display "/tmp/launch-qdHmAu/:0".
inkscape-bin(13731,0xa0388720) malloc: *** error for object 0x57a5080: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

Emergency save activated!
inkscape-bin(13731,0xa0388720) malloc: *** error for object 0x57a2a10: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
inkscape-bin(13731,0xa0388720) malloc: *** error for object 0x57a2a10: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at www.inkscape.org
with a detailed description of the steps leading to the crash, so we can fix it.

attached: sample of inkscape-bin (created with Activity Monitor.app)

~suv (suv-lp) wrote :
Alvin Penner (apenner) wrote :

- confirmed on Windows XP, Inkscape 0.47 pre0.
- my result was different from above, but still unacceptable. I drew a rectangle, changed the prefs to 2 digits after the decimal, saved it; changed the prefs to one digit, saved it. Quit Inkscape. Confirmed that the saved files looked reasonable, although they both appeared to have the same precision, which was only one digit after the decimal.
    Then restarted Inkscape only to have it close itself automatically after 5 seconds with no exit message. It was impossible to run Inkscape after this, it would shutdown after 5 seconds. It was necessary to revert to the original prefs to get it to run again.

Changed in inkscape:
status: New → Confirmed
jazzynico (jazzynico) on 2009-07-17
Changed in inkscape:
importance: Undecided → High
~suv (suv-lp) wrote :

Revision 22232 by buliabyak
until the freeze with precision<3 is fixed, raise the lower limit in the UI

temporary fix confirmed with r22240 on OS X 10.5.8

ScislaC (scislac) on 2009-10-08
Changed in inkscape:
assignee: nobody → Jon A. Cruz (jon-joncruz)
Jon A. Cruz (jon-joncruz) wrote :

Fixed with singed/unsigned math correction on precision. Committed as of revision 22421.

Jon A. Cruz (jon-joncruz) wrote :

UI change rolled back in revision 22422.

Changed in inkscape:
status: Confirmed → Fix Released
theAdib (theadib) wrote :

Jon, could you review my comment on https://bugs.launchpad.net/inkscape/+bug/437929
In my opinion the function appendNumber does not reserve enough buffer for the string.

Adib.

~suv (suv-lp) wrote :

Inkscape 046+devel r22435 on OS X 10.5.8
confirmed: Inkscape launches without crash when numeric precision is set to '1' or '2'.

Strange things though happen when using these low precision values. First tests show e.g.
- objects can not be placed at will on canvas
- dragging them snaps to seemingly random positions (all snap modes disabled)
- using the 'Align and Distribute…' dialog doesn't align the objects correctly or only after applying the command repeatedly
- Circles converted to path get deformed unevenly
- …

What exactly is supposed to happen when using a lower numeric precision?

As a user I would assume that this setting doesn't influence the behavior of objects on canvas but only affects the SVG output - i.e. the precision (0.02 instead of 0.0198567) of coordinates and lengths written to the SVG file.

Jon A. Cruz (jon-joncruz) wrote :

That's actually an issue with the design of the 'feature' itself. Therefore it merits a new bug.

~suv (suv-lp) wrote :

new: bug #446723 “unexpected transform and align results with numericprecision=1”

John Smith (john-smithi) on 2012-08-28
tags: added: precision
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers