|
|
05-07-2015, 05:55
|
#136
|
Registered User
Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,414
|
Re: OpenCPN Beta test 4.1.602 Release
Quote:
Originally Posted by NahanniV
re: latest OpenCPN on ARM
bactrace showing corrupted stack didn't look too helpful, so I tried setting a break point near the last message output before crashing:
|
Could you please apply this (reversed) patch and tell me if it can still crash
Code:
diff --git a/src/glChartCanvas.cpp b/src/glChartCanvas.cpp
index e8e50b5..8ba39a0 100644
--- a/src/glChartCanvas.cpp
+++ b/src/glChartCanvas.cpp
@@ -859,19 +859,6 @@ void glChartCanvas::OnActivate( wxActivateEvent& event )
void glChartCanvas::OnSize( wxSizeEvent& event )
{
-#if defined(__WXGTK__) && defined(ARMHF) && defined(ocpnUSE_GLES)
- // There is a race condition between cairo which is used for text rendering
- // by gtk and EGL which without the below code causes a bus error and the
- // program aborts before startup
- // this hack forces cairo to load right now by rendering some text
- if( !m_bsetup ){
- wxBitmap bmp( 10, 10, -1 );
- wxMemoryDC dc;
- dc.SelectObject( bmp );
- dc.DrawText( _T("X"), 0, 0 );
- }
-#endif
-
if( !g_bopengl ) {
SetSize( cc1->GetVP().pix_width, cc1->GetVP().pix_height );
event.Skip();
|
|
|
05-07-2015, 20:19
|
#137
|
Registered User
Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
|
Re: OpenCPN Beta test 4.1.602 Release
Quote:
Originally Posted by boat_alexandra
Could you please apply this (reversed) patch and tell me if it can still crash
Code:
diff --git a/src/glChartCanvas.cpp b/src/glChartCanvas.cpp
index e8e50b5..8ba39a0 100644
--- a/src/glChartCanvas.cpp
+++ b/src/glChartCanvas.cpp
@@ -859,19 +859,6 @@ void glChartCanvas::OnActivate( wxActivateEvent& event )
void glChartCanvas::OnSize( wxSizeEvent& event )
{
-#if defined(__WXGTK__) && defined(ARMHF) && defined(ocpnUSE_GLES)
- // There is a race condition between cairo which is used for text rendering
- // by gtk and EGL which without the below code causes a bus error and the
- // program aborts before startup
- // this hack forces cairo to load right now by rendering some text
- if( !m_bsetup ){
- wxBitmap bmp( 10, 10, -1 );
- wxMemoryDC dc;
- dc.SelectObject( bmp );
- dc.DrawText( _T("X"), 0, 0 );
- }
-#endif
-
if( !g_bopengl ) {
SetSize( cc1->GetVP().pix_width, cc1->GetVP().pix_height );
event.Skip();
|
Thanks, but that did not fix it.
It seems to be crashing before the patch you suggested:
Code:
(gdb) break glChartCanvas::OnSize
Breakpoint 1 at 0x26f86c: file /home/aruntu/OpenCPN/src/glChartCanvas.cpp, line 861.
(gdb) run
Starting program: /home/aruntu/OpenCPN/build/opencpn
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
(opencpn:6044): Gdk-CRITICAL **: IA__gdk_colormap_new: assertion 'GDK_IS_VISUAL (visual)' failed
(opencpn:6044): Gtk-CRITICAL **: IA__gtk_widget_set_colormap: assertion 'GDK_IS_COLORMAP (colormap)' failed
(opencpn:6044): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
libGL: built on Jun 19 2015 05:42:49
[New Thread 0xb5128270 (LWP 6073)]
[New Thread 0xb4928270 (LWP 6074)]
[New Thread 0xb4128270 (LWP 6075)]
Program received signal SIGSEGV, Segmentation fault.
0xb642f862 in __GI___pthread_mutex_lock (mutex=0x6e2d656d) at pthread_mutex_lock.c:66
66 pthread_mutex_lock.c: No such file or directory.
(gdb)
(gdb) bt
#0 0xb642f862 in __GI___pthread_mutex_lock (mutex=0x6e2d656d) at pthread_mutex_lock.c:66
#1 0xb65cd306 in XrmQGetResource () from /usr/lib/arm-linux-gnueabihf/libX11.so.6
#2 0xb65b7a62 in XGetDefault () from /usr/lib/arm-linux-gnueabihf/libX11.so.6
#3 0xb5f709fa in ?? () from /usr/lib/arm-linux-gnueabihf/libcairo.so.2
#4 0xb5f709fa in ?? () from /usr/lib/arm-linux-gnueabihf/libcairo.so.2
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
|
|
|
06-07-2015, 22:52
|
#138
|
Registered User
Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
|
Re: OpenCPN Beta test 4.1.602 Release
The Latest OpenCPN from Git crashes in a different way on my ARM system.
Every time I apply changes or click ok in the config menu I get this error:
Code:
Program received signal SIGSEGV, Segmentation fault.
PluginListPanel::UpdatePluginsOrder (this=0x0) at /home/aruntu/OpenCPN/src/pluginmanager.cpp:3191
3191 m_pPluginArray->Clear();
(gdb) bt
#0 PluginListPanel::UpdatePluginsOrder (this=0x0) at /home/aruntu/OpenCPN/src/pluginmanager.cpp:3191
#1 0x001d7d5c in options::OnApplyClick (this=0x8a6a20, event=...) at /home/aruntu/OpenCPN/src/options.cpp:4486
#2 0xb6e68112 in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/local/lib/libwx_baseu-3.0.so.0
#3 0xb6f6c20e in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/local/lib/libwx_baseu-3.0.so.0
#4 0xb6f6c2b4 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/local/lib/libwx_baseu-3.0.so.0
#5 0xb6f6c532 in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/local/lib/libwx_baseu-3.0.so.0
#6 0xb6f6c57a in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/local/lib/libwx_baseu-3.0.so.0
#7 0xb6f6c5c0 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/local/lib/libwx_baseu-3.0.so.0
#8 0xb6d0aae2 in wxWindowBase::TryAfter(wxEvent&) () from /usr/local/lib/libwx_gtk2u_core-3.0.so.0
#9 0xb6f6c3fc in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from /usr/local/lib/libwx_baseu-3.0.so.0
#10 0xb6c3dda0 in wxgtk_button_clicked_callback () from /usr/local/lib/libwx_gtk2u_core-3.0.so.0
#11 0xb5e9c660 in ?? () from /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0
#12 0xb5e9c660 in ?? () from /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
|
|
|
07-07-2015, 06:32
|
#139
|
Registered User
Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
|
Re: OpenCPN Beta test 4.1.602 Release
Quote:
Originally Posted by NahanniV
The Latest OpenCPN from Git crashes in a different way on my ARM system.
Every time I apply changes or click ok in the config menu I get this error:
Code:
Program received signal SIGSEGV, Segmentation fault.
PluginListPanel::UpdatePluginsOrder (this=0x0) at /home/aruntu/OpenCPN/src/pluginmanager.cpp:3191
3191 m_pPluginArray->Clear();
(gdb) bt
#0 PluginListPanel::UpdatePluginsOrder (this=0x0) at /home/aruntu/OpenCPN/src/pluginmanager.cpp:3191
#1 0x001d7d5c in options::OnApplyClick (this=0x8a6a20, event=...) at /home/aruntu/OpenCPN/src/options.cpp:4486
#2 0xb6e68112 in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/local/lib/libwx_baseu-3.0.so.0
#3 0xb6f6c20e in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/local/lib/libwx_baseu-3.0.so.0
#4 0xb6f6c2b4 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/local/lib/libwx_baseu-3.0.so.0
#5 0xb6f6c532 in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/local/lib/libwx_baseu-3.0.so.0
#6 0xb6f6c57a in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/local/lib/libwx_baseu-3.0.so.0
#7 0xb6f6c5c0 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/local/lib/libwx_baseu-3.0.so.0
#8 0xb6d0aae2 in wxWindowBase::TryAfter(wxEvent&) () from /usr/local/lib/libwx_gtk2u_core-3.0.so.0
#9 0xb6f6c3fc in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from /usr/local/lib/libwx_baseu-3.0.so.0
#10 0xb6c3dda0 in wxgtk_button_clicked_callback () from /usr/local/lib/libwx_gtk2u_core-3.0.so.0
#11 0xb5e9c660 in ?? () from /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0
#12 0xb5e9c660 in ?? () from /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
|
Further to the new bug: It only happens if no plugins are enabled and I do not enable at least one before closing the config.
Also, the chart selector toolbar is working again !!!
Cheers,
JM.
|
|
|
07-07-2015, 07:36
|
#140
|
Registered User
Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,197
|
Re: OpenCPN Beta test 4.1.602 Release
JM...
Good catch, fixed in master now.
Pavel
|
|
|
07-07-2015, 08:09
|
#141
|
Registered User
Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
|
Re: OpenCPN Beta test 4.1.602 Release
Quote:
Originally Posted by nohal
JM...
Good catch, fixed in master now.
Pavel
|
Thanks, that fixes it.
So, now I am left with one bug (well one main one at least):
To recap:
If I start OpenCPN with no config file it works correctly (for the most part).
I can configure charts, OpenGL, chart selector rendering is working...
When I shut it down and re-start it I get a Segmentation Fault.
Always at the same spot (see preceding post).
I dont even have to change any config for this to happen:
just delete config file, run opencpn, close without doing anything, run opencpn again and it crashes.
Any Ideas how to debug this ?
Thanks,
JM.
|
|
|
07-07-2015, 08:34
|
#142
|
Registered User
Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,197
|
Re: OpenCPN Beta test 4.1.602 Release
JM...
First build a binary without optimizations:
Code:
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
Then run it in gdb and see if the stack trace makes more sense.
If still not, you will probably have to step through the code until the offender is found...
Pavel
|
|
|
07-07-2015, 08:38
|
#143
|
Registered User
Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
|
Re: OpenCPN Beta test 4.1.602 Release
Quote:
Originally Posted by nohal
JM...
First build a binary without optimizations:
Code:
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
Then run it in gdb and see if the stack trace makes more sense.
If still not, you will probably have to step through the code until the offender is found...
Pavel
|
Are the optimizations why I was seeing instructions repeated while stepping ?
Will try the debug build tonight.
Thanks,
JM.
|
|
|
07-07-2015, 09:22
|
#144
|
Registered User
Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,197
|
Re: OpenCPN Beta test 4.1.602 Release
JM...
Might be - stepping through code which is -O3 optimized tends to sometimes be a total nightmare, to which extent depends on the code - it might have been completely changed by the compiler or it may be exactly the same as with -O0 and perfectly traceable.
Of course disabling the optimizations and having well debuggable executable comes at the price of it's performance.
Pavel
|
|
|
07-07-2015, 22:43
|
#145
|
Registered User
Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
|
Re: OpenCPN Beta test 4.1.602 Release
Quote:
Originally Posted by nohal
JM...
First build a binary without optimizations:
Code:
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
Then run it in gdb and see if the stack trace makes more sense.
If still not, you will probably have to step through the code until the offender is found...
Pavel
|
The debug build seems to give the same result, unless I'm doing something wrong?
Code:
aruntu@aruntu:~/OpenCPN/build$ gdb opencpn
GNU gdb (GDB) 7.6.1-ubuntu
Copyright (C) 2013 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 "arm-linux-gnueabihf".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/aruntu/OpenCPN/build/opencpn...done.
(gdb) run
Starting program: /home/aruntu/OpenCPN/build/opencpn
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
01:10:12 EDT: Debug: Failed to connect to session manager: SESSION_MANAGER environment variable not defined
(opencpn:14118): Gdk-CRITICAL **: IA__gdk_colormap_new: assertion 'GDK_IS_VISUAL (visual)' failed
(opencpn:14118): Gtk-CRITICAL **: IA__gtk_widget_set_colormap: assertion 'GDK_IS_COLORMAP (colormap)' failed
(opencpn:14118): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
libGL: built on Jul 7 2015 23:31:34
[New Thread 0xb5128270 (LWP 14142)]
[New Thread 0xb4928270 (LWP 14143)]
[New Thread 0xb4128270 (LWP 14144)]
Program received signal SIGSEGV, Segmentation fault.
0xb642f862 in __GI___pthread_mutex_lock (mutex=0x6e2d656d) at pthread_mutex_lock.c:66
66 pthread_mutex_lock.c: No such file or directory.
(gdb) bt
#0 0xb642f862 in __GI___pthread_mutex_lock (mutex=0x6e2d656d) at pthread_mutex_lock.c:66
#1 0xb65cd306 in XrmQGetResource () from /usr/lib/arm-linux-gnueabihf/libX11.so.6
#2 0xb65b7a62 in XGetDefault () from /usr/lib/arm-linux-gnueabihf/libX11.so.6
#3 0xb5f709fa in ?? () from /usr/lib/arm-linux-gnueabihf/libcairo.so.2
#4 0xb5f709fa in ?? () from /usr/lib/arm-linux-gnueabihf/libcairo.so.2
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
Stepping through the code till segment fault:
Code:
gdb) n
606 ICursorUp.ConvertAlphaToMask(128);
(gdb) n
607 ICursorDown.ConvertAlphaToMask(128);
(gdb) n
608 ICursorPencil.ConvertAlphaToMask(10);
(gdb) n
609 ICursorCross.ConvertAlphaToMask(10);
(gdb) n
612 if ( ICursorLeft.Ok() )
(gdb) n
614 ICursorLeft.SetOption ( wxIMAGE_OPTION_CUR_HOTSPOT_X, 0 );
(gdb) n
615 ICursorLeft.SetOption ( wxIMAGE_OPTION_CUR_HOTSPOT_Y, 15 );
(gdb) n
616 pCursorLeft = new wxCursor ( ICursorLeft );
(gdb) n
621 if ( ICursorRight.Ok() )
(gdb) n
623 ICursorRight.SetOption ( wxIMAGE_OPTION_CUR_HOTSPOT_X, 31 );
(gdb) n
624 ICursorRight.SetOption ( wxIMAGE_OPTION_CUR_HOTSPOT_Y, 15 );
(gdb) n
625 pCursorRight = new wxCursor ( ICursorRight );
(gdb) n
630 if ( ICursorUp.Ok() )
(gdb) n
632 ICursorUp.SetOption ( wxIMAGE_OPTION_CUR_HOTSPOT_X, 15 );
(gdb) n
633 ICursorUp.SetOption ( wxIMAGE_OPTION_CUR_HOTSPOT_Y, 0 );
(gdb) n
634 pCursorUp = new wxCursor ( ICursorUp );
(gdb) n
639 if ( ICursorDown.Ok() )
(gdb) n
641 ICursorDown.SetOption ( wxIMAGE_OPTION_CUR_HOTSPOT_X, 15 );
(gdb) n
642 ICursorDown.SetOption ( wxIMAGE_OPTION_CUR_HOTSPOT_Y, 31 );
(gdb) n
643 pCursorDown = new wxCursor ( ICursorDown );
(gdb) n
648 if ( ICursorPencil.Ok() )
(gdb) n
650 ICursorPencil.SetOption ( wxIMAGE_OPTION_CUR_HOTSPOT_X, 0 );
(gdb) n
651 ICursorPencil.SetOption ( wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
(gdb) n
652 pCursorPencil = new wxCursor ( ICursorPencil );
(gdb) n
657 if ( ICursorCross.Ok() )
(gdb) n
659 ICursorCross.SetOption ( wxIMAGE_OPTION_CUR_HOTSPOT_X, 13 );
(gdb) n
660 ICursorCross.SetOption ( wxIMAGE_OPTION_CUR_HOTSPOT_Y, 12);
(gdb) n
661 pCursorCross = new wxCursor ( ICursorCross );
(gdb) n
718 pCursorArrow = new wxCursor( wxCURSOR_ARROW );
(gdb) n
719 pPlugIn_Cursor = NULL;
(gdb) n
721 SetCursor( *pCursorArrow );
(gdb) n
723 pPanTimer = new wxTimer( this, PAN_TIMER );
(gdb) n
724 pPanTimer->Stop();
(gdb) n
726 pMovementTimer = new wxTimer( this, MOVEMENT_TIMER );
(gdb) n
727 pMovementTimer->Stop();
(gdb) n
729 pMovementStopTimer = new wxTimer( this, MOVEMENT_STOP_TIMER );
(gdb) n
730 pMovementStopTimer->Stop();
(gdb) n
732 pRotDefTimer = new wxTimer( this, ROT_TIMER );
(gdb) n
733 pRotDefTimer->Stop();
(gdb) n
735 m_DoubleClickTimer = new wxTimer( this, DBLCLICK_TIMER );
(gdb) n
736 m_DoubleClickTimer->Stop();
(gdb) n
738 m_panx = m_pany = 0;
(gdb) n
739 m_panspeed = 0;
(gdb)
741 pCurTrackTimer = new wxTimer( this, CURTRACK_TIMER );
(gdb) n
742 pCurTrackTimer->Stop();
(gdb) n
743 m_curtrack_timer_msec = 10;
(gdb) n
745 m_wheelzoom_stop_oneshot = 0;
(gdb) n
746 m_last_wheel_dir = 0;
(gdb) n
748 m_RolloverPopupTimer.SetOwner( this, ROPOPUP_TIMER );
(gdb) n
750 m_rollover_popup_timer_msec = 20;
(gdb) n
752 m_b_rot_hidef = true;
(gdb) n
754 pscratch_bm = NULL;
(gdb) n
755 proute_bm = NULL;
(gdb) n
757 m_prot_bm = NULL;
(gdb) n
761 m_cs = GLOBAL_COLOR_SCHEME_DAY;
(gdb) n
762 VPoint.clat = 0;
(gdb) n
763 VPoint.clon = 0;
(gdb) n
764 VPoint.view_scale_ppm = 1;
(gdb) n
765 VPoint.Invalidate();
(gdb) n
767 m_canvas_scale_factor = 1.;
(gdb) n
769 m_canvas_width = 1000;
(gdb) n
771 m_overzoomTextWidth = 0;
(gdb) n
772 m_overzoomTextHeight = 0;
(gdb) n
775 pWorldBackgroundChart = new GSHHSChart;
(gdb) n
778 m_pEM_Feet = NULL;
(gdb) n
779 m_pEM_Meters = NULL;
(gdb) n
780 m_pEM_Fathoms = NULL;
(gdb) n
782 CreateDepthUnitEmbossMaps( GLOBAL_COLOR_SCHEME_DAY );
(gdb) s
ChartCanvas::CreateDepthUnitEmbossMaps (this=0x667648, cs=GLOBAL_COLOR_SCHEME_DAY)
at /home/aruntu/OpenCPN/src/chcanv.cpp:9663
9663 ocpnStyle::Style* style = g_StyleManager->GetCurrentStyle();
(gdb) s
ocpnStyle::StyleManager::GetCurrentStyle (this=0x64e478)
at /home/aruntu/OpenCPN/src/styles.cpp:987
987 return currentStyle;
(gdb) s
988 }
(gdb) s
ChartCanvas::CreateDepthUnitEmbossMaps (this=0x667648, cs=GLOBAL_COLOR_SCHEME_DAY)
at /home/aruntu/OpenCPN/src/chcanv.cpp:9664
9664 wxFont font;
(gdb) s
wxFont::wxFont (this=0xbeffe0ec) at /usr/local/include/wx-3.0/wx/gtk/font.h:19
19 wxFont() { }
(gdb) s
wxFontBase::wxFontBase (this=0xbeffe0ec) at /usr/local/include/wx-3.0/wx/font.h:258
258 class WXDLLIMPEXP_CORE wxFontBase : public wxGDIObject
(gdb) s
wxGDIObject::wxGDIObject (this=0xbeffe0ec) at /usr/local/include/wx-3.0/wx/gdiobj.h:41
41 class WXDLLIMPEXP_CORE wxGDIObject : public wxObject
(gdb) s
wxObject::wxObject (this=0xbeffe0ec) at /usr/local/include/wx-3.0/wx/object.h:360
360 wxObject() { m_refData = NULL; }
(gdb) s
ChartCanvas::CreateDepthUnitEmbossMaps (this=0x667648, cs=GLOBAL_COLOR_SCHEME_DAY)
at /home/aruntu/OpenCPN/src/chcanv.cpp:9665
9665 if( style->embossFont == wxEmptyString )
(gdb) s
operator== (y=..., x=0xb6f95e04 L"") at /usr/local/include/wx-3.0/wx/string.h:3985
3985 wxDEFINE_ALL_COMPARISONS(const wxChar *, const wxString&, wxCMP_WXCHAR_STRING)
(gdb) s
wxString::Cmp (this=0x657a88, pwz=0xb6f95e04 L"") at /usr/local/include/wx-3.0/wx/string.h:2109
2109 { return compare(pwz); }
(gdb) s
ChartCanvas::CreateDepthUnitEmbossMaps (this=0x667648, cs=GLOBAL_COLOR_SCHEME_DAY)
at /home/aruntu/OpenCPN/src/chcanv.cpp:9666
9666 font = wxFont( 60, wxFONTFAMILY_ROMAN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD );
(gdb) s
wxString::wxString (this=0xbeffe104, pwz=0xb6f95e04 L"")
at /usr/local/include/wx-3.0/wx/string.h:1268
1268 : m_impl(ImplStr(pwz)) {}
(gdb) s
wxString::ImplStr (str=0xb6f95e04 L"") at /usr/local/include/wx-3.0/wx/string.h:472
472 { return str ? str : wxT(""); }
(gdb) s
wxString::ConvertedBuffer<char>::ConvertedBuffer (this=0xbeffe108)
at /usr/local/include/wx-3.0/wx/string.h:3488
3488 ConvertedBuffer() : m_str(NULL) {}
(gdb) s
wxFont::wxFont (this=0xbeffe0f4, size=60, family=wxFONTFAMILY_ROMAN, style=wxFONTSTYLE_NORMAL,
weight=wxFONTWEIGHT_BOLD, underlined=false, face=..., encoding=wxFONTENCODING_DEFAULT)
at /usr/local/include/wx-3.0/wx/gtk/font.h:50
50 {
(gdb) s
wxFontBase::wxFontBase (this=0xbeffe0f4) at /usr/local/include/wx-3.0/wx/font.h:258
258 class WXDLLIMPEXP_CORE wxFontBase : public wxGDIObject
(gdb) s
wxGDIObject::wxGDIObject (this=0xbeffe0f4) at /usr/local/include/wx-3.0/wx/gdiobj.h:41
41 class WXDLLIMPEXP_CORE wxGDIObject : public wxObject
(gdb) s
wxObject::wxObject (this=0xbeffe0f4) at /usr/local/include/wx-3.0/wx/object.h:360
360 wxObject() { m_refData = NULL; }
(gdb) s
wxFont::wxFont (this=0xbeffe0f4, size=60, family=wxFONTFAMILY_ROMAN, style=wxFONTSTYLE_NORMAL,
weight=wxFONTWEIGHT_BOLD, underlined=false, face=..., encoding=wxFONTENCODING_DEFAULT)
at /usr/local/include/wx-3.0/wx/gtk/font.h:51
51 Create(size, family, style, weight, underlined, face, encoding);
(gdb) s
52 }
(gdb) s
wxFont::operator= (this=0xbeffe0ec) at /usr/local/include/wx-3.0/wx/gtk/font.h:16
16 class WXDLLIMPEXP_CORE wxFont : public wxFontBase
(gdb) s
wxFontBase::operator= (this=0xbeffe0ec) at /usr/local/include/wx-3.0/wx/font.h:258
258 class WXDLLIMPEXP_CORE wxFontBase : public wxGDIObject
(gdb) s
wxGDIObject::operator= (this=0xbeffe0ec) at /usr/local/include/wx-3.0/wx/gdiobj.h:41
41 class WXDLLIMPEXP_CORE wxGDIObject : public wxObject
(gdb) s
wxObject::operator= (this=0xbeffe0ec, other=...) at /usr/local/include/wx-3.0/wx/object.h:372
372 if ( this != &other )
(gdb) s
374 Ref(other);
(gdb) s
376 return *this;
(gdb) s
377 }
(gdb) s
wxString::~wxString (this=0xbeffe104, __in_chrg=<optimized out>)
at /usr/local/include/wx-3.0/wx/string.h:393
393 class WXDLLIMPEXP_BASE wxString
(gdb) s
wxString::ConvertedBuffer<char>::~ConvertedBuffer (this=0xbeffe108, __in_chrg=<optimized out>)
at /usr/local/include/wx-3.0/wx/string.h:3490
3490 { free(m_str); }
(gdb) s
__GI___libc_free (mem=0x0) at malloc.c:2917
2917 malloc.c: No such file or directory.
(gdb) s
2912 in malloc.c
(gdb) s
2917 in malloc.c
(gdb) s
2918 in malloc.c
(gdb) finish
Run till exit from #0 __GI___libc_free (mem=0x0) at malloc.c:2918
0x0015f516 in wxString::ConvertedBuffer<char>::~ConvertedBuffer (this=0xbeffe108,
__in_chrg=<optimized out>) at /usr/local/include/wx-3.0/wx/string.h:3490
3490 { free(m_str); }
(gdb) s
ChartCanvas::CreateDepthUnitEmbossMaps (this=0x667648, cs=GLOBAL_COLOR_SCHEME_DAY)
at /home/aruntu/OpenCPN/src/chcanv.cpp:9670
9670 int emboss_width = 500;
(gdb) s
9671 int emboss_height = 100;
(gdb) s
9674 delete m_pEM_Feet;
(gdb) s
9675 delete m_pEM_Meters;
(gdb) s
9676 delete m_pEM_Fathoms;
(gdb) s
9679 m_pEM_Feet = CreateEmbossMapData( font, emboss_width, emboss_height, _("Feet"), cs );
(gdb) s
wxString::wxString (this=0xbeffe110, psz=0x4522b0 "Feet")
at /usr/local/include/wx-3.0/wx/string.h:1242
1242 : m_impl(ImplStr(psz)) {}
(gdb) s
476 const wxMBConv& conv = wxConvLibc)
(gdb) s
wxGet_wxConvLibc () at /usr/local/include/wx-3.0/wx/strconv.h:576
576 WX_DECLARE_GLOBAL_CONV(wxMBConv, wxConvLibc)
(gdb) s
wxString::wxString (this=0xbeffe110, psz=0x4522b0 "Feet")
at /usr/local/include/wx-3.0/wx/string.h:1242
1242 : m_impl(ImplStr(psz)) {}
(gdb) s
wxString::ImplStr (str=0x4522b0 "Feet", conv=...) at /usr/local/include/wx-3.0/wx/string.h:477
477 { return ConvertStr(str, npos, conv).data; }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::wxScopedCharTypeBuffer (this=0xbeffe0b4, src=...)
at /usr/local/include/wx-3.0/wx/buffer.h:109
109 m_data = src.m_data;
(gdb) s
110 IncRef();
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::IncRef (this=0xbeffe0b4)
at /usr/local/include/wx-3.0/wx/buffer.h:187
187 if ( m_data == GetNullData() ) // exception, not ref-counted
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::GetNullData () at /usr/local/include/wx-3.0/wx/buffer.h:182
182 return static_cast<Data *>(wxPrivate::GetUntypedNullData());
(gdb) s
183 }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::IncRef (this=0xbeffe0b4)
at /usr/local/include/wx-3.0/wx/buffer.h:189
189 m_data->m_ref++;
(gdb) s
190 }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::wxScopedCharTypeBuffer (this=0xbeffe0b4, src=...)
at /usr/local/include/wx-3.0/wx/buffer.h:111
111 }
(gdb) s
wxString::SubstrBufFromType<wxScopedCharTypeBuffer<wchar_t> >::~SubstrBufFromType (
this=0xbeffe098, __in_chrg=<optimized out>) at /usr/local/include/wx-3.0/wx/string.h:425
425 struct SubstrBufFromType
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::~wxScopedCharTypeBuffer (this=0xbeffe098,
__in_chrg=<optimized out>) at /usr/local/include/wx-3.0/wx/buffer.h:127
127 DecRef();
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::DecRef (this=0xbeffe098)
at /usr/local/include/wx-3.0/wx/buffer.h:194
194 if ( m_data == GetNullData() ) // exception, not ref-counted
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::GetNullData () at /usr/local/include/wx-3.0/wx/buffer.h:182
182 return static_cast<Data *>(wxPrivate::GetUntypedNullData());
(gdb) s
183 }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::DecRef (this=0xbeffe098)
at /usr/local/include/wx-3.0/wx/buffer.h:196
196 if ( --m_data->m_ref == 0 )
(gdb) s
198 m_data = GetNullData();
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::GetNullData () at /usr/local/include/wx-3.0/wx/buffer.h:182
182 return static_cast<Data *>(wxPrivate::GetUntypedNullData());
(gdb) s
183 }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::DecRef (this=0xbeffe098)
at /usr/local/include/wx-3.0/wx/buffer.h:199
199 }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::~wxScopedCharTypeBuffer (this=0xbeffe098,
__in_chrg=<optimized out>) at /usr/local/include/wx-3.0/wx/buffer.h:128
128 }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::operator wchar_t const* (this=0xbeffe0b4)
at /usr/local/include/wx-3.0/wx/buffer.h:157
157 operator const CharType *() const { return data(); }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::data (this=0xbeffe0b4)
at /usr/local/include/wx-3.0/wx/buffer.h:156
156 const CharType *data() const { return m_data->Get(); }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::Data::Get (this=0x736390)
at /usr/local/include/wx-3.0/wx/buffer.h:171
171 CharType *Get() const { return static_cast<CharType *>(m_str); }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::~wxScopedCharTypeBuffer (this=0xbeffe0b4,
__in_chrg=<optimized out>) at /usr/local/include/wx-3.0/wx/buffer.h:127
127 DecRef();
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::DecRef (this=0xbeffe0b4)
at /usr/local/include/wx-3.0/wx/buffer.h:194
194 if ( m_data == GetNullData() ) // exception, not ref-counted
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::GetNullData () at /usr/local/include/wx-3.0/wx/buffer.h:182
182 return static_cast<Data *>(wxPrivate::GetUntypedNullData());
(gdb) s
183 }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::DecRef (this=0xbeffe0b4)
at /usr/local/include/wx-3.0/wx/buffer.h:196
196 if ( --m_data->m_ref == 0 )
(gdb) s
197 delete m_data;
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::Data::~Data (this=0x736390, __in_chrg=<optimized out>)
at /usr/local/include/wx-3.0/wx/buffer.h:164
164 struct Data : public wxPrivate::UntypedBufferData
(gdb) s
wxPrivate::UntypedBufferData::~UntypedBufferData (this=0x736390, __in_chrg=<optimized out>)
at /usr/local/include/wx-3.0/wx/buffer.h:43
43 if ( m_owned )
(gdb) s
44 free(m_str);
(gdb) s
__GI___libc_free (mem=0x77b5f0) at malloc.c:2917
2917 malloc.c: No such file or directory.
(gdb) s
2912 in malloc.c
(gdb) finish
Run till exit from #0 __GI___libc_free (mem=0x77b5f0) at malloc.c:2912
wxPrivate::UntypedBufferData::~UntypedBufferData (this=0x736390, __in_chrg=<optimized out>)
at /usr/local/include/wx-3.0/wx/buffer.h:45
45 }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::DecRef (this=0xbeffe0b4)
at /usr/local/include/wx-3.0/wx/buffer.h:198
198 m_data = GetNullData();
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::GetNullData () at /usr/local/include/wx-3.0/wx/buffer.h:182
182 return static_cast<Data *>(wxPrivate::GetUntypedNullData());
(gdb) s
183 }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::DecRef (this=0xbeffe0b4)
at /usr/local/include/wx-3.0/wx/buffer.h:199
199 }
(gdb) s
wxScopedCharTypeBuffer<wchar_t>::~wxScopedCharTypeBuffer (this=0xbeffe0b4,
__in_chrg=<optimized out>) at /usr/local/include/wx-3.0/wx/buffer.h:128
128 }
(gdb) s
wxString::ConvertedBuffer<char>::ConvertedBuffer (this=0xbeffe114)
at /usr/local/include/wx-3.0/wx/string.h:3488
3488 ConvertedBuffer() : m_str(NULL) {}
(gdb) s
wxString::wxString (this=0xbeffe11c) at /usr/local/include/wx-3.0/wx/string.h:1217
1217 wxString() {}
(gdb) s
wxString::ConvertedBuffer<char>::ConvertedBuffer (this=0xbeffe120)
at /usr/local/include/wx-3.0/wx/string.h:3488
3488 ConvertedBuffer() : m_str(NULL) {}
(gdb) s
wxGetTranslation (str=..., domain=...) at /usr/local/include/wx-3.0/wx/translation.h:246
246 wxTranslations *trans = wxTranslations::Get();
(gdb) s
248 : NULL;
(gdb) s
249 if ( transStr )
(gdb) s
254 return wxTranslations::GetUntranslatedString(str);
(gdb) s
255 }
(gdb) s
ChartCanvas::CreateEmbossMapData (this=0x667648, font=..., width=500, height=100, str=...,
cs=GLOBAL_COLOR_SCHEME_DAY) at /home/aruntu/OpenCPN/src/chcanv.cpp:9726
9726 wxBitmap bmp( width, height, -1 );
(gdb) s
wxBitmap::wxBitmap (this=0xbeffe09c, width=500, height=100, depth=-1)
at /usr/local/include/wx-3.0/wx/gtk/bitmap.h:69
69 { Create(width, height, depth); }
(gdb) s
wxBitmapBase::wxBitmapBase (this=0xbeffe09c) at /usr/local/include/wx-3.0/wx/bitmap.h:156
156 class WXDLLIMPEXP_CORE wxBitmapBase : public wxGDIObject,
(gdb) s
wxGDIObject::wxGDIObject (this=0xbeffe09c) at /usr/local/include/wx-3.0/wx/gdiobj.h:41
41 class WXDLLIMPEXP_CORE wxGDIObject : public wxObject
(gdb) s
wxObject::wxObject (this=0xbeffe09c) at /usr/local/include/wx-3.0/wx/object.h:360
360 wxObject() { m_refData = NULL; }
(gdb) s
wxBitmapHelpers::wxBitmapHelpers (this=0xbeffe09c) at /usr/local/include/wx-3.0/wx/bitmap.h:95
95 class WXDLLIMPEXP_CORE wxBitmapHelpers
(gdb) s
ChartCanvas::CreateEmbossMapData (this=0x667648, font=..., width=500, height=100, str=...,
cs=GLOBAL_COLOR_SCHEME_DAY) at /home/aruntu/OpenCPN/src/chcanv.cpp:9729
9729 wxMemoryDC temp_dc;
(gdb) s
9730 temp_dc.SelectObject( bmp );
(gdb) s
9733 temp_dc.SetBackground( *wxWHITE_BRUSH );
(gdb) ss
Undefined command: "ss". Try "help".
(gdb) s
wxDC::SetBackground (this=0xbeffe0ac, brush=...) at /usr/local/include/wx-3.0/wx/dc.h:892
892 { m_pimpl->SetBackground( brush ); }
(gdb) s
ChartCanvas::CreateEmbossMapData (this=0x667648, font=..., width=500, height=100, str=...,
cs=GLOBAL_COLOR_SCHEME_DAY) at /home/aruntu/OpenCPN/src/chcanv.cpp:9734
9734 temp_dc.SetTextBackground( *wxWHITE );
(gdb) s
wxDC::SetTextBackground (this=0xbeffe0ac, colour=...) at /usr/local/include/wx-3.0/wx/dc.h:907
907 { m_pimpl->SetTextBackground(colour); }
(gdb) s
ChartCanvas::CreateEmbossMapData (this=0x667648, font=..., width=500, height=100, str=...,
cs=GLOBAL_COLOR_SCHEME_DAY) at /home/aruntu/OpenCPN/src/chcanv.cpp:9735
9735 temp_dc.SetTextForeground( *wxBLACK );
(gdb) s
wxDC::SetTextForeground (this=0xbeffe0ac, colour=...) at /usr/local/include/wx-3.0/wx/dc.h:902
902 { m_pimpl->SetTextForeground(colour); }
(gdb) s
ChartCanvas::CreateEmbossMapData (this=0x667648, font=..., width=500, height=100, str=...,
cs=GLOBAL_COLOR_SCHEME_DAY) at /home/aruntu/OpenCPN/src/chcanv.cpp:9737
9737 temp_dc.Clear();
(gdb) s
wxDC::Clear (this=0xbeffe0ac) at /usr/local/include/wx-3.0/wx/dc.h:973
973 { m_pimpl->Clear(); }
(gdb) s
ChartCanvas::CreateEmbossMapData (this=0x667648, font=..., width=500, height=100, str=...,
cs=GLOBAL_COLOR_SCHEME_DAY) at /home/aruntu/OpenCPN/src/chcanv.cpp:9739
9739 temp_dc.SetFont( font );
(gdb) s
wxDC::SetFont (this=0xbeffe0ac, font=...) at /usr/local/include/wx-3.0/wx/dc.h:877
877 { m_pimpl->SetFont( font ); }
(gdb) s
ChartCanvas::CreateEmbossMapData (this=0x667648, font=..., width=500, height=100, str=...,
cs=GLOBAL_COLOR_SCHEME_DAY) at /home/aruntu/OpenCPN/src/chcanv.cpp:9742
9742 temp_dc.GetTextExtent( str, &str_w, &str_h );
(gdb) s
wxDC::GetTextExtent (this=0xbeffe0ac, string=..., x=0xbeffe070, y=0xbeffe074, descent=0x0,
externalLeading=0x0, theFont=0x0) at /usr/local/include/wx-3.0/wx/dc.h:944
944 { m_pimpl->DoGetTextExtent(string, x, y, descent, externalLeading, theFont); }
(gdb) s
ChartCanvas::CreateEmbossMapData (this=0x667648, font=..., width=500, height=100, str=...,
cs=GLOBAL_COLOR_SCHEME_DAY) at /home/aruntu/OpenCPN/src/chcanv.cpp:9743
9743 temp_dc.DrawText( str, width - str_w - 10, 10 );
(gdb) s
wxDC::DrawText (this=0xbeffe0ac, text=..., x=297, y=10)
at /usr/local/include/wx-3.0/wx/dc.h:1218
1218 { m_pimpl->DoDrawText(text, x, y); }
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
0xb642f862 in __GI___pthread_mutex_lock (mutex=0x6e2d656d) at pthread_mutex_lock.c:66
66 pthread_mutex_lock.c: No such file or directory.
(gdb)
|
|
|
07-07-2015, 23:18
|
#146
|
Registered User
Join Date: Sep 2012
Location: Baikal
Posts: 580
|
Re: OpenCPN Beta test 4.1.602 Release
Error displaying ENC S-57
705 version in error and did not correct
|
|
|
08-07-2015, 02:02
|
#147
|
Registered User
Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,414
|
Re: OpenCPN Beta test 4.1.602 Release
Quote:
Originally Posted by NahanniV
Thanks, but that did not fix it.
|
Ok, maybe the code needs to be injected somewhere that is hit earlier. Could you try sticking it somewhere like MyApp::OnInit() ?
Sean
|
|
|
08-07-2015, 05:27
|
#148
|
Registered User
Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
|
Re: OpenCPN Beta test 4.1.602 Release
Quote:
Originally Posted by boat_alexandra
Ok, maybe the code needs to be injected somewhere that is hit earlier. Could you try sticking it somewhere like MyApp::OnInit() ?
Sean
|
Sorry, this is probably something simple, but I'm not sure what m_bsetup is for or how to fix this code:
Code:
libs gtk+-2.0` -o CMakeFiles/opencpn.dir/src/chart1.cpp.o -c /home/aruntu/OpenCPN/src/chart1.cpp
/home/aruntu/OpenCPN/src/chart1.cpp: In member function ‘virtual bool MyApp::OnInit()’:
/home/aruntu/OpenCPN/src/chart1.cpp:1152:10: error: ‘m_bsetup’ was not declared in this scope
if( !m_bsetup ){
^
make[2]: *** [CMakeFiles/opencpn.dir/src/chart1.cpp.o] Error 1
make[2]: Leaving directory `/home/aruntu/OpenCPN/build'
make[1]: *** [CMakeFiles/opencpn.dir/all] Error 2
make[1]: Leaving directory `/home/aruntu/OpenCPN/build'
make: *** [all] Error 2
aruntu@aruntu:~/OpenCPN/build$
|
|
|
08-07-2015, 06:13
|
#149
|
Registered User
Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
|
Re: OpenCPN Beta test 4.1.602 Release
I added it like this and it fixed the problem:
Code:
bool MyApp::OnInit()
{
wxStopWatch sw;
if( !wxApp::OnInit() ) return false;
+#if defined(__WXGTK__) && defined(ARMHF) && defined(ocpnUSE_GLES)
+ // There is a race condition between cairo which is used for text rendering
+ // by gtk and EGL which without the below code causes a bus error and the
+ // program aborts before startup
+ // this hack forces cairo to load right now by rendering some text
+ // if( !m_bsetup ){
+ wxBitmap bmp( 10, 10, -1 );
+ wxMemoryDC dc;
+ dc.SelectObject( bmp );
+ dc.DrawText( _T("X"), 0, 0 );
+ // }
+#endif
Should this be added to the master ?
I am also altering glChartCanvass.cpp to disable the stencil buffer every time I get a new version. based on this conversation with Dave:
http://www.cruisersforum.com/forums/...ml#post1797100
That was to fix a problem with displaying certain features of ENCs. Perhaps that could be added by checking for MALI graphics ?
Thanks,
JM.
|
|
|
08-07-2015, 06:18
|
#150
|
Registered User
Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,537
|
Re: OpenCPN Beta test 4.1.602 Release
Quote:
Originally Posted by NahanniV
Sorry, this is probably something simple, but I'm not sure what m_bsetup is for or how to fix this code:
Code:
libs gtk+-2.0` -o CMakeFiles/opencpn.dir/src/chart1.cpp.o -c /home/aruntu/OpenCPN/src/chart1.cpp
/home/aruntu/OpenCPN/src/chart1.cpp: In member function ‘virtual bool MyApp::OnInit()’:
/home/aruntu/OpenCPN/src/chart1.cpp:1152:10: error: ‘m_bsetup’ was not declared in this scope
if( !m_bsetup ){
^
make[2]: *** [CMakeFiles/opencpn.dir/src/chart1.cpp.o] Error 1
make[2]: Leaving directory `/home/aruntu/OpenCPN/build'
make[1]: *** [CMakeFiles/opencpn.dir/all] Error 2
make[1]: Leaving directory `/home/aruntu/OpenCPN/build'
make: *** [all] Error 2
aruntu@aruntu:~/OpenCPN/build$
|
There seems to be something wrong with your compiling environment or OCPN sources. There is no "m_bsetup" in chart1.cpp but only in glChartCanvas.cpp and declared in glChartCanvas.h
You may use the grep command for searching?
Gerhard
|
|
|
|
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|
|
|