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 29-03-2015, 13:25   #1366
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,541
Re: Beta Test / Technical

Quote:
Originally Posted by rgleason View Post
Thanks Gerhard. Will try that.

Sent from my SCH-I545 using Cruisers Sailing Forum mobile app
Meanwhile the github source was repaired, no need for commenting out anymore.

Gerhard
CarCode is offline   Reply With Quote
Old 29-03-2015, 22:40   #1367
Registered User

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

Black squares on vectors introduced in commit Mars 29.

When I move the mouse some parts of the vector charts (CM93) become black, see the pictures.

It's in WinXP, haven't tried W7, but not in Ubuntu.
The blacks pops up as soon as I move the mouse and disappears when the chart is moved by the arrows or zooming etc.
It's in vector and not in raster charts.
It's when OpenGL is on but not when OpenGL is off.
It's when quilting is on but not when it's off.
It's not a particular position but happens when several chart parts are present, many red squares.

Håkan
Attached Thumbnails
Click image for larger version

Name:	Capt1.jpg
Views:	221
Size:	411.8 KB
ID:	99695   Click image for larger version

Name:	Capt2.jpg
Views:	262
Size:	413.2 KB
ID:	99696  

Hakan is offline   Reply With Quote
Old 31-03-2015, 02:16   #1368
Registered User

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

More about the black squares bug reported in previous post:
I've tried to trace back in commits. The bug was introduced by either of:
>>Merge branch 'seandepagnier-builtin_glshim'<<
or
>>Merge pull request #260 from seandepagnier/grib_optimizations2<<

Sorry, I can't be more specific due to build errors in WinXP for both of these commits.

