← Back to team overview

kicad-developers team mailing list archive

Re: 3D Viewer crushes whole KiCAD with this file

 

In response to a message written on 18.02.2015, 19:24, from Mark Roszko:
The <optimized_out> is for the function argument.


@LordBlick, could you compile with -DCMAKE_BUILD_TYPE=Debug and do the
backtrace after it fails with that build.
At the rpmbuild level, simply attached „--debug” to the cmd prompt.
Here you go, here you have it:
--------------------------------------------------------------
Application: kicad
Version: (after 2015-jan-16 BZR unknown)-BZR5430 Debug build
wxWidgets: Version 3.0.1 (release,wchar_t,compiler with C++ ABI 1002,GCC 4.9.2,wx containers,compatible with 2.8)
Platform: Linux 3.18.5-1 x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.57.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=OFF
         KICAD_USE_WEBKIT=OFF
--------------------------------------------------------------
$  gdb kicad
GNU gdb (GDB) 7.8.1-1 (PLD Linux)
Copyright (C) 2014 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 "x86_64-pld-linux".
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 kicad...done.
(gdb) start
Temporary breakpoint 1 at 0x46f355: file /usr/src/debug/kicad-sources-BZR.5430-main/kicad/kicad.cpp, line 300.
Starting program: /usr/bin/kicad
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Temporary breakpoint 1, main (argc=1, argv=0x7fffffffdae8) at /usr/src/debug/kicad-sources-BZR.5430-main/kicad/kicad.cpp:300
300	IMPLEMENT_APP( APP_KICAD );
(gdb) continue
Continuing.
LIB_ENV_VAR:'/usr/bin'
ElemsClear: clearing all _ELEMS for project
SetProjectFullName: old:'' new:'${ProjectPath}/PowerHV.pro'
[New Thread 0x7fffda3b1700 (LWP 5364)]
[New Thread 0x7fffd9bb0700 (LWP 5365)]
[New Thread 0x7fffd93af700 (LWP 5366)]
FileWatcherReset: add '${ProjectPath}/_CAD'
FileWatcherReset: add '${ProjectPath}/_doc'
FileWatcherReset: add '${ProjectPath}/_old'
FileWatcherReset: add '${ProjectPath}/gerberAndDrill'
FileWatcherReset: add '${ProjectPath}/Mount'
FileWatcherReset: add '${ProjectPath}/panelProd'
FileWatcherReset: watched paths:
 ${ProjectPath}/_old/
 ${ProjectPath}/_doc/
 ${ProjectPath}/
 ${ProjectPath}/panelProd/
 ${ProjectPath}/_CAD/
 ${ProjectPath}/gerberAndDrill/
 ${ProjectPath}/Mount/
kiface SEARCH_STACK:
  [ 0]:/usr/share/kicad/modules
  [ 1]:/usr/share/kicad/modules/packages3d
  [ 2]:/usr/share/kicad/template
  [ 3]:/usr/local/share
[Thread 0x7fffd93af700 (LWP 5366) exited]
<drawsegment> Need ::Show() override for this class </drawsegment>
<drawsegment> Need ::Show() override for this class </drawsegment>
<drawsegment> Need ::Show() override for this class </drawsegment>
<drawsegment> Need ::Show() override for this class </drawsegment>
<drawsegment> Need ::Show() override for this class </drawsegment>
<drawsegment> Need ::Show() override for this class </drawsegment>
<drawsegment> Need ::Show() override for this class </drawsegment>
<drawsegment> Need ::Show() override for this class </drawsegment>

