Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 20-09-2017, 10:59   #1
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,922
Bug when first time swithing to tab tools plugin

What's described here happened when I was demonstrating OCPN for a cruising association volunteer in order to plan a public demonstration. He's used O for many years but did not use any plugins and none was showed in tools menu.
On Win 10 using O 4.6.1 and 4.8 (Today's download.)
(I also demonstrated our Forum and made a short note about this here: Help / FAQ but afterwards created this thread instead.)

O was working good but when I should demonstrate plugins and opened tools-options-plugins the tab window is empty! and the tools panel freeze. I could still zoom charts in/out but not activate any tool nor shut down O with any method but had to force it down from the Win tool. This was repeatable on first O 4.6.1 and the same for 4.8.

The last print to the log file was:
15:34:10: PlugInManager searching for PlugIns in location C:\Program Files (x86)\OpenCPN\plugins
15:34:10: Varning: Caught MainLoopException, continuing...

Now at home I was trying to reproduce the bug on my machine.
- I deactivated all plugins and restarted O. -> No failure.
- I renamed the config file and restarted. -> No failure.

I assume the failure appeared somewhere in Pluginmanager row ~400
"// this gets called every time we switch to the plugins tab"
and then some method calls chart1.cpp row ~950 "OnExceptionInMainLoop"
But I can't figure out what's wrong. Anyone else please!
The actual machine is now out of reach for me but mail correspondence is possible.

Håkan
__________________

__________________
Hakan is offline   Reply With Quote
Old 20-09-2017, 11:07   #2
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,922
Re: Bug when first time swithing to tab tools plugin

Got a nice answer from Dan: (Help / FAQ)
"Yes, it happens when a plugin dll causes a runtime exception. So you have a plugin that isn't compatible in some way"

OK - Understandable but if so the method "CheckPluginCompatibility" would take care and message the user, not freeze?

Håkan
__________________

__________________
Hakan is offline   Reply With Quote
Old 20-09-2017, 11:27   #3
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,887
Re: Bug when first time swithing to tab tools plugin

The issue is that the underlying "loadlibrary" function through an exception. Since plugin manager does not catch the exception it ripples up to myapp. I have only seen this for plugins that were truly messed up such as compiled with debug info and a nondebug version of O tries to load it.
__________________
transmitterdan is online now   Reply With Quote
Old 20-09-2017, 11:27   #4
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,887
Re: Bug when first time swithing to tab tools plugin

I have never seen it freeze. It usually just silently puts a message in the log file.

Can you tell what dll is causing it?
__________________
transmitterdan is online now   Reply With Quote
Old 20-09-2017, 11:30   #5
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,887
Re: Bug when first time swithing to tab tools plugin

Longer explanation:

When O starts it does not load every plugin dll. Only those that are enabled.

When navigating to the options->plugins tab it then tries to load every dll it finds. First it checks the wx library compatibility and whether the dll is "blacklisted". Then if all that passes it asks wx to load the library. That is where I have seen a wx exception thrown which is only caught in myapp.
__________________
transmitterdan is online now   Reply With Quote
Old 20-09-2017, 11:44   #6
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,922
Re: Bug when first time swithing to tab tools plugin

Dan..
- I can't tell which .dll caused the failure but if I remember correct only the four inbound dll's was present in the \plugin folder.

"When O starts it does not load every plugin dll. Only those that are enabled."
None of the plugins was enabled.

Maybe I should ask my fellow to delete what's in the \Plugin folder and reinstall O?
But if possible O should handle this situation in a better, novice understandable, way?

Thanks
Håkan
__________________
Hakan is offline   Reply With Quote
Old 20-09-2017, 16:06   #7
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,852
Re: Bug when first time swithing to tab tools plugin

Hakan...

Lets preserve the evidence, if we can.

Ask the user to list the Plugins that are currently in the Plugins folder. Also, capture the logfile, if possible.

As Dan says, this error is difficult to reproduce, and does not happen with a "correctly" configured system. So it is important to document carefully when we see it, to have some chance of fixing it.

Oh, and please thank the user for their patience with us....

Thanks
Dave
__________________
bdbcat is offline   Reply With Quote
Old 24-09-2017, 02:48   #8
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,922
Re: Bug when first time swithing to tab tools plugin

Dave..
OK, dir contents as a shot, log and conf files attached. (Save and discard ".pdf")

As seen the only plugins dll are OCPN inbound. And from the ini file is only grib_pi enabled.

But - From the config file, S63_pi is also enabled but dll for this pi is not in the directory! There can be several reasons for this inconsistency but can apparently happen.
Can this be cause for the "MainLoopException"?

As seen from the last log entry O can survive as long as the user is not opening options - plugins.

To test this I added a fake plugin to my ini file:
[PlugIns/hakantest_pi.dll]
bEnabled=1
But this didn't caused any loop failure. So - it's something else??

Håkan
Attached Thumbnails
Click image for larger version

Name:	2017-09-23 (1).jpg
Views:	18
Size:	234.8 KB
ID:	156577  
Attached Files
File Type: pdf opencpn.ini.pdf (10.8 KB, 3 views)
File Type: pdf opencpn.log.pdf (131.4 KB, 4 views)
__________________
Hakan is offline   Reply With Quote
Old 24-09-2017, 07:15   #9
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,887
Re: Bug when first time swithing to tab tools plugin

Hakan,

What is in the S63 folder?
__________________
transmitterdan is online now   Reply With Quote
Old 24-09-2017, 07:38   #10
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,922
Re: Bug when first time swithing to tab tools plugin

dan..
I don't know, not my PC. Reason for asking? Important enough to take a turn with the user?
Thanks
Håkan
__________________
Hakan is offline   Reply With Quote
Old 24-09-2017, 07:50   #11
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,887
Re: Bug when first time swithing to tab tools plugin

Let me look into it a little more before you bother the user.

They can probably work around this by manually enabling the ini file for all desired plugins and features with a text editor. Change the enable values and other options for the plugins they want enabled. Then they never have to visit the plugins tab. Most plugins allow setting options directly within the plugin screens. Chart downloader is an exception to that rule.

Would be interesting to know if they enable the standard plugins does O start up ok. If not then enable each plug in one by one to see which is causing a problem.
__________________
transmitterdan is online now   Reply With Quote
Old 26-09-2017, 10:21   #12
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,922
Re: Bug when first time swithing to tab tools plugin

TDan..
Yes that would work but probably also uninstall, deletion of the OpenCPN folder and reinstall. But my interest here was more to find a cause in order to avoid such failures for a newbie wo much PC interest. Dave have got som log/ini files from the user. Let's see if he find something.
Håkan
__________________
Hakan is offline   Reply With Quote
Old 28-09-2017, 06:09   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,961
Re: Bug when first time swithing to tab tools plugin

Must have been embarrassing. I have not ever had this problem "tools-options-plugins the tab window is empty!" - Sometimes slow to appear is all.Hope you find the problem.
Quote:
O was working good but when I should demonstrate plugins and opened tools-options-plugins the tab window is empty! and the tools panel freeze. I could still zoom charts in/out but not activate any tool nor shut down O with any method but had to force it down from the Win tool. This was repeatable on first O 4.6.1 and the same for 4.8.
__________________

__________________
rgleason is offline   Reply With Quote
Reply

Tags
plug

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
Plugin development... How to receive chart objects in my plugin? dmartinez OpenCPN 6 04-08-2017 00:56
Cordless tools vs. Corded Tools + Generator sully75 Construction, Maintenance & Refit 45 13-07-2014 05:16
Bug: Grib plugin fails to load on beta Version 3.1.1319 Build 2013-01-19 AlainT OpenCPN 5 01-02-2013 03:09
Long-Time Listener, First-Time Caller irvus Meets & Greets 10 15-07-2011 19:37
First time poster, long time sailer. Richkd Meets & Greets 16 31-08-2008 06:18



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 13:46.


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.