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 21-10-2016, 14:11   #1816
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: Beta Test / Technical

cagney/dan...

I think this is clear problem with some BSB chart header in the mix. The crash occurs when we are trying to convert the chart datum to the OpenCPN internal datum.

See the dump image: The function parameter from_datum_index is a nonsense number...


The header probably does not declare the datum with the "GD=" parameter, or the declaration is not recognized by O.

From the log, we should see the last chart opened, and get a clue.

I'd look at it directly, but I'm down another rathole at the moment...

Dave
bdbcat is offline   Reply With Quote
Old 21-10-2016, 15:02   #1817
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Beta Test / Technical

transmitterdan

PM sent with download link for nos/geo files. Mix in your own bsb2 if necessary.

Thanks

Thomas
cagney is offline   Reply With Quote
Old 24-10-2016, 12:31   #1818
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,151
Re: Beta Test / Technical

Quote:
Originally Posted by bdbcat View Post
Hakan...

This is wxWidgets being picky, but we do have some logic issue on busy spinner........................
Dave
Dave. You're probably aware of this but still a report for Win10, active OpenGL and quilted charts:
The "busy spinner" is quit annoying in it's frequent appearance, and it's only when I use raster charts. If raster, KAPs, and vector, CM93, charts are present the busy spinner is there as soon I zoom in and out between rasters and the only way to get rid of it is to temporary show a vector chart. Then I can go back to raster and have a normal pointer until I start to zoom in or out.
Håkan
Hakan is offline   Reply With Quote
Old 25-10-2016, 19:18   #1819
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Beta Test / Technical

Quote:
Originally Posted by bdbcat View Post
cagney/dan...

I think this is clear problem with some BSB chart header in the mix. The crash occurs when we are trying to convert the chart datum to the OpenCPN internal datum.

See the dump image: The function parameter from_datum_index is a nonsense number...
Dave,

I think I have found the problem. There is logic to check if the datum in a chart class (ChartGEO in this case) is present or of a known type. If not then we are supposed to substitute WGS84 and issue a log message as a warning. For some cases this logic is broken. The following patch fixed the chart set Thomas has identified:

Code:
diff --git a/src/chartimg.cpp b/src/chartimg.cpp
index ae4635f..f11e7a6 100644
--- a/src/chartimg.cpp
+++ b/src/chartimg.cpp
@@ -766,11 +766,11 @@ found_uclc_file:
               msg.Append(m_FullPath);
               wxLogMessage(msg);
               wxLogMessage(_T("   Default datum (WGS84) substituted."));
-
+              datum_index = DATUM_INDEX_WGS84;
               //          return INIT_FAIL_REMOVE;
               }
-          }
-
+          m_datum_index = datum_index;
+      }
 //    Convert captured plypoint information into chart COVR structures
       m_nCOVREntries = 1;
       m_pCOVRTablePoints = (int *)malloc(sizeof(int));
It's possible other chart types have a similar or related issue. I will scan through all the code to see if I find other potential ways m_datum_index might not get initialized.
transmitterdan is offline   Reply With Quote
Old 25-10-2016, 20:43   #1820
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: Beta Test / Technical

Hakan...

re: Busy Spinner persistence....

Try the current github now. I did find an "orphan" ShowBusySpinner in the GL raster code. Fixed in my quick test.

Dave
bdbcat is offline   Reply With Quote
Old 25-10-2016, 20:49   #1821
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: Beta Test / Technical

Dan...

Looks right to me. Patch committed to github.

Thanks for the targeted debugging and patch.

Good job
Dave
bdbcat is offline   Reply With Quote
Old 26-10-2016, 02:40   #1822
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,151
Re: Beta Test / Technical

Quote:
Originally Posted by bdbcat View Post
Hakan...

re: Busy Spinner persistence....

Try the current github now. I did find an "orphan" ShowBusySpinner in the GL raster code. Fixed in my quick test.

Dave
Dave: YES - fixed! The busy spinner is there but only when needed. It goes back to a normal pointer when Windows eventually is ready.
Thanks
Håkan
Hakan is offline   Reply With Quote
Old 26-10-2016, 03:09   #1823
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,151
Re: Beta Test / Technical

A strange ENC chart quilt failure:
Win10, OpenGL, quilt mode. Showing ENCs and CM93
When zooming in from CM93 the chart bars for ENC are eventually shown and I can click a ENC bar to switch to ENC charts. But sometimes are not all charts shown on screen. Some chart aren't viewed until I click the corresponding chart bar or zoom in very deep. When zooming out that chart disappears again. The charts scale is 1:1000 although surrounding charts has 1:2000 but wouldn't it be be viewed anyway?
(And changing the value for "Chart zoom/scale weighting", up/down, has no impact)
See attached images where "mouse over" info for such a chart is shown and the chart when the bar has been clicked.
Attached Thumbnails
Click image for larger version

Name:	ENC_Clipp.PNG
Views:	75
Size:	187.8 KB
ID:	133888   Click image for larger version

Name:	ENC_Clipp2.PNG
Views:	71
Size:	160.8 KB
ID:	133889  

Hakan is offline   Reply With Quote
Old 26-10-2016, 04:54   #1824
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Beta Test / Technical

Quote:
Originally Posted by cagney View Post
transmitterdan

PM sent with download link for nos/geo files. Mix in your own bsb2 if necessary.

Thanks

Thomas
Thomas,

The github code is fixed now. Some of your charts either don't have a datum or the datum is unknown to OpenCPN. This was the root cause of the seg fault. It would be better if all chart files had the correct datum. Check opencpn.log to see which charts have the issue.

