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 24-08-2011, 06:33   #1
cruiser

Join Date: May 2007
Location: Brisbane AUS
Boat: Cowther 43 - Hunter 40.5
Posts: 1,006
Program Won't Open

I downloaded the latest version and it has stopped working on both my home PC and laptop. The program seems to open but a window will not open. I have W7 and when I hold my mouse over the icon in the task bar it shows a miniature version of the openCPN window but there is no actual large version anywhere.

Anyone got a fix? I even tried to un install the lot and re install it and it does not work. The thing is the new version worked fine for a while then stopped.
dennisail is offline   Reply With Quote
Old 24-08-2011, 09:37   #2
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Program won't open

Quote:
Originally Posted by dennisail View Post
I downloaded the latest version and it has stopped working on both my home PC and laptop. The program seems to open but a window will not open. I have W7 and when I hold my mouse over the icon in the task bar it shows a miniature version of the openCPN window but there is no actual large version anywhere.

Anyone got a fix? I even tried to un install the lot and re install it and it does not work. The thing is the new version worked fine for a while then stopped.
Funny thing. I fired up my virtual W7 and updated OpenCPN to 2.5 and guess what? I had the same problem as you straight away!!
Close all instances of opencpn.
Go to C:\\ProgramData\opencpn. Adjust your settings so that hidden files and system files are visible. Also change settings so that all file extensions are shown.
Rename the file "opencpn.ini" to for example "opencpn.ini.doc" and ignore the name change warnings. It would be good if you could publish the file on this forum, so the programmer could have a look.
Restart the the program. Should work now, but you will have to adjust your settings, charts, plugins etc as if this was a new install.

Thomas
cagney is offline   Reply With Quote
Old 24-08-2011, 15:24   #3
cruiser

Join Date: May 2007
Location: Brisbane AUS
Boat: Cowther 43 - Hunter 40.5
Posts: 1,006
Re: Program Won't Open

Thanks. That worked. Will there be a drawback? If anyone here needs the file PM me your email address and I will send the file if it helps create a more stable program.
dennisail is offline   Reply With Quote
Old 24-08-2011, 18:14   #4
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Program Won't Open

dennisail....

Please email to me the .ini file that fails to open on Win7.

You will find my email address on Help->Authors tab.

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 24-08-2011, 18:35   #5
cruiser

Join Date: May 2007
Location: Brisbane AUS
Boat: Cowther 43 - Hunter 40.5
Posts: 1,006
Re: Program Won't Open

Thanks for the support. File sent.
dennisail is offline   Reply With Quote
Old 24-08-2011, 18:50   #6
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Program Won't Open

Cagney....

I have looked Win7 won't start issue; I think I have it.

in .ini file, this looks bogus:

Code:
FrameWinPosX=-31984
FrameWinPosY=-31940
Sure enough, in chart1.cpp(~2470)

Code:
        if((g_nframewin_posx < dsize.x) && (g_nframewin_posy < dsize.y))
              position = wxPoint(g_nframewin_posx, g_nframewin_posy);
Surely, the code should read:

if((abs(g_nframewin_posx) < dsize.x) && (abs(g_nframewin_posy) < dsize.y))
position = wxPoint(g_nframewin_posx, g_nframewin_posy);


Would you please check this by hacking the .ini and prove that negative values for FrameWinPosX/Y cause the indicated behavior on Win7?

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 24-08-2011, 19:59   #7
cruiser

Join Date: May 2007
Location: Brisbane AUS
Boat: Cowther 43 - Hunter 40.5
Posts: 1,006
Re: Program Won't Open

Seems like some forward progress.
dennisail is offline   Reply With Quote
Old 24-08-2011, 23:34   #8
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,207
Re: Program Won't Open

Dave...
the fix works OK

Pavel
nohal is offline   Reply With Quote
Old 25-08-2011, 09:41   #9
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Program Won't Open

Dave