These are the last portion of my method to find the causing commit:
Code:
C:\Builds\OpenCPN\OpenCPN>git checkout 159783401b7623578a2174e58667e3d63d375887
Previous HEAD position was e56e9f5... Preserve visibility attributes for GPX files originating from OpenCPN (FS#1667)
HEAD is now at 1597834... Correct datum initialization for quilted non-WGS84 charts in OpenGL mode. (FS#????)
>>> Still black squares - next commit


C:\Builds\OpenCPN\OpenCPN>git checkout f42dbf879d7d7e381391da2eaf9e02f4d202fc01
Previous HEAD position was 1597834... Correct datum initialization for quilted non-WGS84 charts in OpenGL mode. (FS#????)
HEAD is now at f42dbf8... Disable C99 external inline function declarations when not building with GCC5
>>> Still black squares - next commit

C:\Builds\OpenCPN\OpenCPN>git checkout b40440f358596d1afd9bc3faffd0148f01cb3806
Previous HEAD position was f42dbf8... Disable C99 external inline function declarations when not building with GCC5
HEAD is now at b40440f... Merge branch 'seandepagnier-builtin_glshim'
>>Build errors (inline...)couldn't test, take next commit

C:\Builds\OpenCPN\OpenCPN>gitk
C:\Builds\OpenCPN\OpenCPN>git checkout f799acce589cf27e748a5293c773cd80b91e257a
Previous HEAD position was b40440f... Merge branch 'seandepagnier-builtin_glshim'
HEAD is now at f799acc... Merge pull request #260 from seandepagnier/grib_optimizations2
>>Build errors (inline...)couldn't test, take next commit

C:\Builds\OpenCPN\OpenCPN>git checkout 25d8d2a9ee6a4d075912dc0523027c90aa0c2492
Previous HEAD position was f799acc... Merge pull request #260 from seandepagnier/grib_optimizations2
HEAD is now at 25d8d2a... Merge remote-tracking branch 'upstream/master' into grib_optimizations2
>>> OK - no black squares.
Håkan
Hakan is offline   Reply With Quote
Old 01-04-2015, 17:31   #1369
Marine Service Provider
 
bdbcat's Avatar

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

Håkan
I cannot reproduce the black squares on quilted cm93 in linux nor XP.
Have you tried W7?

Anyone else see anything like this?

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 01-04-2015, 19:31   #1370
Marine Service Provider
 
bdbcat's Avatar

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

Håkan...

Looking at the code some more, I'll make a guess at the problem.

Will you please try the following patch, and see if it makes a difference?





Code:
diff --git a/src/cm93.cpp b/src/cm93.cpp
index d4bd6da..8334671 100644
--- a/src/cm93.cpp
+++ b/src/cm93.cpp
@@ -4891,6 +4891,22 @@ void cm93compchart::SetVPParms ( const ViewPort &vpt )
         ViewPort vp = vpt;
         AdjustVP ( m_vpt, vp );
     }
+    
+    {
+        m_vpt = vpt;                              // save a copy
+        
+        int cmscale = GetCMScaleFromVP ( vpt );         // First order calculation of cmscale
+        
+        m_cmscale = PrepareChartScale ( vpt, cmscale );
+        
+        //    Continuoesly update the composite chart edition date to the latest cell decoded
+        if ( m_pcm93chart_array[cmscale] )
+        {
+            if ( m_pcm93chart_array[cmscale]->GetEditionDate().IsLaterThan ( m_EdDate ) )
+                m_EdDate = m_pcm93chart_array[cmscale]->GetEditionDate();
+        }
+    }
+    
 }
 
 int cm93compchart::PrepareChartScale ( const ViewPort &vpt, int cmscale, bool bOZ_protect )
Thanks
Dave
bdbcat is offline   Reply With Quote
Old 02-04-2015, 02:20   #1371
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,541
Re: Beta Test / Technical

With this patch the problem was gone (Mac OS X has had the same before).

Gerhard
CarCode is offline   Reply With Quote
Old 02-04-2015, 06:14   #1372
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Beta Test / Technical

PrepareChartScale is expensive so it's better not to call it unless it's needed.

I don't see how it can break on some platforms as this logic should be platform independent.
seandepagnier is offline   Reply With Quote
Old 02-04-2015, 07:31   #1373
Marine Service Provider
 
bdbcat's Avatar

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

Sean...

I don't either, and I cannot reproduce it to confirm.
Waiting on Hakan's report....

Dave
bdbcat is offline   Reply With Quote
Old 02-04-2015, 11:31   #1374
Registered User

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

Dave..
Sorry for the delay, been working a lot for two days.

The patch to CM93.cpp did the thing for the black squares. I first pulled the latest git - as expected, no change to the blacks.
Added your patch - Now I can move the mouse and zoom in and out and drag the chart wherever I want and I can't force the black squares to appear.
But - The CPU load when I use raster, e.g. CM93, has increased a lot.
In quilt mode:
vector charts: 2%
CM93 chart: first 99 and then stabilized on 34-48%
Non quilt mode:
raster charts: 2%
CM93: direct to ~45% (No init on 99%)
Between the tests I didn't changed anything like zoom or position just switched charts.

When using OCPN ver 4.0 and CM93 the corresponding CPU load is ~3-5%.

Thanks Håkan
Hakan is offline   Reply With Quote
Old 02-04-2015, 13:20   #1375
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,541
Re: Beta Test / Technical

Quote:
Originally Posted by Hakan View Post
Dave..
Sorry for the delay, been working a lot for two days.

The patch to CM93.cpp did the thing for the black squares. I first pulled the latest git - as expected, no change to the blacks.
Added your patch - Now I can move the mouse and zoom in and out and drag the chart wherever I want and I can't force the black squares to appear.
But - The CPU load when I use raster, e.g. CM93, has increased a lot.
In quilt mode:
vector charts: 2%
CM93 chart: first 99 and then stabilized on 34-48%
Non quilt mode:
raster charts: 2%
CM93: direct to ~45% (No init on 99%)
Between the tests I didn't changed anything like zoom or position just switched charts.

When using OCPN ver 4.0 and CM93 the corresponding CPU load is ~3-5%.

Thanks Håkan
Not here with Mac OS X. CPU usage is still between 3 to 4% quilting on or off and with this patch.

Gerhard
CarCode is offline   Reply With Quote
Old 02-04-2015, 14:05   #1376
Registered User

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

Just to clarify after some verification:
It was not the patch making the increased CPU load. It's there also without the patch but else the present 4.1
Håkan
Hakan is offline   Reply With Quote
Old 02-04-2015, 17:34   #1377
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Beta Test / Technical

Quote:
Originally Posted by Hakan View Post
Just to clarify after some verification:
It was not the patch making the increased CPU load. It's there also without the patch but else the present 4.1
Håkan
I am trying to reproduce your issue with the black squares and can't seem to.

You are saying they appear just when moving the mouse over them?

Further the patch shouldn't make a difference for opengl or not.. it must have something to do with inconsistent the graphics drivers, and that can be handled more efficiently than calling PrepareChartScale.


It would be helpful if you could narrow down the patch that causes increased cpu.
seandepagnier is offline   Reply With Quote
Old 02-04-2015, 22:58   #1378
Registered User

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

Quote:
Originally Posted by boat_alexandra View Post
............You are saying they appear just when moving the mouse over them?
Nearly correct -- They appear when moving the mouse anywhere on OCPN canvas, not particularly over the zone that becomes black.

Quote:
Further the patch shouldn't make a difference for opengl or not.. it must have something to do with inconsistent the graphics drivers, and that can be handled more efficiently than calling PrepareChartScale.
I don't fully understand the technics but my graphic card/driver has created troubles before. But I've a rather common machine, HP/Compaq nx8200 and no better drivers are available. Since we still indent to support XP, machines like mine wouldn't be to rare out there?
Could it be that Dave's patch was more to narrow the problem than a final solution?
Quote:
It would be helpful if you could narrow down the patch that causes increased cpu.
Well, I've tried but didn't succeed to build the causing patches. See my method here: http://www.cruisersforum.com/forums/...ml#post1789497
The build errors are to complicated for me but the same was discussed here: http://www.cruisersforum.com/forums/...ml#post1785630 Do you want me do comment out what's mentioned there and see if I can narrow down more precise?

Håkan
Hakan is offline   Reply With Quote
Old 03-04-2015, 11:05   #1379
Marine Service Provider
 
bdbcat's Avatar

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

Hakan...

Please try to comment out the

Code:
extern inline.....
stuff in the referenced page, and try the build again. We want to localize the offending commit as closely as possible.

Dave
bdbcat is offline   Reply With Quote
Old 04-04-2015, 07:58   #1380
Registered User

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

Dave..
I'm working on it.....There are some disturbing social demands due to the Easter.
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 15:23.


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.