Crash while switching from Outline to Normal mode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Critical
|
Richard Hughes |
Bug Description
Steps to reproduce - open complex drawing, switch to
Outline, switch back to Normal view and it crashes.
Problem is - it can be reproduced constantly, but only
with a single document (which has external references
to bitmaps, after removing those references it no
longer reproduces)
Program received signal SIGSEGV, Segmentation fault.
font_instance::BBox (this=0x7912f98, glyph_id=87)
at c:/mingw/
../include/
continue, or q <retu
rn> to quit---
stl_vector.h:462
462 operator[
*(begin() + __n); }
(gdb) bt
#0 font_instance::BBox (this=0x7912f98, glyph_id=87)
at c:/mingw/
../include/
#1 0x0075ee0c in raster_font::BBox (this=0x5a37ef8,
glyph_id=87,
area=0x22eab0) at libnrtype/
#2 0x005a78dd in nr_arena_
(item=0x61d80b0, area=0x0,
gc=0x22ebb0, state=510, reset=510) at display/nr-
arena-glyphs.
#3 0x004415ac in nr_arena_
(item=0x61d80b0, area=0x0,
gc=0x22ec40, state=510, reset=510) at display/nr-
arena-item.cpp:252
#4 0x0049a73d in nr_arena_
(item=0x61c7000, area=0x0,
gc=0x22ed70, state=510, reset=510) at display/nr-
arena-group.cpp:170
#5 0x005a81c4 in nr_arena_
(item=0x61c7000, area=0x0,
gc=0x22ed70, state=510, reset=510) at display/nr-
arena-glyphs.
#6 0x004415ac in nr_arena_
(item=0x61c7000, area=0x0,
gc=0x22ee00, state=510, reset=510) at display/nr-
arena-item.cpp:252
#7 0x0049a73d in nr_arena_
(item=0x61d5c78, area=0x0,
gc=0x22ee90, state=510, reset=510) at display/nr-
arena-group.cpp:170
#8 0x004415ac in nr_arena_
(item=0x61d5c78, area=0x0,
gc=0x22ef20, state=510, reset=510) at display/nr-
arena-item.cpp:252
#9 0x0049a73d in nr_arena_
(item=0x61d5d10, area=0x0,
gc=0x22efb0, state=510, reset=510) at display/nr-
arena-group.cpp:170
#10 0x004415ac in nr_arena_
(item=0x61d5d10, area=0x0,
gc=0x22f040, state=510, reset=510) at display/nr-
arena-item.cpp:252
---Type <return> to continue, or q <return> to quit---
#11 0x0049a73d in nr_arena_
(item=0x61c4558, area=0x0,
gc=0x22f0d0, state=510, reset=510) at display/nr-
arena-group.cpp:170
#12 0x004415ac in nr_arena_
(item=0x61c4558, area=0x0,
gc=0x22f160, state=510, reset=510) at display/nr-
arena-item.cpp:252
#13 0x0049a73d in nr_arena_
(item=0x61c45f0, area=0x0,
gc=0x22f1f0, state=510, reset=510) at display/nr-
arena-group.cpp:170
#14 0x004415ac in nr_arena_
(item=0x61c45f0, area=0x0,
gc=0x22f280, state=510, reset=510) at display/nr-
arena-item.cpp:252
#15 0x0049a73d in nr_arena_
(item=0x60d27b8, area=0x0,
gc=0x22f310, state=510, reset=510) at display/nr-
arena-group.cpp:170
#16 0x004415ac in nr_arena_
(item=0x60d27b8, area=0x0,
gc=0x22f3a0, state=510, reset=510) at display/nr-
arena-item.cpp:252
#17 0x0049a73d in nr_arena_
(item=0x4ba1a18, area=0x0,
gc=0x22f430, state=510, reset=510) at display/nr-
arena-group.cpp:170
#18 0x004415ac in nr_arena_
(item=0x4ba1a18, area=0x0,
gc=0x22f4c0, state=510, reset=510) at display/nr-
arena-item.cpp:252
#19 0x0049a73d in nr_arena_
(item=0x3bd4ed8, area=0x0,
gc=0x22f550, state=510, reset=510) at display/nr-
arena-group.cpp:170
#20 0x004415ac in nr_arena_
(item=0x3bd4ed8, area=0x0,
gc=0x3b04018, state=510, reset=510) at display/nr-
arena-item.cpp:252
#21 0x0053bdf7 in sp_canvas_
(item=0x3b03f70, affine=@0x22f690,
flags=1) at display/
#22 0x004d885e in sp_canvas_
(item=0x3b03f70,
---Type <return> to continue, or q <return> to quit---
affine=
cpp:264
#23 0x004d8fd8 in sp_canvas_
(item=0x3b06678, affine=@0x22f780,
flags=2) at display/
#24 0x004d885e in sp_canvas_
(item=0x3b06678,
affine=
cpp:264
#25 0x004d8fd8 in sp_canvas_
(item=0x3adddd8, affine=@0x22f870,
flags=1) at display/
#26 0x004d885e in sp_canvas_
(item=0x3adddd8,
affine=
cpp:264
#27 0x004daed9 in do_update (canvas=0x3b02c48) at
display/
#28 0x004db04f in idle_handler (data=0x3b02c48) at
display/
#29 0x00a1aa96 in _libmsvcrt_a_iname ()
from d:\leisure\
#30 0x03b02c48 in ?? ()
#31 0x00000000 in ?? () from
#32 0x00000000 in ?? () from
#33 0x079dd598 in ?? ()
#34 0x08807a88 in ?? ()
#35 0x00a1aa5e in _libmsvcrt_a_iname ()
from d:\leisure\
#36 0x0022f9f8 in ?? ()
#37 0x00a18b87 in _libmsvcrt_a_iname ()
from d:\leisure\
---Type <return> to continue, or q <return> to quit---
#38 0x08807a88 in ?? ()
#39 0x004db010 in do_update () at ./libnr/
Previous frame inner to this frame (corrupt stack?)
first stack trace lines with optimisation disabled:
#0 0x008861a3 in __gnu_cxx: :hashtable< std::pair< int const, :hash<int> , std::_Select1st <std:: bin/../ lib/gcc/ mingw32/ ./../.. /../include/ c++/3.4. 2/ext/hashtable .h:518 :hashtable< std::pair< int const, :hash<int> , std::_Select1st <std:: bin/../ lib/gcc/ mingw32/ 3.4.2/. . ../include/ c++/3.4. 2/ext/hashtable .h:508 :hashtable< std::pair< int const, :hash<int> , std::_Select1st <std:: bin/../ lib/gcc/ mingw32/ 3.4.2/. ./../.. /../include/ 2/ext/hashtable .h:447 :hash_map< int, int, __gnu_cxx:: bin/../ lib/ 3.4.2/. ./../.. /../include/ c++/3.4. 2/ext/ FontInstance. cpp:616 RasterFont. cpp:110
int>, int, __gnu_cxx:
pair<int const, int> >, std::equal_to<int>, std::
allocator<int> >::_M_bkt_num_key (this=0x5a30004,
__key=@0x22ed48, __n=0) at c:/mingw/
3.4.2/.
#1 0x00886168 in __gnu_cxx:
int>, int, __gnu_cxx:
pair<int const, int> >, std::equal_to<int>, std::
allocator<int> >::_M_bkt_num_key (this=0x5a30004,
__key=@0x22ed48) at c:/mingw/
/../../
#2 0x0087137a in __gnu_cxx:
int>, int, __gnu_cxx:
pair<int const, int> >, std::equal_to<int>, std::
allocator<int> >::find (this=0x5a30004, __key=@0x22ed48) at
c:/mingw/
c++/3.4.
#3 0x0086f79a in __gnu_cxx:
hash<int>, std::equal_to<int>, std::allocator<int> >::find
(this=0x5a30004, __key=@0x22ed48) at c:/mingw/
gcc/mingw32/
hash_map:176
#4 0x0059e999 in font_instance::BBox (this=0x5a2ffe0,
glyph_id=68) at libnrtype/
#5 0x00750a37 in raster_font::BBox (this=0x5a45590,
glyph_id=68, area=0x22eec0) at libnrtype/
Failing line is
_M_hash(__key) % __n
(__n is 0, so that gives an arithmetic exception)
Solution - do not use __gnu_cxx::hash (maybe switch to std::
map) or add check for empty() before calling find (in all
places in the code)