Quote:
Would you please check this by hacking the .ini and prove that negative values for FrameWinPosX/Y cause the indicated behavior on Win7?
I can confirm what you say. I had my own bad ini file with similar bad FrameWinPosX/Y values, to test with(-32000/-32000. Note that it is not enough with just negative values, they must be large enough to put the program frame outside the screen. Testing with -320/-320 brings up a window, a bit awkward to handle, though.
The next question is, "what in the code creates the large x/y values"?

Thomas
cagney is offline   Reply With Quote
Old 25-08-2011, 12:07   #10
Registered User

Join Date: Aug 2011
Posts: 6
Re: Program Won't Open

Hi,

I have the same problem with OpenCPN 2.5 in Win7. Have renamed the .ini file and created a new - but I don't have any ideas about the code you are refering to...

Is there a general fix - a fix that will last as I have seen the problem several times by now?

Rgd.
perhorn is offline   Reply With Quote
Old 25-08-2011, 16:54   #11
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Program Won't Open

Thomas, et al...

The bad values for FrameWinPosX/Y come from the code triggered when the main OCPN frame is moved on screen.

Code:
void MyFrame::OnMove(wxMoveEvent& event)
{
      if(g_FloatingToolbarDialog)
            g_FloatingToolbarDialog->RePosition();

      UpdateGPSCompassStatusBox(true);

      g_nframewin_posx = event.GetPosition().x;
      g_nframewin_posy = event.GetPosition().y;

}
Why the values are nonsensical for Win7 is unknown. We need some testing:

1. Of course, if the application window is Maximized, then it is impossible to "move" the frame. In this case, the values saved in the .ini file should be (probably) (0,0). Is this the case?

2. In the case where the application window is smaller than full screen, then dragging the OCPN main frame will produce changes in the .ini FrameWinPosX/Y values. The next time the application is started, the main frame should appear at the same place where it was left on the previous closure.
This works OK on linux, and should be easy to test on Win7.

3. Also, does all this work right on XP, always? Does for me.....

What we need (as usual) is a repeatable scenario.


Thanks for the testing
Dave
bdbcat is offline   Reply With Quote
Old 25-08-2011, 18:51   #12
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 982
Re: Program Won't Open

Quote:
Originally Posted by bdbcat View Post
Thomas, et al...

1. Of course, if the application window is Maximized, then it is impossible to "move" the frame. In this case, the values saved in the .ini file should be (probably) (0,0). Is this the case?

Dave
I run OpenCPN in a maximized window on my W7 computer.
FrameWinPosX=0, FrameWinPosY=22.

On my Vista computer
FrameWinPosX=0, FrameWinPosY=20

Fabbian
fgd3 is offline   Reply With Quote
Old 26-08-2011, 05:00   #13
Long Range Cruiser
 
MarkJ's Avatar

Join Date: Dec 2007
Location: Australian living on "Sea Life" currently in England.
Boat: Beneteau 393 "Sea Life"
Posts: 12,822
Images: 25
Re: Program Won't Open

This non opening happened to me yesterday.
A few hours earlier when the program was running the laptop lid was accidently closed thus shutting down the computer.

When restarted Opencpn displayed like the OP indicated.

I had to reinstall the program

Mark
__________________
Notes on a Circumnavigation.
OurLifeAtSea.com

Somalia Pirates and our Convoy
MarkJ is offline   Reply With Quote
Old 26-08-2011, 05:39   #14
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 982
Re: Program Won't Open

Quote:
Originally Posted by MarkJ View Post
This non opening happened to me yesterday.
A few hours earlier when the program was running the laptop lid was accidently closed thus shutting down the computer.

When restarted Opencpn displayed like the OP indicated.

I had to reinstall the program

Mark
If that happens again try editing your opencpn.ini file before reinstalling the program. In Windows the file is in ProgramData\opencpn. You can edit it with Notepad. Search for "FrameWinPos". Change FrameWinPosX to 0, FrameWinPosY to 20. If the problem is caused by bogus numbers in those fields, as has been posited earlier in this thread, that should get you running again without the need to reinstall and without wiping out any of your other settings. If it doesn't work, the problem is more complex than previously believed.

Fabbian
fgd3 is offline   Reply With Quote
Old 26-08-2011, 09:40   #15
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Program Won't Open

Quote:
Originally Posted by bdbcat View Post

....
What we need (as usual) is a repeatable scenario.
....

Dave
Dave

A repeatable scenario, that "works" on W7 and XP.

1 Start OpenCPN.
2 Minimize the application by clicking the "-" in the frame.
3 Stop OpenCPN by right clicking the application icon in the windows "taskbar" and click "Close Window"(W7) or "Close" (XP).
4 Check the ini file now, should be (x,y)~(-32000, -32000).
5 The discussed problem occurs on restart. The real problem here is a failure of OpenCPN to maximize when clicking the TaskBar Icon after restart with a minimized window. There is no problem to maximize and minimize unless OpenCPN is closed, as described above.

I hope this helps!

It is impossible to repeat this with Ubuntu.

Thomas
cagney 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
Running Open CPN On a Tablet with Android 3.2 Operating System gatogo OpenCPN 2 27-08-2011 13:19
Could My ACR Be Stuck Open ? Defiance II Electrical: Batteries, Generators & Solar 6 27-07-2011 08:33
moorings owners program jvrkmarina The Sailor's Confessional 2 06-07-2011 06:45

Advertise Here


All times are GMT -7. The time now is 23:30.


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.