I've checked in a fix for this bug (only happens for me when loading from
the command line), change 1250.

On Sun, Jan 6, 2013 at 1:59 PM, Petter Reinholdtsen <[email protected]> wrote:

>
> I discovered this while testing the Debian package, with the patches
> available from
> <URL: http://anonscm.debian.org/gitweb/?p=collab-maint/leocad.git>.
>
> I first loaded leocad, added a brick (the simple one selected by
> default), saved the result as test.leocad, exited the program and then
> started it again.  This time the GUI show up a fraction of a second
> before the program crashes.
>
> This is the valgrind report from the crash.
>
> % valgrind bin/leocad test.leocad
> ==12173== Memcheck, a memory error detector
> ==12173== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
> ==12173== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for
> copyright info
> ==12173== Command: bin/leocad test.leocad
> ==12173==
> Couldn't open directory /usr/share/leocad/library.bin/parts/textures/.
> ==12173== Invalid read of size 2
> ==12173==    at 0x7E38CDB: vbo_get_minmax_index (in
> /usr/lib/dri/swrast_dri.so)
> ==12173==    by 0x7ED9F4F: ??? (in /usr/lib/dri/swrast_dri.so)
> ==12173==    by 0x7EDA2D2: _mesa_validate_DrawElements (in
> /usr/lib/dri/swrast_dri.so)
> ==12173==    by 0x7E3998E: ??? (in /usr/lib/dri/swrast_dri.so)
> ==12173==    by 0x809973F: Project::RenderScenePieces(View*)
> (project.cpp:1905)
> ==12173==    by 0x80A9E67: Project::Render(View*, bool) (project.cpp:1594)
> ==12173==    by 0x80C1678: View::OnDraw() (view.cpp:124)
> ==12173==    by 0x806ABD7: expose_event(_GtkWidget*, _GdkEventExpose*,
> void*) (glwindow.cpp:42)
> ==12173==    by 0x417EE73: ??? (in /usr/lib/libgtk-x11-2.0.so.0.2000.1)
> ==12173==    by 0x471E139: g_closure_invoke (in
> /usr/lib/libgobject-2.0.so.0.2400.2)
> ==12173==    by 0x473461C: ??? (in /usr/lib/libgobject-2.0.so.0.2400.2)
> ==12173==    by 0x4735A7A: g_signal_emit_valist (in
> /usr/lib/libgobject-2.0.so.0.2400.2)
> ==12173==  Address 0xa8 is not stack'd, malloc'd or (recently) free'd
> ==12173==
> ==12173==
> ==12173== Process terminating with default action of signal 11 (SIGSEGV)
> ==12173==  Access not within mapped region at address 0xA8
> ==12173==    at 0x7E38CDB: vbo_get_minmax_index (in
> /usr/lib/dri/swrast_dri.so)
> ==12173==    by 0x7ED9F4F: ??? (in /usr/lib/dri/swrast_dri.so)
> ==12173==    by 0x7EDA2D2: _mesa_validate_DrawElements (in
> /usr/lib/dri/swrast_dri.so)
> ==12173==    by 0x7E3998E: ??? (in /usr/lib/dri/swrast_dri.so)
> ==12173==    by 0x809973F: Project::RenderScenePieces(View*)
> (project.cpp:1905)
> ==12173==    by 0x80A9E67: Project::Render(View*, bool) (project.cpp:1594)
> ==12173==    by 0x80C1678: View::OnDraw() (view.cpp:124)
> ==12173==    by 0x806ABD7: expose_event(_GtkWidget*, _GdkEventExpose*,
> void*) (glwindow.cpp:42)
> ==12173==    by 0x417EE73: ??? (in /usr/lib/libgtk-x11-2.0.so.0.2000.1)
> ==12173==    by 0x471E139: g_closure_invoke (in
> /usr/lib/libgobject-2.0.so.0.2400.2)
> ==12173==    by 0x473461C: ??? (in /usr/lib/libgobject-2.0.so.0.2400.2)
> ==12173==    by 0x4735A7A: g_signal_emit_valist (in
> /usr/lib/libgobject-2.0.so.0.2400.2)
> ==12173==  If you believe this happened as a result of a stack
> ==12173==  overflow in your program's main thread (unlikely but
> ==12173==  possible), you can try to increase the size of the
> ==12173==  main thread stack using the --main-stacksize= flag.
> ==12173==  The main thread stack size used in this run was 8388608.
> ==12173==
> ==12173== HEAP SUMMARY:
> ==12173==     in use at exit: 62,181,402 bytes in 35,987 blocks
> ==12173==   total heap usage: 9,845,509 allocs, 9,809,522 frees,
> 321,216,741 bytes allocated
> ==12173==
> ==12173== LEAK SUMMARY:
> ==12173==    definitely lost: 2,216 bytes in 8 blocks
> ==12173==    indirectly lost: 7,340 bytes in 367 blocks
> ==12173==      possibly lost: 1,464,348 bytes in 15,496 blocks
> ==12173==    still reachable: 60,707,498 bytes in 20,116 blocks
> ==12173==         suppressed: 0 bytes in 0 blocks
> ==12173== Rerun with --leak-check=full to see details of leaked memory
> ==12173==
> ==12173== For counts of detected and suppressed errors, rerun with: -v
> ==12173== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 145 from 13)
> Segfault
> %
>
> Any idea how to debug this?  Am I the only one seeing this?  In case
> it is relevant, this is the output from glxinfo:
>
> %
>
> Attaching the test file.  Btw, are anyone working on getting a MIME
> type for these type of files, and perhaps also support in file(1) for
> detecting the format?  It would allow KDE and Gnome to automatically
> load leocad files from the file browser.
>
> --
> Happy hacking
> Petter Reinholdtsen
>
> _______________________________________________
> Leocad mailing list
> [email protected]
> https://list.gerf.org/listinfo/leocad
>
>
_______________________________________________
Leocad mailing list
[email protected]
https://list.gerf.org/listinfo/leocad

Reply via email to