Dan
transmitterdan is offline   Reply With Quote
Old 26-10-2016, 04:56   #1825
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,747
Re: Beta Test / Technical

Håkan,

have seen similar quilting with 4.4. so I don't think that this something new.
Not nice, no.

Hubert
bcn is online now   Reply With Quote
Old 26-10-2016, 05:35   #1826
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Beta Test / Technical

Dan/Dave

@Dan Thanks for fixing the GEO bug. All seems to work OK now.

@Dave It seems that I got rid of my busy cursor! Great!

Thank You!

/Thomas
cagney is offline   Reply With Quote
Old 27-10-2016, 07:50   #1827
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Beta Test / Technical

Dave,

There is a mismatched open/close on the busyspinner in function

Code:
void cm93chart::SetVPParms ( const ViewPort &vpt )
At about line 2247 in cm93.cpp the call to OCPNPlatform::HideBusySpinner(); is below the brace but the matching show call is inside that block of code. So the hide function gets called lots of times with no matching call to show. In release mode this isn't a problem but in debug mode it causes lots of traps. Moving the hide call above the brace eliminates the needless calls to hide.

Dan
transmitterdan is offline   Reply With Quote
Old 27-10-2016, 08:58   #1828
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,151
Re: Beta Test / Technical

Dan, Dave:
I´ve tested Dan's patch on Win10 Debug and it works but still I've to uncomment: if( ::wxIsBusy() in below code to get rid of the wxWidgets Debug alert when opening tools-options. (As of Dave's earlier advise)

OCPNPlatform.cpp row ~1230
Code:
void OCPNPlatform::HideBusySpinner( void )
{
#ifdef __OCPN__ANDROID__
    androidHideBusyIcon();
#else
    #if wxCHECK_VERSION(2, 9, 0 )
    //if( ::wxIsBusy() )
    {
        ::wxEndBusyCursor();
    }
    #endif
#endif    
}
Hakan is offline   Reply With Quote
Old 27-10-2016, 15:20   #1829
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Beta Test / Technical

Hakan,

I have found two places that cause the busy spinner traps. The patches below has eliminated all of them for me so far. Still doing testing. I see no reason to put the HideBusySpinner call outside the block of code that started the busy process.

Code:
diff --git a/src/chart1.cpp b/src/chart1.cpp
index 77b25f0..312a163 100644
--- a/src/chart1.cpp
+++ b/src/chart1.cpp
@@ -5460,8 +5460,8 @@ int MyFrame::DoOptionsDialog()
     if(NULL == g_options) {
         g_Platform->ShowBusySpinner();
         g_options = new options( this, -1, _("Options") );
+        g_Platform->HideBusySpinner();
     }
-    g_Platform->HideBusySpinner();

 //    Set initial Chart Dir
     g_options->SetInitChartDir( *pInit_Chart_Dir );


diff --git a/src/cm93.cpp b/src/cm93.cpp
index 12a113c..8331e54 100644
--- a/src/cm93.cpp
+++ b/src/cm93.cpp
@@ -2244,8 +2244,8 @@ void cm93chart::SetVPParms ( const ViewPort &vpt )

                         loadcell_key++;
                   }
+                  OCPNPlatform::HideBusySpinner();
             }
-            OCPNPlatform::HideBusySpinner();
       }

       if (recalc_depth) {
transmitterdan is offline   Reply With Quote
Old 28-10-2016, 01:09   #1830
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,151
Re: Beta Test / Technical

Dan..
Thanks. I've tried a little on Win10 both Debug and Release mode but couldn't recognize any big differences, or harm, using your diffs.
Quote:
Originally Posted by transmitterdan View Post
Code:
diff --git a/src/chart1.cpp b/src/chart1.cpp
index 77b25f0..312a163 100644
--- a/src/chart1.cpp
+++ b/src/chart1.cpp
@@ -5460,8 +5460,8 @@ int MyFrame::DoOptionsDialog()
     if(NULL == g_options) {
         g_Platform->ShowBusySpinner();
         g_options = new options( this, -1, _("Options") );
+        g_Platform->HideBusySpinner();
     }
-    g_Platform->HideBusySpinner();
^^For this one I couldn't detect any difference if the "hide" is in- or out-side.

Quote:
Code:
diff --git a/src/cm93.cpp b/src/cm93.cpp
index 12a113c..8331e54 100644
--- a/src/cm93.cpp
+++ b/src/cm93.cpp
@@ -2244,8 +2244,8 @@ void cm93chart::SetVPParms ( const ViewPort &vpt )

                         loadcell_key++;
                   }
+                  OCPNPlatform::HideBusySpinner();
             }
-            OCPNPlatform::HideBusySpinner();
       }

       if (recalc_depth) {
^^For CM93s I see that the busy cursor is ended before a zoom or load action is finalized. I've tried to find another place for the hide command where SetVPParms() is called for but it starts to be to complicated for me and to much of trial and error. But the best place so far is to put it further down instead:
Code:
 if (recalc_depth) {
          ClearDepthContourArray();
          BuildDepthContourArray();
      }
+      OCPNPlatform::HideBusySpinner();
}
Håkan
Hakan is offline   Reply With Quote
Reply


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
Beta Marine Diesel michaelmrc Engines and Propulsion Systems 48 23-03-2016 13:44
Need some technical advice....antennas. Just a Tinch Marine Electronics 15 01-12-2007 15:57
Blue Sea Systems Technical Brief GordMay Electrical: Batteries, Generators & Solar 0 16-03-2007 04:16
technical difficulties witchcraft The Sailor's Confessional 1 30-05-2005 14:09
Dow Corning Technical Manual GordMay The Library 0 12-04-2005 16:25

Advertise Here


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


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.