Cruisers Forum
 


Join CruisersForum Today

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 01-06-2010, 10:30   #646
Registered User
 
BernardOfCa's Avatar

Join Date: Nov 2009
Location: California
Boat: Beneteau 411
Posts: 17
Crash log

Quote:
Originally Posted by champ8242 View Post
Can you post the opencpn.Log file out of your %appdata%\opencpn directory?
Attached is the log of one of the crashes. Seems that the program gets the exit message but for some reason does not process it.

I noted that the log has time in both 12 and 24 hour formats. This could (should) be unified.
Attached Files
File Type: doc opencpn_lock.log.doc (26.5 KB, 28 views)
__________________

__________________
BernardOfCa is offline  
Old 01-06-2010, 19:09   #647
Registered User
 
Blongsea's Avatar

Join Date: Dec 2009
Location: Australia East Coast
Boat: Beneteau Oceanis 440
Posts: 36
You OpenCPN people are unbelievable! Just a quick look at the new beta version seem to realize all my wish-list items. OpenCPN is the best software I have ever used at sea, and my experience include flexible SeaClear, C-map, expensive MemoryMap and Fugawi (F..k where are we?) and some real soft-duds.
PLEASE - from my experience, don't let the (erratic...) GPS-course govern the course-up mode! Bad choice...makes me seasick! Let it be set manually (via compass-dial?) or follow a set course between way-points. Failing that, course-up may be calculated on average track during the last 5, 10 or 15 minutes.
Many sincere thanks whatever you do, I'm sure it will continue to be a impressive process of gradual improvement. I'm soon setting off north past Fraser Island towards the Australian Whitsunday Archipelago, places where one really need good "live" navigation...
__________________

__________________
Blongsea is offline  
Old 01-06-2010, 21:36   #648
Registered User

Join Date: Jun 2010
Posts: 1
Hey guys and gals,

First, I must say I love what you have done with openCPN! This is a great project that I am loving every minute of, please keep up the most excellent work!

Second, not sure if this has been reported yet, with quilting active, all object queries(right click, object query) seem to be getting their information from the largest scale chart that is enabled. After disabling the largest scale chart(right click green icon at botton, remove this chart from quilt) the query information comes from then next chart down(if I remove all but the smallest chart, I get all the query info).

It seems that openCPN is using the largest scale chart, and quilting in the smaller ones(makes sense), is it possible to do the opposite for object querys? Always grab from the smallest scale chart that has the object(usually the most detailed)? Merge info from all quilted charts?

Also, I have noticed for the US NOAA charts, object information is often in a seperate txt file, is it possible to have openCPN display the contents of the txt file instead of the name? if txtdsc ends in .txt(or other appropriate items) replace with contents of named file?

Good example for both issues : Bellingham, WA, USA

US NOAA Charts :
US5WA45M.000
US3WA02M.000
US2WC12M.000
US1WC01M.000
US1WC07M.000

DayMark at 048 45.169N 122 29.841W

on smallest scale chart, Nautical Publication information and Caution area from object query. As larger scale charts are enabled, there is less and less data until none when the largest chart is enabled.


Using openCPN 529a, Windows XP.

Tim
__________________
tkrieger is offline  
Old 01-06-2010, 22:04   #649
Registered User
 
Viking Sailor's Avatar

Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35 - s/v Feeling Good
Posts: 1,074
Dave, I found what looks like a bug in charting.cpp at around line 4300. The following code looks like it could deref a null pointer:

Code:
      
      CachedLine *pt = NULL;
      unsigned char *pCL;
      int rgbval;
      unsigned char *lp;
      unsigned char *xtemp_line;
      register int ix = xs;

      if(bUseLineCache)
      {
            if(pLineCache)
            {
//    Is the requested line in the cache, and valid?
                  pt = &pLineCache[y];
                  if(!pt->bValid)                                 // not valid, so get it
                  {
                        if(pt->pPix)
                              free(pt->pPix);
                        pt->pPix = (unsigned char *)x_malloc(Size_X);
                  }   
            }
            xtemp_line = pt->pPix;
      }
      else
            xtemp_line = (unsigned char *)x_malloc(Size_X);

I think that the code should like the following:

Code:
CachedLine *pt = NULL;
      unsigned char *pCL;
      int rgbval;
      unsigned char *lp;
      unsigned char *xtemp_line;
      register int ix = xs;

      if(bUseLineCache)
      {
                if(pLineCache)
                {
    //    Is the requested line in the cache, and valid?
                         pt = &pLineCache[y];
                         if(!pt->bValid)                                 // not valid, so get it
                         {
                                  if(pt->pPix)
                                           free(pt->pPix);
                                  pt->pPix = (unsigned char *)x_malloc(Size_X);
                         }   
                         xtemp_line = pt->pPix;
                }
      }
      else
                xtemp_line = (unsigned char *)x_malloc(Size_X);