Program received signal SIGSEGV, Segmentation fault.
0x00007fffcb545786 in VRML2_MODEL_PARSER::Load (this=0x37d00b0, aFilename=..., aVrmlunits_to_3Dunits=0.041753652758311229) at /usr/src/debug/kicad-sources-BZR.5430-main/3d-viewer/vrml_v2_modelparser.cpp:134
134	}
(gdb) backtrace
#0 0x00007fffcb545786 in VRML2_MODEL_PARSER::Load (this=0x37d00b0, aFilename=..., aVrmlunits_to_3Dunits=0.041753652758311229) at /usr/src/debug/kicad-sources-BZR.5430-main/3d-viewer/vrml_v2_modelparser.cpp:134
#1  0x312d2c372c39312c in ?? ()
[Many of unresolved addresses excised - it's hard to dbg rebuild all OS libs…]
#360 0x00007fff0000000e in ?? ()
#361 0x00007ffff26ba023 in g_value_unset () from /usr/lib64/libgobject-2.0.so.0
#362 0x00007ffff26ae994 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
Backtrace stopped: Cannot access memory at address 0x352c312d2c353134
(gdb) continue
Continuing.
[Thread 0x7fffd9bb0700 (LWP 5365) exited]
[Thread 0x7fffda3b1700 (LWP 5364) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
--------------------------------------------------------------
Again, build prompt & flags:
cd ~/rpm/BUILD/kicad-sources-BZR.5430-main/build/3d-viewer && /usr/bin/x86_64-pld-linux-g++ -DHAVE_STDINT_H -DKICAD_KEEPCASE -DKICAD_SCRIPTING -DKICAD_SCRIPTING_MODULES -DKICAD_SCRIPTING_WXPYTHON -DPCBNEW -DUSE_OPENMP -DWXUSINGDLL -DWX_COMPATIBILITY -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -Wall -fopenmp -fPIC -Wno-unused-local-typedefs -Wno-strict-aliasing -pthread -g3 -ggdb3 -DDEBUG -Wno-deprecated-declarations -I~/rpm/BUILD/kicad-sources-BZR.5430-main/include -I~/rpm/BUILD/kicad-sources-BZR.5430-main/3d-viewer/. -isystem /usr/lib64/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -I~/rpm/BUILD/kicad-sources-BZR.5430-main/3d-viewer/textures -I~/rpm/BUILD/kicad-sources-BZR.5430-main/3d-viewer/../pcbnew -I~/rpm/BUILD/kicad-sources-BZR.5430-main/3d-viewer/../polygon -I~/rpm/BUILD/kicad-sources-BZR.5430-main/build -I/usr/include/python2.7 -I~/rpm/BUILD/kicad-sources-BZR.5430-main/scripting -o CMakeFiles/3d-viewer.dir/vrml_v2_modelparser.cpp.o -c ~/rpm/BUILD/kicad-sources-BZR.5430-main/3d-viewer/vrml_v2_modelparser.cpp
--------------------------------------------------------------
BTW. I've also traced pcbnew freerun mode closing segfault bug:
--------------------------------------------------------------
$  gdb pcbnew
GNU gdb (GDB) 7.8.1-1 (PLD Linux)
Copyright (C) 2014 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 "x86_64-pld-linux".
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 pcbnew...done.
(gdb) start
Temporary breakpoint 1 at 0x43fbdc: file /usr/src/debug/kicad-sources-BZR.5430-main/common/single_top.cpp, line 189.
Starting program: /usr/bin/pcbnew
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Temporary breakpoint 1, main (argc=1, argv=0x7fffffffdae8) at /usr/src/debug/kicad-sources-BZR.5430-main/common/single_top.cpp:189
189	IMPLEMENT_APP( APP_SINGLE_TOP );
(gdb) continue
Continuing.
LIB_ENV_VAR:'/usr/bin'
kiface SEARCH_STACK:
  [ 0]:/usr/share/kicad/modules
  [ 1]:/usr/share/kicad/modules/packages3d
  [ 2]:/usr/share/kicad/template
  [ 3]:/usr/local/share
[New Thread 0x7fffd3e1c700 (LWP 5530)]
player_destroy_handler: m_player[4] destroyed: PcbFrame

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff65aede3 in wxEntry(int&, wchar_t**) () from /usr/lib64/libwx_baseu-3.0.so.0
(gdb) backtrace
#0 0x00007ffff65aede3 in wxEntry(int&, wchar_t**) () from /usr/lib64/libwx_baseu-3.0.so.0 #1 0x000000000043fbef in main (argc=1, argv=0x7fffffffdae8) at /usr/src/debug/kicad-sources-BZR.5430-main/common/single_top.cpp:189
(gdb) continue
Continuing.
[Thread 0x7fffd3e1c700 (LWP 5530) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
--------------------------------------------------------------
--
Best Regards,
LordBlick


Follow ups

References