#989220 solvespace: crashes when starting on Debian stable.

Package:
solvespace
Source:
solvespace
Description:
Parametric 2d/3d CAD
Submitter:
Juan Zuluaga
Date:
2021-07-06 05:48:02 UTC
Severity:
normal
Tags:
#989220#5
Date:
2021-05-29 04:34:01 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
 Starting the program from gui menu produced a flash on screen but
 nothing else. Then I started the program from command line, and error
 message appeared.  Starting program as
 > solvespace --help
 starts showing some graphs, but when I try to interact, program
 crashes.

* What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

#989220#10
Date:
2021-05-29 04:47:19 UTC
From:
To:
Bug seems related to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=887978, except that the message is a bit different

cannot load settings: Resource temporarily unavailable
malloc(): invalid size (unsorted)
Aborted

instead of

cannot load settings: Resource temporarily unavailable
  malloc(): memory corruption
  Aborted

Output of gdb follows:
(gdb) run
Starting program: /usr/bin/solvespace
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
cannot load settings: Resource temporarily unavailable
[New Thread 0xaf702b40 (LWP 20199)]
malloc(): invalid size (unsorted)

Thread 1 "solvespace" received signal SIGABRT, Aborted.
0xb7fd4d61 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fd4d61 in __kernel_vsyscall ()
#1  0xb6c23382 in raise () from /lib/i386-linux-gnu/libc.so.6
#2  0xb6c0d2b6 in abort () from /lib/i386-linux-gnu/libc.so.6
#3  0xb6c64d2c in ?? () from /lib/i386-linux-gnu/libc.so.6
#4  0xb6c6baed in ?? () from /lib/i386-linux-gnu/libc.so.6
#5  0xb6c6e80b in ?? () from /lib/i386-linux-gnu/libc.so.6
#6  0xb6c70c34 in calloc () from /lib/i386-linux-gnu/libc.so.6
#7  0xb312b867 in ?? () from /usr/lib/i386-linux-gnu/dri/nouveau_dri.so
#8  0xb2ec0ea9 in ?? () from /usr/lib/i386-linux-gnu/dri/nouveau_dri.so
#9  0xb3445465 in ?? () from /usr/lib/i386-linux-gnu/dri/nouveau_dri.so
#10 0xb3442e0f in ?? () from /usr/lib/i386-linux-gnu/dri/nouveau_dri.so
#11 0xb339fea7 in ?? () from /usr/lib/i386-linux-gnu/dri/nouveau_dri.so
#12 0xb329843e in ?? () from /usr/lib/i386-linux-gnu/dri/nouveau_dri.so
#13 0xb3297e57 in ?? () from /usr/lib/i386-linux-gnu/dri/nouveau_dri.so
#14 0xb334477f in ?? () from /usr/lib/i386-linux-gnu/dri/nouveau_dri.so
#15 0x004df59f in SolveSpace::ssglLineWidth (width=<optimized out>) at ./src/glhelper.cpp:97
#16 0x004b2dc1 in SolveSpace::Entity::Draw (this=0xbd8b20, drawAsHidden=false)
    at ./src/drawentity.cpp:117
#17 0x004b2ece in SolveSpace::Entity::DrawAll (drawAsHidden=false) at ./src/drawentity.cpp:103
#18 0x0049d4d5 in SolveSpace::GraphicsWindow::Paint (this=<optimized out>) at ./src/draw.cpp:724
#19 0x0048470e in SolveSpace::GraphicsWidget::on_gl_draw (this=0xb4a180) at ./src/gtk/gtkmain.cpp:524
#20 0x00486f4f in SolveSpace::GlWidget::on_draw (cr=..., this=0xb4a180) at ./src/gtk/gtkmain.cpp:334
#21 SolveSpace::GlWidget::on_expose_event (this=<optimized out>) at ./src/gtk/gtkmain.cpp:350
#22 0xb7c8f579 in Gtk::Widget_Class::expose_event_callback(_GtkWidget*, _GdkEventExpose*) ()
   from /lib/i386-linux-gnu/libgtkmm-2.4.so.1