I don't fully understand what the code is doing here so I am passing this on to you to look at and fix if needed.

Thanks,

Paul
__________________
Viking Sailor is online now  
Old 02-06-2010, 03:53   #650
Senior Cruiser
 
idpnd's Avatar

Cruisers Forum Supporter

Join Date: Sep 2007
Location: Almería, ES
Boat: Chiquita 46 - Libertalia
Posts: 1,551
Quote:
Originally Posted by Blongsea View Post
PLEASE - from my experience, don't let the (erratic...) GPS-course govern the course-up mode! Bad choice...makes me seasick! Let it be set manually (via compass-dial?) or follow a set course between way-points. Failing that, course-up may be calculated on average track during the last 5, 10 or 15 minutes.
I'm sure your kind words will be appreciated by the devs!

The course-up mode is currently undergoing some fine-tuning, and I think your suggestion may be resolved by having extreme damping of chart rotation perhaps, which may reduce processor load and permit higher-definition graphics being used?
__________________
sv Libertalia
idpnd is offline  
Old 02-06-2010, 05:39   #651
Senior Cruiser

Cruisers Forum Supporter

Join Date: Mar 2007
Location: Santa Cruz
Boat: Boatless Again
Posts: 4,335
While you're at it, please put an option in for dampening the COG and SOG anyway--for the displays as well as the AIS CPA calcuations--the program may work well on land, but it really needs this function at sea with the cheap USB gps.
__________________
donradcliffe is offline  
Old 02-06-2010, 07:18   #652
Registered User

Join Date: Jan 2010
Location: Montevideo, Uruguay
Posts: 238
Quote:
Originally Posted by Viking Sailor View Post
[COLOR=DarkRed]
Code:
CachedLine *pt = NULL;
      unsigned char *pCL;
      int rgbval;
      unsigned char *lp;
      unsigned char *xtemp_line;
      register int ix = xs;

      if(bUseLineCache)
      {
                if(pLineCache)
                {
    //    Is the requested line in the cache, and valid?
                         pt = &pLineCache[y];
                         if(!pt->bValid)                                 // not valid, so get it
                         {
                                  if(pt->pPix)
                                           free(pt->pPix);
                                  pt->pPix = (unsigned char *)x_malloc(Size_X);
                         }   
                         xtemp_line = pt->pPix;
                }
      }
      else
                xtemp_line = (unsigned char *)x_malloc(Size_X);
:
Without knowing the code, I'd say your fix would leave xtemp_line undefined if !pLineCache
__________________
dpons is offline  
Old 02-06-2010, 10:38   #653
Registered User
 
Viking Sailor's Avatar

Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35 - s/v Feeling Good
Posts: 1,074
Quote:
Originally Posted by dpons View Post
Without knowing the code, I'd say your fix would leave xtemp_line undefined if !pLineCache
Yep! That is way I passed the code back to Dave. Still not understanding what is happening -- how about the following:

Code:
      CachedLine *pt = NULL;
      unsigned char *pCL;
      int rgbval;
      unsigned char *lp;
      unsigned char *xtemp_line;
      register int ix = xs;
      
      if(bUseLineCache && pLineCache)
      {
      // Is the requested line in the cache, and valid?
         pt = &pLineCache[y];
         if(!pt->bValid)         // not valid, so get it
         {
            if(pt->pPix)
               free(pt->pPix);
            pt->pPix = (unsigned char *)x_malloc(Size_X);
         }   
         xtemp_line = pt->pPix;
      }
      else
         xtemp_line = (unsigned char *)x_malloc(Size_X);
__________________
Viking Sailor is online now  
Old 02-06-2010, 13:32   #654
Registered User

Join Date: May 2010
Posts: 49
Quilting Enabled = No Chart Preview

2.1.0 530
Eeeebuntu 4.0
EeePC 900a

Not sure if this is a bug or a feature.
I didn't see it mentioned. Apologies if it's already been addressed.

When hovering over a chart button(?) along the bottom with quilting disabled, a large thumbnail/preview of the chart is displayed in the upper left. This does not occur when quilting is enabled.
Attached Thumbnails
Click image for larger version

Name:	quilt_off.png
Views:	77
Size:	92.1 KB
ID:	16664   Click image for larger version

Name:	quilt_on.png
Views:	77
Size:	84.9 KB
ID:	16665  

__________________
bobmor99 is offline  
Old 02-06-2010, 14:36   #655
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,250
Just a feature, not a bug. All about this, and other quilt design features earlier in this tread. To see the advantage, you have to view a quilt consisting of at least a couple of charts. When hovering over a chart button, you will see the facts about the chart, and it will be painted in pink to identify exactly where in the quilt this specific chart appears. There could be a couple of different cases here.

Thomas
__________________
cagney is offline  
Old 02-06-2010, 17:48   #656
Registered User
 
