with wxsvg-1.0_beta10, i'm getting segfaults in svgui and calculette:
(gdb) run
Starting program: /usr/bin/svgui [Thread debugging using libthread_db enabled] [New Thread 0x7ff06a4c9700 (LWP 20070)]
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ff06a4c9700 (LWP 20070)]
SVGUIElement::GetId (this=0x0) at SVGUIElement.cpp:62
62 return GetAttribute(wxT("id"));
(gdb) bt
0 SVGUIElement::GetId (this=0x0) at SVGUIElement.cpp:62
1 0x00007ff06c1642d9 in RecurseElementId (elem=0x0, id=@0x7fff743e0cd0) at SVGUIWindow.cpp:76
2 0x00007ff06c164445 in SVGUIWindow::GetElementById (this=0x16fa620, id=@0x7fff743e0cd0) at SVGUIWindow.cpp:123
3 0x000000000040c7a8 in MySVGCanvas::InitScrollBar (this=0x16fa620, position=0, thumb=5, range=10) at svgui-test.cpp:131
(gdb) run
Starting program: /usr/bin/calculette [Thread debugging using libthread_db enabled] [New Thread 0x7f529497f700 (LWP 20129)]
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f529497f700 (LWP 20129)]
0x00007f529661a605 in SVGUIWindow::RefreshScale (this=0x1451140) at SVGUIWindow.cpp:146
146 wxSVGRect rect = wxSVGCtrl::m_doc->GetRootElement()->GetBBox();
(gdb) bt
0 0x00007f529661a605 in SVGUIWindow::RefreshScale (this=0x1451140) at SVGUIWindow.cpp:146
1 0x000000000040ecf2 in Calculette::OnSize (this=0x7fff9e896e30, event=@0x0) at calculette.cpp:217
2 0x0000003a484e4823 in wxEvtHandler::ProcessEventIfMatches () from /usr/lib/libwx_baseu-2.8.so.0
3 0x0000003a484e571d in wxEventHashTable::HandleEvent () from /usr/lib/libwx_baseu-2.8.so.0
4 0x0000003a484e57ea in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.8.so.0
5 0x0000003a495f26b5 in wxWindow::DoSetSize () from /usr/lib/libwx_gtk2u_core-2.8.so.0
6 0x0000003a496bcb4c in wxTopLevelWindowBase::DoLayout () from /usr/lib/libwx_gtk2u_core-2.8.so.0
7 0x0000003a484e4823 in wxEvtHandler::ProcessEventIfMatches () from /usr/lib/libwx_baseu-2.8.so.0
8 0x0000003a484e571d in wxEventHashTable::HandleEvent () from /usr/lib/libwx_baseu-2.8.so.0
9 0x0000003a484e57ea in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.8.so.0
10 0x0000003a49634847 in wxFrame::GtkOnSize () from /usr/lib/libwx_gtk2u_core-2.8.so.0
11 0x0000003a495e98a6 in wxTopLevelWindowGTK::Show () from /usr/lib/libwx_gtk2u_core-2.8.so.0
12 0x000000000040f897 in MainFrame (this=0x13f8f70, parent=0x0, title=@0x7fff9e897370, pos=@0x615958, size=@0x7fff9e897380,
style=<value optimized out>) at calculette.cpp:72
13 0x000000000040f987 in SVGViewApp::OnInit (this=<value optimized out>) at calculette.cpp:48
14 0x000000000040fd27 in wxAppConsole::CallOnInit (this=0x7fff9e896e30) at /usr/include/wx-2.8/wx/app.h:76
15 0x0000003a4849520c in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
16 0x000000000040ec70 in main (argc=1, argv=0x0) at calculette.cpp:38
wxsvg was configured with ./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-wx-config=/usr/lib64/wx/config/gtk2-unicode-release-2.8 --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu
i also tried building against an ansi-2.6 version of wxGTK with no luck. beta7 worked fine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is very simple. svgui and calculette are compiled with static and relative references to the .svg and .xml files they need.
These files are not copied into /usr/bin, so this programs can't start from this folder.
A explicit error message would be kind to explain this problem to users.
If you want to test svgui and calculette, starts these programs from the svgui folder in your wxsvg source directory. In any other folder, it will crash.
Laurent BESSARD
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
with wxsvg-1.0_beta10, i'm getting segfaults in svgui and calculette:
(gdb) run
Starting program: /usr/bin/svgui
[Thread debugging using libthread_db enabled]
[New Thread 0x7ff06a4c9700 (LWP 20070)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ff06a4c9700 (LWP 20070)]
SVGUIElement::GetId (this=0x0) at SVGUIElement.cpp:62
62 return GetAttribute(wxT("id"));
(gdb) bt
0 SVGUIElement::GetId (this=0x0) at SVGUIElement.cpp:62
1 0x00007ff06c1642d9 in RecurseElementId (elem=0x0, id=@0x7fff743e0cd0) at SVGUIWindow.cpp:76
2 0x00007ff06c164445 in SVGUIWindow::GetElementById (this=0x16fa620, id=@0x7fff743e0cd0) at SVGUIWindow.cpp:123
3 0x000000000040c7a8 in MySVGCanvas::InitScrollBar (this=0x16fa620, position=0, thumb=5, range=10) at svgui-test.cpp:131
4 0x000000000040e2ec in MainFrame (this=0x161f890, parent=0x0, title=<value optimized out>, pos=<value optimized out>,
5 0x000000000040e3c1 in SVGViewApp::OnInit (this=<value optimized out>) at svgui-test.cpp:50
6 0x000000000040e437 in wxAppConsole::CallOnInit (this=0x7fff743e0c70) at /usr/include/wx-2.8/wx/app.h:76
7 0x0000003a4849520c in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
8 0x000000000040c609 in main (argc=1, argv=0x0) at svgui-test.cpp:40
(gdb) print this
$1 = (SVGUIElement * const) 0x0
(gdb) list
57 m_BackgroundElement = NULL;
58 }
59
60 wxString SVGUIElement::GetId()
61 {
62 return GetAttribute(wxT("id"));
63 }
64
65 wxString SVGUIElement::GetName()
66 {
(gdb) run
Starting program: /usr/bin/calculette
[Thread debugging using libthread_db enabled]
[New Thread 0x7f529497f700 (LWP 20129)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f529497f700 (LWP 20129)]
0x00007f529661a605 in SVGUIWindow::RefreshScale (this=0x1451140) at SVGUIWindow.cpp:146
146 wxSVGRect rect = wxSVGCtrl::m_doc->GetRootElement()->GetBBox();
(gdb) bt
0 0x00007f529661a605 in SVGUIWindow::RefreshScale (this=0x1451140) at SVGUIWindow.cpp:146
1 0x000000000040ecf2 in Calculette::OnSize (this=0x7fff9e896e30, event=@0x0) at calculette.cpp:217
2 0x0000003a484e4823 in wxEvtHandler::ProcessEventIfMatches () from /usr/lib/libwx_baseu-2.8.so.0
3 0x0000003a484e571d in wxEventHashTable::HandleEvent () from /usr/lib/libwx_baseu-2.8.so.0
4 0x0000003a484e57ea in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.8.so.0
5 0x0000003a495f26b5 in wxWindow::DoSetSize () from /usr/lib/libwx_gtk2u_core-2.8.so.0
6 0x0000003a496bcb4c in wxTopLevelWindowBase::DoLayout () from /usr/lib/libwx_gtk2u_core-2.8.so.0
7 0x0000003a484e4823 in wxEvtHandler::ProcessEventIfMatches () from /usr/lib/libwx_baseu-2.8.so.0
8 0x0000003a484e571d in wxEventHashTable::HandleEvent () from /usr/lib/libwx_baseu-2.8.so.0
9 0x0000003a484e57ea in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.8.so.0
10 0x0000003a49634847 in wxFrame::GtkOnSize () from /usr/lib/libwx_gtk2u_core-2.8.so.0
11 0x0000003a495e98a6 in wxTopLevelWindowGTK::Show () from /usr/lib/libwx_gtk2u_core-2.8.so.0
12 0x000000000040f897 in MainFrame (this=0x13f8f70, parent=0x0, title=@0x7fff9e897370, pos=@0x615958, size=@0x7fff9e897380,
13 0x000000000040f987 in SVGViewApp::OnInit (this=<value optimized out>) at calculette.cpp:48
14 0x000000000040fd27 in wxAppConsole::CallOnInit (this=0x7fff9e896e30) at /usr/include/wx-2.8/wx/app.h:76
15 0x0000003a4849520c in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
16 0x000000000040ec70 in main (argc=1, argv=0x0) at calculette.cpp:38
wxsvg was configured with ./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-wx-config=/usr/lib64/wx/config/gtk2-unicode-release-2.8 --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu
i also tried building against an ansi-2.6 version of wxGTK with no luck. beta7 worked fine.
The problem is very simple. svgui and calculette are compiled with static and relative references to the .svg and .xml files they need.
These files are not copied into /usr/bin, so this programs can't start from this folder.
A explicit error message would be kind to explain this problem to users.
If you want to test svgui and calculette, starts these programs from the svgui folder in your wxsvg source directory. In any other folder, it will crash.
Laurent BESSARD