Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 30-06-2012, 15:50   #1
Registered User

Join Date: May 2010
Posts: 49
3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

I recently got Ubuntu 12.04 armhf (hf = hard float) running on my Beagleboard -xM (BBxM). It was straightforward building 3.0.0 from source on this setup. Overall performance is pretty good. OCPN (O) displays NOAA RNC (raster) charts OK.
O crashes while ingesting ENC charts. The tail of dmesg shows the following for the last three crashes.
Code:
[ 1286.496490] Alignment trap: not handling instruction ed937b00 at [<001fc308>]
[ 1286.504241] Unhandled fault: alignment exception (0x001) at 0x01847761
[ 2395.767211] Alignment trap: not handling instruction edc37a00 at [<001fcb42>]
[ 2395.774993] Unhandled fault: alignment exception (0x801) at 0x015dfeed
[ 4246.595825] Alignment trap: not handling instruction edc37a00 at [<001fcb42>]
[ 4246.603576] Unhandled fault: alignment exception (0x801) at 0x0464fbc5
I had the following in opencpn.conf prior to the crashes.
Code:
[Settings]
MEMCacheLimit=256
NCacheLimit=1
...
I also had a 1GB swapfile active. BBxM has 512M memory.

Here's the tail of opencpn.log:
Code:
17:20:44 EDT: Loading chart db version: V016
17:20:44 EDT: Chartdb: Chart directory list follows
17:20:44 EDT:   Chart directory #0: /home/ox/opencpn/charts/BSB_ROOT
17:20:44 EDT:   Chart directory #1: /home/ox/opencpn/charts/ENC_ROOTsav
17:20:44 EDT: GPS Watchdog Timeout is: 6 sec.
17:20:44 EDT: Initializing Chart /home/ox/opencpn/charts/BSB_ROOT/11488/11488_1.KAP
17:20:45 EDT: Initializing Chart /home/ox/opencpn/charts/BSB_ROOT/11480/11480_1.KAP
17:21:36 EDT: LOGBOOK:  2012-06-30 21:21:36 UTC  GPS Lat   30.19753 Lon  -81.38527 COG   83.25030 SOG   0.89
17:22:19 EDT: Initializing Chart /home/ox/opencpn/charts/ENC_ROOTsav/US4FL50M/US4FL50M.000
17:22:19 EDT: Building SENC file for /home/ox/opencpn/charts/ENC_ROOTsav/US4FL50M/US4FL50M.000 to /home/ubuntu/.opencpn/SENC/US4FL50M.S57
ubuntu@omap:~/.opencpn$
12.04 armhf might be generally buggy but no other apps have been crashing.
I'm just a Florida daysailor and it's 100F today so this is not urgent.

--Bob M
__________________

__________________
bobmor99 is offline   Reply With Quote
Old 30-06-2012, 17:09   #2
Registered User

Join Date: May 2010
Posts: 49
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

P.S. If someone could point me to the suspect source file(s), I can add some printf debuggery. And/or, is there a way to turn up the debug volume?

--Bob M
__________________

__________________
bobmor99 is offline   Reply With Quote
Old 30-06-2012, 19:41   #3
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

Bob..

Have a look at s57chart.cpp. You should find the last log message in there, and some printf that is controlled by global variable set in navutil.cpp.

Dave
__________________
bdbcat is offline   Reply With Quote
Old 02-07-2012, 17:25   #4
Registered User

Join Date: May 2010
Posts: 49
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

I'm having trouble turning up/on the debug in navutil.cpp. I've changed
Code:
 Read ( _T ( "DebugS57" ),  &g_bDebugS57, 0 );
to
Code:
printf("Hello O \n");
      Read ( _T ( "DebugS57" ),  &g_bDebugS57, 1 );
but nothing new shows up in opencpn.log when it crashes while ingesting an ENC chart. I see "Hello O" echoed to my terminal (twice) when I launch opencpn.
TIA
--Bob M
__________________
bobmor99 is offline   Reply With Quote
Old 02-07-2012, 18:16   #5
Registered User

Join Date: May 2010
Posts: 49
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

Oops, bad observation by me
Seems like a repeatable pattern.

Code:
ubuntu@omap:~$ tail -10 *.sav2
20:07:31 EDT:     Oops, removing from quilt...
20:07:31 EDT:    Quilt Compose cache miss...
20:07:31 EDT: Initializing Chart /home/ubuntu/Downloads/ENC_ROOT/US3GA10M/US3GA10M.000
20:07:31 EDT:     Oops, removing from quilt...
20:07:31 EDT:    Quilt Compose cache miss...
20:07:31 EDT: Initializing Chart /home/ubuntu/Downloads/ENC_ROOT/US4FL50M/US4FL50M.000
20:07:31 EDT:     Oops, removing from quilt...
20:07:31 EDT: Initializing Chart /home/ubuntu/Downloads/ENC_ROOT/US4FL50M/US4FL50M.000
20:07:31 EDT: Initializing Chart /home/ubuntu/Downloads/ENC_ROOT/US4FL50M/US4FL50M.000
20:07:31 EDT: Initializing Chart /home/ubuntu/Downloads/ENC_ROOT/US4FL50M/US4FL50M.000
ubuntu@omap:~$ tail -10 *.sav3
20:08:41 EDT:     Oops, removing from quilt...
20:08:41 EDT:    Quilt Compose cache miss...
20:08:41 EDT: Initializing Chart /home/ubuntu/Downloads/ENC_ROOT/US3GA10M/US3GA10M.000
20:08:41 EDT:     Oops, removing from quilt...
20:08:41 EDT:    Quilt Compose cache miss...
20:08:41 EDT: Initializing Chart /home/ubuntu/Downloads/ENC_ROOT/US4FL50M/US4FL50M.000
20:08:41 EDT:     Oops, removing from quilt...
20:08:41 EDT: Initializing Chart /home/ubuntu/Downloads/ENC_ROOT/US4FL50M/US4FL50M.000
20:08:41 EDT: Initializing Chart /home/ubuntu/Downloads/ENC_ROOT/US4FL50M/US4FL50M.000
20:08:41 EDT: Initializing Chart /home/ubuntu/Downloads/ENC_ROOT/US4FL50M/US4FL50M.000
ubuntu@omap:~$
__________________
bobmor99 is offline   Reply With Quote
Old 02-07-2012, 18:23   #6
Registered User

Join Date: May 2010
Posts: 49
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

This is my erroneous observation:
Quote:
but nothing new shows up in opencpn.log when it crashes while ingesting an ENC chart.
__________________
bobmor99 is offline   Reply With Quote
Old 02-07-2012, 18:29   #7
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

Bob...
I guess you are going to have to read the code and put some printfs into it, or bring up some kind of debugger. Does ddd run on your platform?

Dave
__________________
bdbcat is offline   Reply With Quote
Old 02-07-2012, 19:23   #8
Registered User

Join Date: May 2010
Posts: 49
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

Quote:
Does ddd run on your platform?
It does now. That's a lot of "d"s for a noob.
I can try ddd things myself or await guidance.
--Bob M
__________________
bobmor99 is offline   Reply With Quote
Old 02-07-2012, 19:36   #9
Registered User

Join Date: May 2010
Posts: 49
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

Or put some printfs in s57chart.cpp.
I don't want to use up much of your time or bandwidth on a niche.
--Bob M
__________________
bobmor99 is offline   Reply With Quote
Old 02-07-2012, 21:29   #10
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

bob...

just do this:

in the directory where O was built:

$ddd opencpn

Make it crash. Then look at status->backtrace from the menubar. This will show you where (in the source) that it failed.

Post some screenshots, and we will walk you through it.

Dave
__________________
bdbcat is offline   Reply With Quote
Old 04-07-2012, 17:14   #11
Registered User

Join Date: May 2010
Posts: 49
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

Dave..

Thanks very much for the pointers.

ddd runs on armhf but hangs when trying to get GDB running (with gdb being the inferior debugger). I played with ddd on a ubuntu 12.04 x86 host and can see that it would be very helpful. I will pursue armhf ddd problems elsewhere.

Meanwhile, seeing that O/armhf is crashing while building .opencpn/SENC/*.S57 and .BMP files (so it seems), I thought I could build those elsewhere and copy them (along with .opencpn/chartlist.dat and navobj.xml.n) to the armhf host - just to see if O could display a vector chart on armhf. Without elaborating on my difficulties, should this be doable? If you say "yes", I'll redouble my efforts and elaborate.

--Bob M
__________________
bobmor99 is offline   Reply With Quote
Old 04-07-2012, 18:36   #12
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

Bob....

SENC file and BMPs are not platform dependent. Should be fine to make them elsewhere, and copy to the target.

OpenCPN checks for the SENC file itself when trying to open an ENC. It will not build a new SENC if the edition update number(.000, .001, .002, etc) recorded in the SENC matches the edition of the cell in the database.

You do not need to port the chartlist.dat file. Might be trouble anyway, since it contains absolute path names. Just add chart directories live on the target as usual.

Good luck
Dave
__________________
bdbcat is offline   Reply With Quote
Old 09-07-2012, 17:52   #13
Registered User

Join Date: May 2010
Posts: 49
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

Quote:
ddd runs on armhf but hangs when trying to get GDB running (with gdb being the inferior debugger). I played with ddd on a ubuntu 12.04 x86 host and can see that it would be very helpful. I will pursue armhf ddd problems elsewhere.
I gave up on ddd and ran gdb instead. The "yo's" are from my printf in navutil.cpp and the "crash" is from a printf I added to s57chart.cpp just before
Code:
615                                  ppt->x = *pf++;
Code:
ubuntu@omap:~/opencpn/build$ gdb opencpn
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 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://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/ubuntu/opencpn/build/opencpn...done.
(gdb) run
Starting program: /home/ubuntu/opencpn/build/opencpn 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
yo 
yo 
[New Thread 0x4372a2a0 (LWP 4892)]
crash 

Program received signal SIGBUS, Bus error.
0x001ef42a in S57Obj::S57Obj (this=0x94fbb8, 
    first_line=0x8cd660 "OGRFeature(BRIDGE):25\n", pfpx=0xbeffe89c, dummy=0, 
    dummy2=0) at /home/ubuntu/opencpn/src/s57chart.cpp:615
615                                  ppt->x = *pf++;
(gdb) bt
#0  0x001ef42a in S57Obj::S57Obj (this=0x94fbb8, 
    first_line=0x8cd660 "OGRFeature(BRIDGE):25\n", pfpx=0xbeffe89c, dummy=0, 
    dummy2=0) at /home/ubuntu/opencpn/src/s57chart.cpp:615
#1  0x001fa768 in s57chart::BuildRAZFromSENCFile (this=0x8cbd68, FullPath=...)
    at /home/ubuntu/opencpn/src/s57chart.cpp:4736
#2  0x001f580e in s57chart::PostInit (this=0x8cbd68, flags=FULL_INIT, 
    cs=GLOBAL_COLOR_SCHEME_RGB) at /home/ubuntu/opencpn/src/s57chart.cpp:2987
#3  0x001f4cc2 in s57chart::Init (this=0x8cbd68, name=..., flags=FULL_INIT)
    at /home/ubuntu/opencpn/src/s57chart.cpp:2761
#4  0x000de150 in ChartDB::OpenChartUsingCache (this=0x86d530, dbindex=0, 
    init_flag=FULL_INIT) at /home/ubuntu/opencpn/src/chartdb.cpp:1020
#5  0x000dd62a in ChartDB::OpenChartFromDB (this=0x86d530, index=0, 
    init_flag=FULL_INIT) at /home/ubuntu/opencpn/src/chartdb.cpp:682
#6  0x000c087e in MyFrame::SelectQuiltRefdbChart (this=0xb1ece0, db_index=0)
    at /home/ubuntu/opencpn/src/chart1.cpp:7074
#7  0x000c0184 in MyFrame::HandlePianoClick (this=0xb1ece0, selected_index=0, 
    selected_dbIndex=0) at /home/ubuntu/opencpn/src/chart1.cpp:6930
#8  0x0017e822 in PianoWin::MouseEvent (this=0x879a90, event=...)
    at /home/ubuntu/opencpn/src/statwin.cpp:522
#9  0x4007654c in wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const ()
   from /usr/lib/arm-linux-gnueabihf/libwx_baseu-2.8.so.0
#10 0x400c4f08 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
   from /usr/lib/arm-linux-gnueabihf/libwx_baseu-2.8.so.0
#11 0x400c4fe2 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) ()
   from /usr/lib/arm-linux-gnueabihf/libwx_baseu-2.8.so.0
#12 0x400c5214 in wxEvtHandler::ProcessEvent(wxEvent&) ()
   from /usr/lib/arm-linux-gnueabihf/libwx_baseu-2.8.so.0
#13 0x4023039e in wxWindow::GTKProcessEvent(wxEvent&) const ()
   from /usr/lib/arm-linux-gnueabihf/libwx_gtk2u_core-2.8.so.0
#14 0x402346da in ?? ()
   from /usr/lib/arm-linux-gnueabihf/libwx_gtk2u_core-2.8.so.0
#15 0x402346da in ?? ()
   from /usr/lib/arm-linux-gnueabihf/libwx_gtk2u_core-2.8.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
__________________
bobmor99 is offline   Reply With Quote
Old 09-07-2012, 18:17   #14
Registered User

Join Date: May 2010
Posts: 49
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

Here's the tail of opencpn.log. (I did not have a GPS connected)

Code:
19:23:07 EDT: 2012-07-09
19:23:07 EDT:  -------Starting opencpn-------
19:23:07 EDT: Version 3.0.0 Build 2012-06-03
19:23:07 EDT: MemoryStatus:  mem_total: 478 mb,  mem_initial: 24 mb
19:23:07 EDT: SData_Locn is /usr/local/share/opencpn/
19:23:07 EDT: Using existing Config_File: /home/ubuntu/.opencpn/opencpn.conf
19:23:07 EDT: Setting Viewpoint Lat/Lon 30.1974, -81.2892
19:23:07 EDT: Setting Ownship Lat/Lon 30.1975, -81.3853
19:23:08 EDT: System default Language:  en_US
19:23:08 EDT: Opencpn language set to:  en_US
19:23:09 EDT: ChartSymbols loaded from /usr/local/share/opencpn/s57data/chartsymbols.xml
19:23:10 EDT: Using s57data in /usr/local/share/opencpn/s57data
19:23:10 EDT: Setting Viewpoint Lat/Lon 30.1974, -81.2892
19:23:10 EDT: Setting Ownship Lat/Lon 30.1975, -81.3853
19:23:10 EDT: NMEA Data Source is....LIBGPS:localhost
19:23:10 EDT: LIBGPS:  Using libgps API=20
19:23:13 EDT: LIBGPS: Initial Open()failed, assuming libgps version at least 3.0
19:23:13 EDT: AIS Data Source is....None
19:23:14 EDT: Using WVSChart datafile: /usr/local/share/opencpn/wvsdata/wvs43.dat
19:23:14 EDT: NMEA AutoPilot Port is....None
19:23:15 EDT: PlugInManager searching for PlugIns in location /usr/local/lib/opencpn
19:23:15 EDT: PlugInManager: Loading PlugIn: /usr/local/lib/opencpn/libdashboard_pi.so
19:23:16 EDT:   /usr/local/lib/opencpn/libdashboard_pi.so Version detected: 106
19:23:16 EDT: PlugInManager: Loading PlugIn: /usr/local/lib/opencpn/libgrib_pi.so
19:23:17 EDT:   /usr/local/lib/opencpn/libgrib_pi.so Version detected: 107
19:23:17 EDT: ChartDB Cache policy:  Max open chart limit is 20.
19:23:17 EDT: Loading chart db version: V016
19:23:17 EDT: Chartdb: Chart directory list follows
19:23:17 EDT:   Chart directory #0: /home/ubuntu/Downloads/US4GA11M
19:23:17 EDT: GPS Watchdog Timeout is: 6 sec.
19:23:28 EDT: Initializing Chart /home/ubuntu/Downloads/US4GA11M/US4GA11M.000
ubuntu@omap:~/opencpn/build$
__________________
bobmor99 is offline   Reply With Quote
Old 09-07-2012, 18:39   #15
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: 3.0.0 on Ubuntu 12.04 armhf - Crashes When Opening ENC

Bob...

Instructive, to say the least.

1. My line numbers do not match up with yours. What version of O are you building?

2. The crash comes after the SENC is built. Seems like the SENC is bad...

So, if you copy that SENC (US4GA11M.S57) to a standard (i386) Ubuntu 12.04 build, will it work?

Or, vice-versa, if you take that SENC made on an i386 system and copy it to the armhf system, will it work?

SENCs are portable, and contain no hardcoded files, etc.

Dave
__________________

__________________
bdbcat is offline   Reply With Quote
Reply

Tags
enc

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 20:21.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.