Viking Sailor's Avatar

Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35 - s/v Feeling Good
Posts: 1,074
Dave,

I have a complete set of NOAA ENC's that I haven't tried loading for awhile. Gave it a shot today and 530a crashed. I kept killing and restarting it until it completed loading the charts and I had a nav screen again. So I looked around and set some breakpoints and found a section of code in s57chart.cpp at about line 520 that look like it could be a memory leak. I moved a couple of lines that tests and returns if the first line equals zero up above a buffer allocation. I cleared out the charts, restarted opencpn, and added the charts back in. Everything went smoothly and opencpn worked better overall.

I don't know if this fix is totally correct since I have no idea what the intent of the code is at this point. However, here is the changes I made:

Code:
  
//  moved these lines here
    if(strlen(first_line) == 0)
        return;

    int FEIndex;

    int MAX_LINE = 499999;
    char *buf = (char *)malloc(MAX_LINE + 1);
    int llmax = 0;

    char szFeatureName[20];

    char *br;
    char szAtt[20];
    char geoMatch[20];

    bool bMulti = false;

    char *hdr_buf = (char *)malloc(1);

//    moved these lines up
//    if(strlen(first_line) == 0)
//        return;
Paul
__________________
Viking Sailor is online now  
Old 02-06-2010, 19:51   #657
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Viking Sailor....

Good catches! How do you find these things? Sometimes peephole optimization is more effective if you don't need to get bogged down in the big picture.

1. chartimg.cpp. deref(NULL) could happen, although pLineCache is always (?) non-NULL if bUseLineCache is true, assuming the chart has been Init'ed. See line 1732. I am adopting your code fix for safety's sake.

2. s57chart. Could leak as suggested. The check for if(strlen() == 0) would imply a SENC file with a header, but no features, which I guess could happen. I have set breakpoint on the return statement after this test, and never seen a hit. Have you? Under what conditions?
Anyway, also adopting your code patch. Its an improvement in our peace of mind....

Thanks again, and keep looking!
Dave
__________________
bdbcat is offline  
Old 03-06-2010, 15:05   #658
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,295
210-527a : Route manager : reverse route and opencpn_fr_FR.po

Hello,

If I right-click on a route, a menu apprear and the item "Reverse route" is an item present in the file language opencpn_fr_FR.po

BUT

The item "Reverse route" of the route manager is not an item of present in file language opencpn_fr_FR.po . I say this because I cannot change this text in the screen when I change this text in the .po file.

This is available for beta 210-527a.

Best regards

Gillatearom
Attached Thumbnails
Click image for larger version

Name:	2010-06-03_Item_Reverse_route_Route_manager.jpg
Views:	76
Size:	22.9 KB
ID:	16698  
__________________
Gilletarom is offline  
Old 03-06-2010, 16:22   #659
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,295
Hello,

Quote:
Originally Posted by Gilletarom View Post
If I right-click on a route, ......

BUT

The item "Reverse route" of the route manager is not an item of present in file language opencpn_fr_FR.po . .....
Not take notice of the post previous. I was trapped in my research by " & "

Ne pas tenir compte du post précédent. J'ai été piégé dans ma recherche par le " & ".



Gilletarom
__________________
Gilletarom is offline  
Old 03-06-2010, 20:33   #660
Registered User
 
Viking Sailor's Avatar

Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35 - s/v Feeling Good
Posts: 1,074
Quote:
Originally Posted by bdbcat View Post
Viking Sailor....

Good catches! How do you find these things? Sometimes peephole optimization is more effective if you don't need to get bogged down in the big picture.

1. chartimg.cpp. deref(NULL) could happen, although pLineCache is always (?) non-NULL if bUseLineCache is true, assuming the chart has been Init'ed. See line 1732. I am adopting your code fix for safety's sake.

2. s57chart. Could leak as suggested. The check for if(strlen() == 0) would imply a SENC file with a header, but no features, which I guess could happen. I have set breakpoint on the return statement after this test, and never seen a hit. Have you? Under what conditions?
Anyway, also adopting your code patch. Its an improvement in our peace of mind....

Thanks again, and keep looking!
Dave
Thanks Dave!

It is a pleasure to help where I can. I only wish I had the time to learn more of the design and implementation of OpenCPN. After 40+ years of finding bugs in my own code I guess I've developed kind of a knack for spotting suspicious code.

This begs the question about the code being checked using an update commercial version of Lint for C++. From your question it is my guess that you don't have access to one. I don't have access to one either. However, their maybe someone on the forum that does. Maybe they wouldn't mind checking the OpenCPN source code and letting us know what they find.

Best regards,
Paul
__________________

__________________
Viking Sailor is online now  
Closed Thread

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN Version 1.3.5 Beta Technical bdbcat OpenCPN 544 24-03-2010 11:34
OpenCPN Version 1.3.6 Release bdbcat OpenCPN 32 30-01-2010 06:07



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 22:39.


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.