Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 23-11-2015, 03:54   #211
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 4,019
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by Hakan View Post
Dan
I use to have the VDR slider on ~15-20%, that equals around 700 B/s.
Any other test you imagine I could do?
Thanks
Håkan
Håkan,

I tried today lots of things to duplicate this memory leak issue but not successful. I don't think it is the UDP multiplexer. I ran over 1800 nautical miles via the UDP input. Memory allocated according to Window 10 task manager actually decreased from start to finish. At one point it was 198MB but now it is 80MB after about 12 hours. I will keep watching for several more hours.

I also ran NMEA data in through the TCP input and it did not show any evidence of a memory leak either.

I could imagine there is some issue with the OpenGL drivers on your system but that seems unlikely. You could try turning OpenGL off to see if that changes the story. But I cannot explain why I don't see the same memory leak as you have seen.
__________________

__________________
transmitterdan is offline   Reply With Quote
Old 23-11-2015, 04:07   #212
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: OpenCPN Beta test 4.1.1108 Release

Additional info for Windows (UDP?) memory built up issue. (See: OpenCPN Beta test 4.1.1108 Release)
I have tested some old saved install packages:
Version - Builds up memory
4.0 - No
4.1.0 - No
4.1.915 - Yes
4.1.1108 - Yes
I didn't build new versions in between 4.1.0 and 4.1.915 since I have to change /Buildwin/.. ,and so on.., but I can do that if it helps?

Håkan
__________________

__________________
Hakan is offline   Reply With Quote
Old 23-11-2015, 04:24   #213
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by transmitterdan View Post
Håkan,
.............
I could imagine there is some issue with the OpenGL drivers on your system but that seems unlikely. You could try turning OpenGL off to see if that changes the story. But I cannot explain why I don't see the same memory leak as you have seen.
Dan, good point!
On 4.1.1108 and the same VDR-UDP
OpenGl - on - Memory leak.
OpenGl - off - No memory leak.
Raster/vector charts - no difference.
The previous version tests was all using OpenGl.

So, the UDP relation is probably a bad trace, it's more related a moving boat? The "funny" thing is that the memory leak continues after incoming NMEA is switched off.

Edit: OpenGl:
Code:
5:44:44 PM: OpenGL-> Renderer String: Intel(R) HD Graphics 3000
5:44:44 PM: OpenGL-> Version reported:  3.1.0 - Build 9.17.10.4229
5:44:44 PM: OpenGL-> Detected Intel renderer, disabling stencil buffer
5:44:44 PM: OpenGL-> Texture rectangle format: de1
5:44:44 PM: OpenGL-> glGenerateMipmap unavailable
5:44:44 PM: OpenGL-> Detected Windows Intel renderer, disabling Vertexbuffer Objects
5:44:44 PM: OpenGL-> Vertexbuffer Objects unavailable
5:44:44 PM: OpenGL-> Using Framebuffer Objects
5:44:44 PM: OpenGL-> Using FBO Stencil buffer
5:44:44 PM: OpenGL-> Using Depth buffer clipping
5:44:44 PM: OpenGL-> Using s3tc dxt1 compression
5:44:44 PM: OpenGL-> Compressed tile size: 128kb (6:1)
5:44:44 PM: OpenGL-> Minimum cartographic line width:  1.0
5:44:44 PM: OpenGL-> Minimum symbol line width:  1.0
Håkan
__________________
Hakan is offline   Reply With Quote
Old 23-11-2015, 04:42   #214
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 4,019
Re: OpenCPN Beta test 4.1.1108 Release

Maybe your OpenGL driver is way out of date? I looked here:

https://downloadcenter.intel.com/sea...+graphics+3000

and see that the current version is 15. something.
__________________
transmitterdan is offline   Reply With Quote
Old 23-11-2015, 05:17   #215
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by Hakan View Post
Additional info for Windows (UDP?) memory built up issue. (See: OpenCPN Beta test 4.1.1108 Release)
I have tested some old saved install packages:
Version - Builds up memory
4.0 - No
4.1.0 - No
4.1.915 - Yes
4.1.1108 - Yes
I didn't build new versions in between 4.1.0 and 4.1.915 since I have to change /Buildwin/.. ,and so on.., but I can do that if it helps?

Håkan
I think if you could build the versions between and use git-bisect to find which commit caused it would be very helpful. Maybe buggy video drivers, but if we can deal with it in opencpn somehow it would be easiest.
__________________
boat_alexandra is offline   Reply With Quote
Old 23-11-2015, 05:20   #216
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 300
Re: OpenCPN Beta test 4.1.1108 Release

Not sure if I am seeing the same thing, but when checking my mem and resourses I see a steadily increase. Until I stop the AIS from, then usage becomes stable.
Attached a file with "top" readings. At line 126 the AIS was stopped, but GPS and wind/weather input continued. All input using UDP
Attached Files
File Type: doc testMemLeak.txt.doc (12.5 KB, 10 views)
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 23-11-2015, 05:52   #217
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
Re: OpenCPN Beta test 4.1.1108 Release

There are at least 3 potential memory leaks in jsonval.cpp

Gerhard
Attached Thumbnails
Click image for larger version

Name:	MemoryLeak1.png
Views:	66
Size:	45.0 KB
ID:	113609   Click image for larger version

Name:	MemoryLeak2.png
Views:	66
Size:	79.1 KB
ID:	113610  

Click image for larger version

Name:	MemoryLeak3.png
Views:	64
Size:	76.6 KB
ID:	113611  
__________________
CarCode is online now   Reply With Quote
Old 23-11-2015, 06:16   #218
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,332
Re: OpenCPN Beta test 4.1.1108 Release

As a newby I am very impressed by the persitence, sleuthing and knowledge.
__________________
rgleason is online now   Reply With Quote
Old 23-11-2015, 06:37   #219
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: OpenCPN Beta test 4.1.1108 Release

Dan..Sean.. Video drivers.
I think I've latest possible drivers on all my PCs. (Dan, I'll check your link but it's usual that Intel drivers not fit directly but I've to take from HP/Lenovo instead.)
I've four different PCs and all has Intel video charts and the OpenGl compression type and memory leak patterns are the same for all.

Sean, your point to find a OCPN solution is fine.
Before I start to rearrange my repository and bisect up could you judge Gerhard's points?
Thanks
Håkan
__________________
Hakan is offline   Reply With Quote
Old 23-11-2015, 07:13   #220
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 4,019
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by CarCode View Post
There are at least 3 potential memory leaks in jsonval.cpp

Gerhard
Gerhard,

I am not an experienced developer like you. Can you explain in more detail how the leak can happen? If I know the sequence of events how it can happen then I would try to find a way to prove it happens or not.

This code was not written for OpenCPN as you know. It is developed many years ago. I could not find any reference on internet search about leaks in this widely used module.
__________________
transmitterdan is offline   Reply With Quote
Old 23-11-2015, 07:50   #221
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by transmitterdan View Post
Gerhard,

I am not an experienced developer like you. Can you explain in more detail how the leak can happen? If I know the sequence of events how it can happen then I would try to find a way to prove it happens or not.

This code was not written for OpenCPN as you know. It is developed many years ago. I could not find any reference on internet search about leaks in this widely used module.
If you use a smart compiler like LLVM you will see a lot of other issues in the OCPN code like dead variables, dereferenced null pointers, garbage or undefined values and so on. Smart compilers makes some assumptions which might happen or not during runtime of the program and warns the developer about them. It is up to the developer to strengthen the code because such issues are often gateways for hackers for taking over the machine. Well known example of such code is the Flash Player which has every time such holes.

Gerhard
__________________
CarCode is online now   Reply With Quote
Old 23-11-2015, 08:11   #222
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by Hakan View Post
Dan..Sean.. Video drivers.
I think I've latest possible drivers on all my PCs. (Dan, I'll check your link but it's usual that Intel drivers not fit directly but I've to take from HP/Lenovo instead.)
I've four different PCs and all has Intel video charts and the OpenGl compression type and memory leak patterns are the same for all.

Sean, your point to find a OCPN solution is fine.
Before I start to rearrange my repository and bisect up could you judge Gerhard's points?
Thanks
Håkan
Gerhard's points about json values has nothing to do with rendering with opengl.

Most of the points these automatic code checkers find turn out to be cases which can never actually occur in practice. The checker is not smart enough to understand a wider picture.
__________________
boat_alexandra is offline   Reply With Quote
Old 23-11-2015, 08:58   #223
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
Re: OpenCPN Beta test 4.1.1108 Release

Sadly developers even don't see when they mismatches datatypes. Last example was a declared struct which was referenced in the next file as a class as seen in SweepPlotDialog.h
With a smart compiler this is seen immediately.

Gerhard
__________________
CarCode is online now   Reply With Quote
Old 23-11-2015, 09:07   #224
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by CarCode View Post
Sadly developers even don't see when they mismatches datatypes. Last example was a declared struct which was referenced in the next file as a class as seen in SweepPlotDialog.h
With a smart compiler this is seen immediately.

Gerhard
Please submit a pull request. I don't know what is wrong so I need to know what is right.

Interchanging struct and class in this way technically doesn't matter. For forward declarations such as this it is a synonym. So I think your smart compiler isn't so smart.
__________________
boat_alexandra is offline   Reply With Quote
Old 23-11-2015, 10:52   #225
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: OpenCPN Beta test 4.1.1108 Release

Dan..Sean..
I'll start bisect up from 4.1.0
Håkan
__________________

__________________
Hakan is offline   Reply With Quote
Reply

Tags
enc, lease, opencpn

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 Beta test 4.1.1022 Release bdbcat OpenCPN 122 07-11-2015 02:12
OpenCPN Beta test 4.1.925 Release bdbcat OpenCPN 177 04-11-2015 09:16
OpenCPN Beta test 4.1.602 Release bdbcat OpenCPN 193 13-10-2015 09:19
OpenCPN Version 2.2 Beta Test bdbcat OpenCPN 437 15-12-2010 20:17
OpenCPN Version 2.2 Beta Test Bugs / Discussion bdbcat OpenCPN 120 26-09-2010 03:53



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 11:15.


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.