#23 0xb76396e7 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#24 0xb7274128 in g_closure_invoke () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#25 0xb72873ed in ?? () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#26 0xb7290961 in g_signal_emit_valist () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#27 0xb7291425 in g_signal_emit () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#28 0xb775b4d4 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#29 0xb7637b71 in gtk_main_do_event () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#30 0xb74400ca in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#31 0xb7440077 in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#32 0xb7470f0c in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#33 0xb743c6d4 in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#34 0xb743d052 in gdk_window_process_all_updates () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#35 0xb75b8cc3 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#36 0xb741a8c5 in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#37 0xb68a2e65 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#38 0xb68a3269 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#39 0xb68a3609 in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#40 0xb7636675 in gtk_main () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#41 0xb7c1ec8e in Gtk::Main::run(Gtk::Window&) () from /lib/i386-linux-gnu/libgtkmm-2.4.so.1
#42 0x004624bf in main (argc=<optimized out>, argv=<optimized out>)
    at /usr/include/c++/8/bits/unique_ptr.h:342
(gdb) quit

#989220#15
Date:
2021-06-13 13:44:16 UTC
From:
To:
Hello Juan,
the last lines of your backtrace end in nouveau_dri.so.
Therefore this might not be a fault in solvespace.

Maybe you could install the package libgl1-mesa-dri-dbgsym where
the file nouveau_dri.so originates from, and provide
another backtrace from such a crash.
I would expect that the currently uninformative lines in nouveau_dri.so
would look similar to below.

With the following environment set, before running solvespace in gdb,
you might get a backtrace more related to the
real memory operation causing the error.

   MALLOC_CHECK_=2 gdb --args solvespace


Another source of information might be to run solvespace within valgrind:

   valgrind solvespace


But I guess this issue is likeley to be caused by the graphics driver,
maybe limited to the NV50 hardware class, which your GPU seems to be.
This makes it hard to impossible to reproduce
without having such graphics hardware.

Kind regards,
Bernhard


...
#6  0xb6c70c34 in calloc () from libc.so.6
#7  0xb312b867 in nv50_rasterizer_state_create at ../src/gallium/drivers/nouveau/nv50/nv50_state.c:230 from nouveau_dri.so
#8  0xb2ec0ea9 in cso_set_rasterizer at ../src/gallium/auxiliary/cso_cache/cso_context.c:604 from nouveau_dri.so
#9  0xb3445465 in st_update_rasterizer at ../src/mesa/state_tracker/st_atom_rasterizer.c:317 from nouveau_dri.so
#10 0xb3442e0f in st_validate_state at ../src/util/bitscan.h:103 from nouveau_dri.so
#11 0xb339fea7 in prepare_draw at ../src/mesa/state_tracker/st_draw.c:123 from nouveau_dri.so
#12 0xb329843e in vbo_exec_vtx_flush at ../src/mesa/vbo/vbo_exec_draw.c:393 from nouveau_dri.so
#13 0xb3297e57 in vbo_exec_FlushVertices_internal at ../src/mesa/vbo/vbo_exec_api.c:1255 from nouveau_dri.so
#14 0xb334477f in line_width at ../src/mesa/main/lines.c:70 from nouveau_dri.so
#15 0x004df59f in SolveSpace::ssglLineWidth (width=<optimized out>) at ./src/glhelper.cpp:97
...

#989220#20
Date:
2021-07-06 05:45:10 UTC
From:
To:
Thank you Bernhard,

according to your instructions, here I present:

juan@widgy:~$ gdb solvespace
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from solvespace...Reading symbols from /usr/lib/debug/.build-id/08/b34dccc7ada9d003ba80595f1a686a34256288.debug...done.
done.
(gdb) run
Starting program: /usr/bin/solvespace
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xaf702b40 (LWP 12876)]
malloc(): invalid size (unsorted)

