-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Editing a Polar file in Dim Tab, insert TWS=11 causes Opencpn Crash-READ ONLY #170
Comments
The problem is it crashes when you try to "SAVE" |
I thought I had figured it out. So what the XXXX is the program doing? Setting the user files to READ ONLY?????? |
Editing a Polar in the Dim Tab is totally unusable because the folders are set to READ ONLY, so changing the file at all causes Opencpn to Fail. I believe the program is changing the setting to Read Only, because I have unchecked and applied the read only, and it just comes back when the program is loaded at some point! |
I have no idea why.
…On 3/17/18, Rick Gleason ***@***.***> wrote:
Editing a Polar in the Dim Tab is totally unusable because the folders are
set to READ ONLY, so changing the file at all causes Opencpn to Fail.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#170 (comment)
|
Why does the program keep changing these USER folders to Read Only? |
Is this some Windows setting perhaps? |
I've checked it. I don't believe it is the read only settings, when I go down to the next folder, everything is read/write/execute. So it has nothing to do with read/write IMHO Also, why does the Plugin save changes in the Polar Tab when it is on Grid Tab but not when they are changes in the Dim Tab? As I said originally, it is a bad command or statement in the Dim Tab section of the program. The fact that it is saving properly from the Grid Tab indicates it has nothing to do with read-write issues., and indicates it is a program issue! |
EditPolarDialog.ccppLine 63 void EditPolarDialog::OnPolarGridChanged( wxGridEvent& event ) Line 188 void EditPolarDialog::RebuildGrid() Are the two tabs Grid Tab and Dim Tab using the same save function? I am thinking back to all the trouble we had with EOL and Cel_Nav did not work for about 3 months I think. Finally Stelian fixed it. seandepagnier/celestial_navigation_pi#19 This appears to be another one of those problems. |
I can reproduce this on Linux too, although it can take several tries to make it happen. Just use BlockIsland40-BAD.pol from the top of this bug report, put the polar in ~/.opencpn/plugins/weather_routing/polars, edit some boat, add the polar to the boat, edit the polar, go to dimension tab, put 11 in the TWS field, click add. At this point it will hang, and the gdb shows: Thread 1 "opencpn" received signal SIGINT, Interrupt. (gdb) up Something is wrong here, I'd say the main EditBoat window is receiving paint events while the wind speed data is not fully initialized... |
I hopefully fixed this is #179 (but haven't tried yet on Windows). |
Now that Sean merged this, can you please Rick see if there are still issues on Windows ? |
Stelian, I tried #179 first in release and it did not work, then in debug mode to get a callback to isolate the problem and and the darn plugin ran great. I could add and delete rows and columns and save the polar with no problem! -Debug was not a big help! See my note from last night please at the bottom. #170
More in a minute. |
I can remove multiple columns, one at a time, before saving (except TWS=0 col). |
When I go into Edit and Dim Tab and enter into TWS the value 12 and hit Add, the twelve appears at the bottom. Then I hit SAVE and the menu closes as is normal, then the blue spinner appears. There will be a crash of Openpn now. I try to hit the X on the menu, get message O not responding, then MS message about O failure. Now I restart O and bring up the same Edit Polar --- There is a TWS=12 Column!! so it manged to save to the file. What was the cause of O stopping then? |
Summary: The problem stems from trying to add a new TWS. |
Rick, On what version of OpenCPN are you doing this test ? Also, how do you compile the plugin ? (which version of visual studio, wxwidgets etc) Can you reproduce with the official OpenCPN 4.8.2 and the plugin compiled by appveyor ? I cannot reproduce the problem here... |
I am still using MSVC 2013 and wxWidgets 3.0.2 because I want to be able to compile for v4.8.2 specifically. I have found that some of Jon Gough's versions of ocpn_draw, compiled usng MSVC2017 did not run with v4.8.2 so I am sticking with VC2013 + wxWidgets 3.0.2 on this machine for awhile. Why? I compile as standalone plugin, and I am using opencpn.lib with 135kb which is the one from v4.8.0
|
In weatherrouting.h
So I guess I could step back to
|
We're using the same versions of MSVC and wxwidgets. My opencpn.lib is 138 KB, I obtained it by compiling opencpn locally on this machine, not sure what version though. Here is attached my weather_routing installer can you please test it ? |
Here is the full combo: opencpn (4.8.2) + WR: http://popies.net/tmp/oc.zip |
stelian, I think /know you're using the opencpn.lib version from v4.8.2 it is 138kb
Thanks I'll try yours now. |
In the "full combo" zip I posted above I've updated my local OpenCPN git to v4.8.2, and compiled it, and used its opencpn.lib to build WR. No issues so far here. |
Did this with your WR .zip. I can use the a portable build in my Msvc setup. Won't be hard. What do you think? I think I'll download the full deal and install in a different setup |
It might be worth giving a try to a totally clean installation. You don't need grib_pi or climatology, try just the two installers in my oc.zip combo. |
Ok so this time I got a little aggresive and added one at a time TWS 1.5, Add, 1.7 Add, , 1.8,Add, 1.9 Add , I see the values all in there in the correct order, and Saved. |
Restart OPencpn and bring up WxRte
|
I tried renaming my opencpn.ini and just adding wxrte grib and climatology. |
Ok, I have a portable version I should be using for this, set up with Batchutils Tdan. I go to C:\Users\Frederick\Documents\GitHub\OpenCPN\build\Release |
Restart Portable Opencpn in C:\Users..\GitHub\OpenCPN\build\Release with "opencpn -p" and bring up WxRte The changes all made it into the polar file, but why does it fail?
After continuing the tests, I found this is real. |
Stelian, What EOL do the polars have? What are they required to have for EOL? Also I am going to have to trough and check all the polar to make sure they work and are in the correct form. I don't want notepad++ which I may have to use, to cause troubles! |
Rick, "I downloaded the full OCpn and tried to install, but it wouldn't start. ". Is this with the opencpn installer from my oc.zip ? Something is really wrong on your system, the installer works ok here. Please make sure you downloaded/extracted the zip correctly. I cannot reproduce your issues at all, so:
I don't believe this to be related to EOL issues, because if it was the case, it should happen every time, on all Windows machines, not only on yours. But I'll still look at the code to see how EOL are dealt with. |
Yes, the opencpn installer from oc.zip. I am going to install it on my laptop Win10 (a different machine) to eliminate that issue. I know how infuriating this is. Thankyou for sticking with me. However, would you try something for me? Try inserting two or three TWS columns successively. PS: I've removed all plugins except the 4 standard, wxrte, climatology and wxfax from this SurfacePro3 and started it with a fresh ini. I removed a large number of plugins. I still fails as above. Now I am going to remove my 4.8.2 configuration on my laptop and install yours. For some reason, oc.zip exe installed on the SurfacePro3 earlier, but would not start, even when I went to the file and executed as admin. If this happens on the laptop, I will just copy the executable from the other machine and try it, leaving everything else the same. |
"However, would you try something for me? Try inserting two or three TWS columns successively. I did try this multiple times. No problem here. |
Good. Turns out I don't have 4.8.2 on the laptop, so its a clean parallel install. It installed and it works. In TWS Column I added 1.5 "add" 45 "add" |
Windows does this. Pavel had a similar situation where he thought it was my machine. Then he came up with some alternate code that worked. I am trying to remember which plugin it was. Possibly Squiddio. |
I looked under squiddio on github, can't find it. I think I am losing it. I've tested to many plugins! |
Sorry Rick but I tried what you say in #170 (comment) and it works here... |
I have 2 machines that do this so it is not uncommon. --Well, we know that the file is updated accordingly, and you just have to restart Opencpn etc. So what is this 1/2 a bug? I am going to try to get some callback codes with MSVC++ and if that doesn't work. I am going to pretend it works. Thanks for bringing it this far! It is much much better. Sorry we couldn't identify the clitch. |
No, don't close, keep this open. You are encountering a bug, and just because I'm not able to reproduce it on my very limited setup doesn't mean the bug doesn't exist ! |
Merge pull request #179 from stelian42/fix-edit-polar-paint Fix crash when editing polars caused by spurious paint events. Fix example configurations and polars #181 opened 4 hours ago by stelian42 |
BlockIsland40-BAD.zip
![blockisland40-bad pol-edit-dim-tab](https://user-images.githubusercontent.com/2363959/37559440-a6447df0-29fc-11e8-9bb7-16f5a788e8b7.png)
Its as simple as that. Was trying to edit the BlockIsland40.pol to show BAD polars.
The text was updated successfully, but these errors were encountered: