Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 28-07-2015, 08:09   #1
Registered User

Join Date: Jul 2015
Location: in vendee in france
Posts: 6
crash opencpn in ubuntu

p { margin-bottom: 0.25cm; line-height: 120%; }

I'm a compunting teacher in France.
I want to realize a project with the association « Lab-rev »
This association use opencpn with a device olinuxino A20 and LCD screen 10inchs on a distrib Debian and she would realize an autopilot of boat.
With the autopilot simrad tp32, an anemometer, a weather vane and a compass.
With the A20 Olinuxino we'll work with a CAN Bus in use a device MCP2510.
At first , I think, we'll work with the soft Qt afterward it will be necessary to use opencpn with its routing and its plugins.


For my first test i use opencpn in pc ubuntu.
I've compiled the source 4,1,705.
I added the plugins weather_routing_pi and climatology_pi.
I put a grip file for a period


when I want to compile the route between two points with weather_routing and the default polar boat the sofware crash with this message :






** (opencpn:3545): CRITICAL **: murrine_style_draw_box: assertion 'width >= -1' failed

** (opencpn:3545): CRITICAL **: murrine_style_draw_box: assertion 'height >= -1' failed

(opencpn:3545): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 17

(opencpn:3545): Gtk-CRITICAL **: IA__gtk_combo_box_set_active: assertion 'index_ >= -1' failed
The program 'opencpn' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadRequest (invalid request code or no such operation)'.
(Details: serial 23129590 error_code 1 request_code 227 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
The program 'opencpn' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadLength (poly request too large or internal Xlib length erro'.
(Details: serial 23129589 error_code 16 request_code 83 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
Erreur de segmentation (core dumped)


sorry for my English


bests regards


Michel
michelarnaud is offline   Reply With Quote
Old 28-07-2015, 09:05   #2
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: crash opencpn in ubuntu

Michel...
This info is unfortunately not useful at all to pinpoint the problem, please try to get a backtrace of the crash with a debugger, please.

Pavel
nohal is offline   Reply With Quote
Old 29-07-2015, 06:26   #3
Registered User

Join Date: Jul 2015
Location: in vendee in france
Posts: 6
Re: crash opencpn in ubuntu

hello pavel,

how manage you the debug?
usually, I use eclipse as ide.
how to include the plugins?

Michel
michelarnaud is offline   Reply With Quote
Old 29-07-2015, 07:26   #4
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: crash opencpn in ubuntu

Michel...
When debugging plugins, I usually change https://github.com/OpenCPN/OpenCPN/b...nager.cpp#L245 to point to the place where my plugins are built - eg. "/home/nohal/opencpn_src/build/plugins/climatology_pi" (if you need more of them to interract, just copy all the respective lib*_pi.so files there)
Then you should be able to use the IDE's integrated debugger as you are used to (I'm not using Eclipse, but suppose that the needed project files should be generated using cmake -G "Eclipse CDT4 - Unix Makefiles" ..)
The other option is of course using gdb directly
Code:
# gdb opencpn
(gdb) r
Make it crash
Code:
(gdb) bt
Record the crash backtrace output

There is a GUI for GDB, called ddd, but I don't use it at all - You can find a bit more on the subject at Help the Developers Fixing Bugs! | Official OpenCPN Homepage.

Pavel
nohal is offline   Reply With Quote
Old 29-07-2015, 13:36   #5
Registered User

Join Date: Jul 2015
Location: in vendee in france
Posts: 6
Re: crash opencpn in ubuntu

p { margin-bottom: 0.25cm; line-height: 120%; } hello
i compiled the pluging climatology_pi, route_pi and weather_routing in open opencpn, and there the program stop with this messages :




(gdb) r
Starting program: /usr/local/bin/opencpn
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe8c5e700 (LWP 6664)]
[New Thread 0x7fffe3fff700 (LWP 6665)]
[New Thread 0x7fffdbfff700 (LWP 6682)]
[New Thread 0x7fffdb5a1700 (LWP 6683)]
[New Thread 0x7fffdada0700 (LWP 6684)]
[New Thread 0x7fffda59f700 (LWP 6685)]
[Thread 0x7fffdada0700 (LWP 6684) exited]
[New Thread 0x7fffdada0700 (LWP 6689)]
[Thread 0x7fffda59f700 (LWP 6685) exited]
[New Thread 0x7fffda59f700 (LWP 6736)]
[New Thread 0x7fffc1c10700 (LWP 6737)]
[Thread 0x7fffc1c10700 (LWP 6737) exited]
[New Thread 0x7fffc1c10700 (LWP 6738)]

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7fffc1c10700 (LWP 6738)]
0x00000000006b9aa9 in GshhsPolyCell::ReadPolygonFile (
this=this@entry=0x7fffbc00ff50)
at /home/michel/workspaceNavigation/OpenCPN/src/gshhs.cpp:174
174 tab_data = ( x0cell / header->pasx ) * ( 180 / header->pasy )
(gdb) bt
#0 0x00000000006b9aa9 in GshhsPolyCell::ReadPolygonFile (
this=this@entry=0x7fffbc00ff50)
at /home/michel/workspaceNavigation/OpenCPN/src/gshhs.cpp:174
#1 0x00000000006b9c7b in GshhsPolyCell::GshhsPolyCell (this=0x7fffbc00ff50,
fpoly_=<optimized out>, x0_=<optimized out>, y0_=<optimized out>,
header_=<optimized out>)
at /home/michel/workspaceNavigation/OpenCPN/src/gshhs.cpp:130
#2 0x00000000006ba37f in GshhsPolyReader::crossing1 (this=0x14c09530,
trajectWorld=...)
at /home/michel/workspaceNavigation/OpenCPN/src/gshhs.cpp:656
#3 0x00000000006ba7ab in crossing1 (this=<optimized out>, trajectWorld=...)
at /home/michel/workspaceNavigation/OpenCPN/include/gshhs.h:276
#4 gshhsCrossesLand (lat1=<optimized out>, lon1=<optimized out>,
lat2=<optimized out>, lon2=<optimized out>)
at /home/michel/workspaceNavigation/OpenCPN/src/gshhs.cpp:1320
#5 0x00007fffd82d6137 in Position::Propagate (this=this@entry=0x7fffbc00fe10,
routelist=..., configuration=...)
at /home/michel/workspaceNavigation/OpenCPN/plugins/weather_routing_pi/src/RouteMap.cpp:740
#6 0x00007fffd82d6efe in IsoRoute::Propagate (this=0x7fffbc00fe90,
routelist=..., configuration=...)
at /home/michel/workspaceNavigation/OpenCPN/plugins/weather_routing_pi/src/RouteMap.cpp:1960








---Type <return> to continue, or q <return> to quit---
#7 0x00007fffd82d97e6 in IsoChron::PropagateIntoList (this=0x7fffbc00ff00,
routelist=..., configuration=...)
at /home/michel/workspaceNavigation/OpenCPN/plugins/weather_routing_pi/src/RouteMap.cpp:2073
#8 0x00007fffd82dae80 in RouteMap::Propagate (this=<optimized out>)
at /home/michel/workspaceNavigation/OpenCPN/plugins/weather_routing_pi/src/RouteMap.cpp:2342
#9 0x00007fffd82df806 in RouteMapOverlayThread::Entry (this=0x1491c8d0)
at /home/michel/workspaceNavigation/OpenCPN/plugins/weather_routing_pi/src/RouteMapOverlay.cpp:47
#10 0x00007ffff7afa18c in wxThread::CallEntry (this=this@entry=0x1491c8d0)
at ../include/wx/thrimpl.cpp:356
#11 0x00007ffff7afa7d7 in wxThreadInternal::PthreadStart (thread=0x1491c8d0)
at ../src/unix/threadpsx.cpp:867
#12 0x00007ffff4a18182 in start_thread (arg=0x7fffc1c10700)
at pthread_create.c:312
#13 0x00007ffff474547d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111





Michel
michelarnaud is offline   Reply With Quote
Old 29-07-2015, 14:39   #6
Registered User

Join Date: Jul 2015
Location: in vendee in france
Posts: 6
Re: crash opencpn in ubuntu

hello

void GshhsPolyCell::ReadPolygonFile()
{
int pos_data;
int tab_data;

# tab_data = ( x0cell / header->pasx ) * ( 180 / header->pasy )
+ ( y0cell + 90 ) / header->pasy;
fseek( fpoly, sizeof(PolygonFileHeader) + tab_data * sizeof(int), SEEK_SET );
fread( &pos_data, sizeof(int), 1, fpoly );

fseek( fpoly, pos_data, SEEK_SET );

ReadPoly( poly1 );
ReadPoly( poly2 );
ReadPoly( poly3 );
ReadPoly( poly4 );
ReadPoly( poly5 );
}

in Eclipse the program stop at this line:
# tab_data = ( x0cell / header->pasx ) * ( 180 / header->pasy )
+ ( y0cell + 90 ) / header->pasy;
and header->pasx and header->pasy are in zero.

Michel
michelarnaud is offline   Reply With Quote
Old 29-07-2015, 15:01   #7
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: crash opencpn in ubuntu

Michel...
Yes, that is visible from the backtrace as well. I still didn't have time to look at it more than that it crashes exactly here with an arithmetic exception.
Simple question to make the hunt faster - Do you have the GSSHS base chart available at all? Which resolution?

Pavel
nohal is offline   Reply With Quote
Old 30-07-2015, 01:06   #8
Registered User

Join Date: Jul 2015
Location: in vendee in france
Posts: 6
Re: crash opencpn in ubuntu

Pavel,

what is a GSSHS base chart?
It is different from a grib file?

Michel
michelarnaud is offline   Reply With Quote
Old 30-07-2015, 01:17   #9
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,796
Re: crash opencpn in ubuntu

This is the background chart which comes with OpenCPN.
It is one of the directories of the install.

You might want to install OCPN from the download site in a different machine to compare how it should look like perhaps?
bcn is offline   Reply With Quote
Old 30-07-2015, 03:14   #10
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,425
Re: crash opencpn in ubuntu

This came up again now. We really should fix this with a normal warning message. Somehow opencpn crashes if the gshhs data isn't installed.
seandepagnier is offline   Reply With Quote
Old 30-07-2015, 05:13   #11
Registered User

Join Date: Jul 2015
Location: in vendee in france
Posts: 6
Re: crash opencpn in ubuntu

hello,

it's ok.
The obtained routing is it stored in a file?
if yes where?

thank you very much.

Michel
michelarnaud is offline   Reply With Quote
Old 30-07-2015, 05:22   #12
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,796
Re: crash opencpn in ubuntu

In a file called navobj.xml
There are several generations to help recover after crash.

in
../.opencpn/

The navobj file contains the user created objects like marks, waypoints, tracks, and routes

Hubert
bcn is offline   Reply With Quote
Old 30-07-2015, 05:58   #13
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: crash opencpn in ubuntu

Quote:
Originally Posted by boat_alexandra View Post
This came up again now. We really should fix this with a normal warning message. Somehow opencpn crashes if the gshhs data isn't installed.
Sean...
I just had a very brief look at the GSHHS related code and as you can expect I didn't like what I saw - It basically ignores the fact that there is nothing at all to load... Will have a look at it over the weekend and probably will disable it completely when there is nothing at all found, which will also help to save a couple of CPU cycles.

Pavel
nohal is offline   Reply With Quote
Reply

Tags
enc, opencpn


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rebuild Texture Cache causes crash in OpenCPN 4.0 jim326 OpenCPN 12 04-04-2015 04:00
OpenCPN 3.2 Crash / Invalid NMEA in Log kiltym OpenCPN 39 29-04-2013 10:02
OpenCPN 3.0.2 Crash on Mac OS X Lion cgbosn OpenCPN 3 25-09-2012 09:06
opencpn and BU353 crash hugues1811 OpenCPN 7 23-07-2012 12:46
Crash OPENCPN-2.6.1223 on MacOsX v10.6.8 SoBoLp OpenCPN 0 12-01-2012 00:24

Advertise Here


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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.