Thread 1 "solvespace" received signal SIGABRT, Aborted.
0xb7fd4d61 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fd4d61 in __kernel_vsyscall ()
#1  0xb6c23382 in __libc_signal_restore_set (set=0xbfffda5c) at ../sysdeps/unix/sysv/linux/internal-signals.h:84
#2  __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:48
#3  0xb6c0d2b6 in __GI_abort () at abort.c:79
#4  0xb6c64d2c in __libc_message (action=do_abort, fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:181
#5  0xb6c6baed in malloc_printerr (str=str@entry=0xb6d775e8 "malloc(): invalid size (unsorted)") at malloc.c:5341
#6  0xb6c6e80b in _int_malloc (av=av@entry=0xb6dce7a0 <main_arena>, bytes=bytes@entry=236) at malloc.c:3732
#7  0xb6c70c34 in __libc_calloc (n=1, elem_size=236) at malloc.c:3428
#8  0xb312b867 in nv50_rasterizer_state_create (pipe=0xb59fa0, cso=0xc82780) at ../src/gallium/drivers/nouveau/nv50/nv50_state.c:230
#9  0xb2ec0ea9 in cso_set_rasterizer (ctx=0xb8b3e0, templ=0xb76964) at ../src/gallium/auxiliary/cso_cache/cso_context.c:604
#10 0xb3445465 in st_update_rasterizer (st=<optimized out>) at ../src/mesa/state_tracker/st_atom_rasterizer.c:317
#11 0xb3442e0f in st_validate_state (st=0xb768c0, pipeline=ST_PIPELINE_RENDER) at ../src/util/bitscan.h:103
#12 0xb339fea7 in prepare_draw (ctx=0xb5b460, st=0xb768c0) at ../src/mesa/state_tracker/st_draw.c:123
#13 st_draw_vbo (ctx=0xb5b460, prims=0xb7800c, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=<optimized out>, max_index=<optimized out>,
    tfb_vertcount=0x0, stream=0, indirect=0x0) at ../src/mesa/state_tracker/st_draw.c:149
#14 0xb329843e in vbo_exec_vtx_flush (exec=<optimized out>, keepUnmapped=1 '\001') at ../src/mesa/vbo/vbo_exec_draw.c:393
#15 0xb3297e57 in vbo_exec_FlushVertices_internal (unmap=1 '\001', exec=<optimized out>) at ../src/mesa/vbo/vbo_exec_api.c:1255
#16 vbo_exec_FlushVertices (ctx=0xb5b460, flags=1) at ../src/mesa/vbo/vbo_exec_api.c:1255
#17 0xb334477f in line_width (no_error=false, width=<optimized out>, ctx=0xb5b460) at ../src/mesa/main/lines.c:70
#18 _mesa_LineWidth (width=<optimized out>) at ../src/mesa/main/lines.c:95
#19 0x004df59f in SolveSpace::ssglLineWidth (width=<optimized out>) at ./src/glhelper.cpp:97
#20 0x004b2dc1 in SolveSpace::Entity::Draw (this=0xbdbe90, drawAsHidden=false) at ./src/drawentity.cpp:117
#21 0x004b2ece in SolveSpace::Entity::DrawAll (drawAsHidden=false) at ./src/drawentity.cpp:103
#22 0x0049d4d5 in SolveSpace::GraphicsWindow::Paint (this=<optimized out>) at ./src/draw.cpp:724
#23 0x0048470e in SolveSpace::GraphicsWidget::on_gl_draw (this=0xb57f00) at ./src/gtk/gtkmain.cpp:524
#24 0x00486f4f in SolveSpace::GlWidget::on_draw (cr=..., this=0xb57f00) at ./src/gtk/gtkmain.cpp:334
#25 SolveSpace::GlWidget::on_expose_event (this=<optimized out>) at ./src/gtk/gtkmain.cpp:350
#26 0xb7c8f579 in Gtk::Widget_Class::expose_event_callback(_GtkWidget*, _GdkEventExpose*) () from /lib/i386-linux-gnu/libgtkmm-2.4.so.1
--Type <RET> for more, q to quit, c to continue without paging--c
#27 0xb76396e7 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#28 0xb7273138 in g_closure_invoke () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#29 0xb72863fd in ?? () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#30 0xb728f9a1 in g_signal_emit_valist () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#31 0xb7290465 in g_signal_emit () from /lib/i386-linux-gnu/libgobject-2.0.so.0
#32 0xb775b4d4 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#33 0xb7637b71 in gtk_main_do_event () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#34 0xb74400ca in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#35 0xb7440077 in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#36 0xb7470f0c in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#37 0xb743c6d4 in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#38 0xb743d052 in gdk_window_process_all_updates () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#39 0xb75b8cc3 in ?? () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#40 0xb741a8c5 in ?? () from /lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#41 0xb68a2ef5 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#42 0xb68a32f9 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#43 0xb68a3699 in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#44 0xb7636675 in gtk_main () from /lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#45 0xb7c1ec8e in Gtk::Main::run(Gtk::Window&) () from /lib/i386-linux-gnu/libgtkmm-2.4.so.1
#46 0x004624bf in main (argc=<optimized out>, argv=<optimized out>) at /usr/include/c++/8/bits/unique_ptr.h:342
(gdb) quit
A debugging session is active.

Inferior 1 [process 12869] will be killed.

Quit anyway? (y or n) y
juan@widgy:~$
------------------------------------------------------------------------------------------------------------ juan@widgy:~$ valgrind solvespace ==9540== Memcheck, a memory error detector ==9540== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==9540== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info ==9540== Command: solvespace ==9540== cannot load settings: Resource temporarily unavailable ==9540== Syscall param ioctl(generic) points to uninitialised byte(s) ==9540== at 0x5B31DA9: ioctl (syscall-template.S:78) ==9540== by 0x8ED0A9D: drmIoctl (in /usr/lib/i386-linux-gnu/libdrm.so.2.4.0) ==9540== by 0x8ED3E21: drmCommandWriteRead (in /usr/lib/i386-linux-gnu/libdrm.so.2.4.0) ==9540== by 0xD34652B: ??? (in /usr/lib/i386-linux-gnu/libdrm_nouveau.so.2.0.0) ==9540== by 0xD346915: ??? (in /usr/lib/i386-linux-gnu/libdrm_nouveau.so.2.0.0) ==9540== by 0xD34738C: nouveau_device_new (in /usr/lib/i386-linux-gnu/libdrm_nouveau.so.2.0.0) ==9540== by 0x91D1C1A: nouveau_drm_screen_create (nouveau_drm_winsys.c:101) ==9540== by 0x8F53868: pipe_nouveau_create_screen (drm_helper.h:71) ==9540== by 0x8FFAD56: pipe_loader_create_screen (pipe_loader.c:137) ==9540== by 0x8F58256: dri2_init_screen (dri2.c:2130) ==9540== by 0x8F5527D: driCreateNewScreen2 (dri_util.c:153) ==9540== by 0x8E76C88: ??? (in /usr/lib/i386-linux-gnu/libGLX_mesa.so.0.0.0) ==9540== Address 0x6bf00e2 is 2 bytes inside a block of size 72 alloc'd ==9540== at 0x483463B: malloc (vg_replace_malloc.c:299) ==9540== by 0xD3468B7: ??? (in /usr/lib/i386-linux-gnu/libdrm_nouveau.so.2.0.0) ==9540== by 0xD34738C: nouveau_device_new (in /usr/lib/i386-linux-gnu/libdrm_nouveau.so.2.0.0) ==9540== by 0x91D1C1A: nouveau_drm_screen_create (nouveau_drm_winsys.c:101) ==9540== by 0x8F53868: pipe_nouveau_create_screen (drm_helper.h:71) ==9540== by 0x8FFAD56: pipe_loader_create_screen (pipe_loader.c:137) ==9540== by 0x8F58256: dri2_init_screen (dri2.c:2130) ==9540== by 0x8F5527D: driCreateNewScreen2 (dri_util.c:153) ==9540== by 0x8E76C88: ??? (in /usr/lib/i386-linux-gnu/libGLX_mesa.so.0.0.0) ==9540== by 0x8E66E31: ??? (in /usr/lib/i386-linux-gnu/libGLX_mesa.so.0.0.0) ==9540== by 0x8E625E3: ??? (in /usr/lib/i386-linux-gnu/libGLX_mesa.so.0.0.0) ==9540== by 0x8E63A41: ??? (in /usr/lib/i386-linux-gnu/libGLX_mesa.so.0.0.0) ==9540== ==9540== Invalid write of size 4 ==9540== at 0x922AB73: nv50_rasterizer_state_create (nv50_state.c:338) ==9540== by 0x8FBFEA8: cso_set_rasterizer (cso_context.c:604) ==9540== by 0x9544464: st_update_rasterizer (st_atom_rasterizer.c:317) ==9540== by 0x9541E0E: st_validate_state (st_atom.c:259) ==9540== by 0x949EEA6: prepare_draw (st_draw.c:123) ==9540== by 0x949EEA6: st_draw_vbo (st_draw.c:149) ==9540== by 0x939743D: vbo_exec_vtx_flush (vbo_exec_draw.c:393) ==9540== by 0x9396E56: vbo_exec_FlushVertices_internal (vbo_exec_api.c:643) ==9540== by 0x9396E56: vbo_exec_FlushVertices (vbo_exec_api.c:1255) ==9540== by 0x947FB4A: set_depth_range_no_notify (viewport.c:295) ==9540== by 0x9480013: _mesa_DepthRange (viewport.c:341) ==9540== by 0x1E735A: SolveSpace::ssglDepthRangeOffset(int) [clone .part.10] (glhelper.cpp:714) ==9540== by 0x1B5D72: SolveSpace::Entity::LineDrawOrGetDistance(SolveSpace::Vector, SolveSpace::Vector, bool, int) (drawentity.cpp:27) ==9540== by 0x1BA5A0: SolveSpace::Entity::DrawOrGetDistance() (drawentity.cpp:668) ==9540== Address 0x107ac1f4 is 0 bytes after a block of size 236 alloc'd ==9540== at 0x4836A16: calloc (vg_replace_malloc.c:752) ==9540== by 0x922A866: nv50_rasterizer_state_create (nv50_state.c:230) ==9540== by 0x8FBFEA8: cso_set_rasterizer (cso_context.c:604) ==9540== by 0x9544464: st_update_rasterizer (st_atom_rasterizer.c:317) ==9540== by 0x9541E0E: st_validate_state (st_atom.c:259) ==9540== by 0x949EEA6: prepare_draw (st_draw.c:123) ==9540== by 0x949EEA6: st_draw_vbo (st_draw.c:149) ==9540== by 0x939743D: vbo_exec_vtx_flush (vbo_exec_draw.c:393) ==9540== by 0x9396E56: vbo_exec_FlushVertices_internal (vbo_exec_api.c:643) ==9540== by 0x9396E56: vbo_exec_FlushVertices (vbo_exec_api.c:1255) ==9540== by 0x947FB4A: set_depth_range_no_notify (viewport.c:295) ==9540== by 0x9480013: _mesa_DepthRange (viewport.c:341) ==9540== by 0x1E735A: SolveSpace::ssglDepthRangeOffset(int) [clone .part.10] (glhelper.cpp:714) ==9540== by 0x1B5D72: SolveSpace::Entity::LineDrawOrGetDistance(SolveSpace::Vector, SolveSpace::Vector, bool, int) (drawentity.cpp:27) ==9540== ==9540== Invalid read of size 4 ==9540== at 0x48398A4: memcpy (vg_replace_strmem.c:1035) ==9540== by 0x922CF3B: memcpy (string_fortified.h:34) ==9540== by 0x922CF3B: PUSH_DATAp (nouveau_winsys.h:44) ==9540== by 0x922CF3B: nv50_validate_rasterizer (nv50_state_validate.c:408) ==9540== by 0x922E0FA: nv50_state_validate (nv50_state_validate.c:549) ==9540== by 0x922E313: nv50_state_validate_3d (nv50_state_validate.c:572) ==9540== by 0x922F98D: nv50_draw_vbo (nv50_vbo.c:799) ==9540== by 0x949EE35: st_draw_vbo (st_draw.c:236) ==9540== by 0x939743D: vbo_exec_vtx_flush (vbo_exec_draw.c:393) ==9540== by 0x9396E56: vbo_exec_FlushVertices_internal (vbo_exec_api.c:643) ==9540== by 0x9396E56: vbo_exec_FlushVertices (vbo_exec_api.c:1255) ==9540== by 0x947FB4A: set_depth_range_no_notify (viewport.c:295) ==9540== by 0x9480013: _mesa_DepthRange (viewport.c:341) ==9540== by 0x1E735A: SolveSpace::ssglDepthRangeOffset(int) [clone .part.10] (glhelper.cpp:714) ==9540== by 0x1B5D72: SolveSpace::Entity::LineDrawOrGetDistance(SolveSpace::Vector, SolveSpace::Vector, bool, int) (drawentity.cpp:27) ==9540== Address 0x107ac1f4 is 0 bytes after a block of size 236 alloc'd ==9540== at 0x4836A16: calloc (vg_replace_malloc.c:752) ==9540== by 0x922A866: nv50_rasterizer_state_create (nv50_state.c:230) ==9540== by 0x8FBFEA8: cso_set_rasterizer (cso_context.c:604) ==9540== by 0x9544464: st_update_rasterizer (st_atom_rasterizer.c:317) ==9540== by 0x9541E0E: st_validate_state (st_atom.c:259) ==9540== by 0x949EEA6: prepare_draw (st_draw.c:123) ==9540== by 0x949EEA6: st_draw_vbo (st_draw.c:149) ==9540== by 0x939743D: vbo_exec_vtx_flush (vbo_exec_draw.c:393) ==9540== by 0x9396E56: vbo_exec_FlushVertices_internal (vbo_exec_api.c:643) ==9540== by 0x9396E56: vbo_exec_FlushVertices (vbo_exec_api.c:1255) ==9540== by 0x947FB4A: set_depth_range_no_notify (viewport.c:295) ==9540== by 0x9480013: _mesa_DepthRange (viewport.c:341) ==9540== by 0x1E735A: SolveSpace::ssglDepthRangeOffset(int) [clone .part.10] (glhelper.cpp:714) ==9540== by 0x1B5D72: SolveSpace::Entity::LineDrawOrGetDistance(SolveSpace::Vector, SolveSpace::Vector, bool, int) (drawentity.cpp:27) ==9540== ==9540== ==9540== HEAP SUMMARY: ==9540== in use at exit: 1,909,602 bytes in 28,062 blocks ==9540== total heap usage: 178,039 allocs, 149,977 frees, 181,345,705 bytes allocated ==9540== ==9540== LEAK SUMMARY: ==9540== definitely lost: 5,485 bytes in 35 blocks ==9540== indirectly lost: 84,543 bytes in 1,007 blocks ==9540== possibly lost: 188,779 bytes in 980 blocks ==9540== still reachable: 1,472,527 bytes in 24,221 blocks ==9540== of which reachable via heuristic: ==9540== newarray : 15,225 bytes in 456 blocks ==9540== multipleinheritance: 14,400 bytes in 269 blocks ==9540== suppressed: 0 bytes in 0 blocks ==9540== Rerun with --leak-check=full to see details of leaked memory ==9540== ==9540== For counts of detected and suppressed errors, rerun with: -v ==9540== Use --track-origins=yes to see where uninitialised values come from ==9540== ERROR SUMMARY: 216 errors from 3 contexts (suppressed: 0 from 0)
------------------------------------------------------------------------------------------------- juan@widgy:~$ valgrind --tool=cachegrind solvespace ==9879== Cachegrind, a cache and branch-prediction profiler ==9879== Copyright (C) 2002-2017, and GNU GPL'd, by Nicholas Nethercote et al. ==9879== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info ==9879== Command: solvespace ==9879== malloc(): invalid size (unsorted) ==9879== ==9879== Process terminating with default action of signal 6 (SIGABRT) ==9879== at 0x5A5D382: raise (raise.c:51) ==9879== by 0x5A472B5: abort (abort.c:79) ==9879== by 0x5A9ED2B: __libc_message (libc_fatal.c:181) ==9879== by 0x5AA5AEC: malloc_printerr (malloc.c:5341) ==9879== by 0x5AA880A: _int_malloc (malloc.c:3732) ==9879== by 0x5AAAC33: calloc (malloc.c:3428) ==9879== by 0x8E18866: nv50_rasterizer_state_create (nv50_state.c:230) ==9879== by 0x8BADEA8: cso_set_rasterizer (cso_context.c:604) ==9879== by 0x9132464: st_update_rasterizer (st_atom_rasterizer.c:317) ==9879== by 0x912FE0E: st_validate_state (st_atom.c:259) ==9879== by 0x908CEA6: st_draw_vbo (st_draw.c:123) ==9879== by 0x8F8543D: vbo_exec_vtx_flush (vbo_exec_draw.c:393) ==9879== ==9879== I refs: 604,726,756 ==9879== I1 misses: 860,858 ==9879== LLi misses: 102,468 ==9879== I1 miss rate: 0.14% ==9879== LLi miss rate: 0.02% ==9879== ==9879== D refs: 289,014,318 (200,277,631 rd + 88,736,687 wr) ==9879== D1 misses: 14,465,701 ( 13,373,610 rd + 1,092,091 wr) ==9879== LLd misses: 1,242,020 ( 367,246 rd + 874,774 wr) ==9879== D1 miss rate: 5.0% ( 6.7% + 1.2% ) ==9879== LLd miss rate: 0.4% ( 0.2% + 1.0% ) ==9879== ==9879== LL refs: 15,326,559 ( 14,234,468 rd + 1,092,091 wr) ==9879== LL misses: 1,344,488 ( 469,714 rd + 874,774 wr) ==9879== LL miss rate: 0.2% ( 0.1% + 1.0% ) Aborted
------------------------------------------------------------------------------------------------- juan@widgy:~$ valgrind --tool=callgrind solvespace ==9956== Callgrind, a call-graph generating cache profiler ==9956== Copyright (C) 2002-2017, and GNU GPL'd, by Josef Weidendorfer et al. ==9956== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info ==9956== Command: solvespace ==9956== ==9956== For interactive control, run 'callgrind_control -h'. malloc(): invalid size (unsorted) ==9956== ==9956== Process terminating with default action of signal 6 (SIGABRT) ==9956== at 0x5A5D382: raise (raise.c:51) ==9956== by 0x5A472B5: abort (abort.c:79) ==9956== by 0x5A9ED2B: __libc_message (libc_fatal.c:181) ==9956== by 0x5AA5AEC: malloc_printerr (malloc.c:5341) ==9956== by 0x5AA880A: _int_malloc (malloc.c:3732) ==9956== by 0x5AAAC33: calloc (malloc.c:3428) ==9956== by 0x8E18866: nv50_rasterizer_state_create (nv50_state.c:230) ==9956== by 0x8BADEA8: cso_set_rasterizer (cso_context.c:604) ==9956== by 0x9132464: st_update_rasterizer (st_atom_rasterizer.c:317) ==9956== by 0x912FE0E: st_validate_state (st_atom.c:259) ==9956== by 0x908CEA6: st_draw_vbo (st_draw.c:123) ==9956== by 0x8F8543D: vbo_exec_vtx_flush (vbo_exec_draw.c:393) ==9956== ==9956== Events : Ir ==9956== Collected : 604833322 ==9956== ==9956== I refs: 604,833,322 Aborted --------------------------------------------------- Valgrind tools Helgrind and DRD create huge reports size 3.9 and 6 MB, respectively. Let me know if I should attach them whole or in part. Cheers! -j