weatherfax attempt at backtrace with MSVC++ Internet Image retrieval Boston 24hr & 48hr surface 500mb
Unhandled exception at 0x00000000 in opencpn.exe: 0xC0000005: Access violation.
Let me know what you don't need and what else you do need from the attached please. I don't know if a "backtrace" is just the CALL STACK?
Under weatherfax_pi current git, I have tested loading files, and retrieval of HF schedules with the MSVC debugger running. These seem to work although there is hesitation and I wait because of the debug overhead. In release version it is much faster.
I have used and tested the release version without debug running, and it File > Open loads image files off the hard disk well and the Retrieve >HF fax schedule works fine.
The Retrieve > Internet Internet Retrieval seems to have a problem right now... see above please. I can retrieve NOAA > Boston > 48hr Wind/Wave
Then double click it says "such and such already retrieved 28 minutes ago. Reetrieve it" "Yes" "Use file" or something. I hit yes. then break.
Stop debug and restart, do same thing same file and answer "yes" load the downloaded one... and it says something like "Failed to load input file and gives the path and file.
Windows specific problems:
The plugin is unable to open TIFF files, so the noaa weather faxes don't work.
I believe possible solutions:
1. disable noaa for windows users
2. rebuild wxwidgets from source with tiff support and distribute this with opencpn
3. hack in lib tiff support for windows only (Since I lack windows I can't apply this)
4. use gif files for windows users and waste their internet bandwidth
Keep an eye on file dates, as that will often signal a new file has been uploaded. Older files will now be are deleted.
Please test weatherfax_pi it is ready for release. In windows, TIF files can't be downloaded, resulting in "Failure to download". Sean has explained this situation, and various alternatives for TIF. NOAA Boston uses TIF so these fail gracefully with an error message. On other file types this plugin works great.
Git Pull, and compile after copy of PVW32Con.exe to buildwin directory
Ran cpack to make the installer.exe ... completed successfully
Then used the installer to install into Opencpn v3.3.1824 and v3.2.2 successfully.
Then ran v3.3.1824 and loaded NOAA Boston 24 hr successfully!
Then ran v3.2.2 and loaded NOAA Boston 48 hr successfully!
The very efficient low KB size NOAA TIFF Internet images work in weatherfax now.
Awesome, not perfect from a programming point of view, but seamless and simple to the user!
Beautiful job!! Thanks Sean and Pavel.
Can we upload to Opencpn Beta? PVW32Con.exe which is used for conversion appears to be Windows freeware as stated on their website.
Sean has advised that with "Internet Retrieval" if you don't go into a "Trez facile" Overlay Automatique onto charts, there is a problem with a corrupted CoordinateSets.xml located somewhere in your C:/Users directory where your images are being stored.
This old file was located on my machine in
I viewed it with Notebook++ and it was empty, probably corrupted from a previous compile. I simply deleted coordinateSets.xml and then restarted Opencpn 3.3.1824, then opened the Weatherfax plugin and tried
Internet Retrieval of NOAA ---> Boston ---> 24hr Surface
and it Overlaid directly on top of Opencpn Charts without any Weatherfax Wizard coming up (which is used to establish unknown coordinates).
Sean explains the process further:
Ok, it looks like the file is being installed.
When the program exits, it will write it to: C:\users\Public\Application Data\opencpn\plugins\weatherfax> or somewhere similar.
So there are two copies of this file, the installed one which you have, which is only used the first time. After that a second one is written which contains possible user modifications or additional coordinates.
If however this second one is corrupted or empty (possible from debugging) then you would see your behavior. The easiest way would be to remove the second one forcing it to be rewritten from the installed version.
For me, it appears the first installed file is located in:
The second installed file which includes additional user coordinates is located in:
So if you use "Internet Retrieval" and the Wizard comes up rather than immediate overlay on a chart, try deleting this second file. For most users this will never have to be done, because it will be seamless. Note that there may be some occasional images that don't have coordinates defined than may require your additional input through the wizard, to achieve the instantaneous overlay, but this will generally not be required when using the Internet Retrieval.
Why? because the Weather services provide the coordinate data embedded in their images and Sean has pulled this information out directly via the Weatherfax plugin.
See attached image of what the Automatique Chart Overlay looks like.
What a great weather tool! Be weather savy current using Opencpn and Sean's Weatherfax Plugin.
I think I am going to upload this now to Opencpn Beta File Thingie, because you Windows users are going to want to try this out. (Note I have not gotten "portaudio" working on my machine yet so for me direct use of "Audio Capture" and HF Schedules (with SSB) is not possible. However I can File Open weatherfax image files and Retrieve Internet weatherfax files via internet with this quick and elegant interface!
It is not a good idea to spread files all over a system.
No Uninstaller will be able to clean the system when the user wants to uninstall a software.
It seems some guides are needed how to program plugins.
@Gerhard: Both these locations are actually just one, at least on Windows 7. Yes, Microsoft recently invented symbolic links And it is inside OpenCPN's data folder, I would say it is exactly how a plug-in should behave.
@Sean: Sent you a pull request with fixes for the rest of the Windows stuff. And check your e-mail, the Redmond folks return everything as undeliverable (with "The email address you specified couldn't be found or is invalid")
Sean and Pavel working together have brought this plugin leaps forward now, fixing some conversion problems with monochrome TIFFs from NOAA, and addressing portaudio problems, and fixing some user interface questions so things are clearer.
It compiles beautifully and runs very effectively, overlaying weatherfax charts from all over the world onto Opencpn Charts, via audio, ssb, file or internet download. This really is a tool I will use! For the time being it will be used via internet download, but I hope to receive in the maill a RtlSdr USB soon to try that!
Its uploaded to Opencpn Beta File thingie. Look for the version with weatherfax and a "-d" should be the only one there under 3.2.2 folder.
The following file has been updated: 3.2.2 PI Win
weatherfax_pi-1.1-ov3.2.2-e-win32 - New with Internet retrieval overlay.
PLEASE NOTE This plugin runs in OPENCPN v3.2.2 (stable) so many many users can test it and actually use it! It is much better than the previous version, so you owe it to yourself to try it, you will not be unhappy.
We have a job to do now... test the plugin and make sure ALL of the urls are correct and load properly...
1. If the url is wrong, find the correct one by search....correct it in the XML file and advise us here.
2. Also they should overlay in the right place on the charts... if they do not please advise which ones are askew....
3. Additionally if one does not load, it may be because of a bad internet connection, or a slow connection on the other end....or it may be the url has changed, please check it and see if the url is correct....advise if it is not.
4. We need to check all the urls!! That's our job as Beta Users too.
Find your Weatherfax Data files here:
C:\Program Files (x86)\OpenCPN\plugins\weatherfax\data
These can be carefully edited with a good text editor, I use notepad++ but there are other free good editors. After you find the corrected url, find the entry in weatherfaxinternetretrieval.xml and carefully edit and save, then test it. I am not so familiar with the embedded coordinates and the coordinateSets.xml and will have to advise as we learn more. It would be helpful to have an image inspector of some sort that would show the embedded images, so that beta testers could check overlay position inaccuracies..... There are two examples of possible problems/errors in the URL's illustrated below... These are unlikely to have anything to do with the plugin itself. We users need to either get the correct url or find the correct coordinates.
Thanks very much guys.
Brought up v3.2.2-e and it works fine.
Tried Weather SA South Africa Weather SA and it would not download, prompted do you have a good internet connection.... Good note and way to fail... but I wondered if it is something else...causing it?
When the fax appears calibrated incorrectly it usually means there are different images which use different coordinates that they alternate. It seems mostly rare, and I will remove the calibration for ice..
The alternative is to offer the user a list of possible coordinates to select from if there are more than one, but this a feature for the future.
I think the south africa one doesn't work because the server is down?
I think that is a good idea... how do we easily maintain this and upate it for everyone? Nobody should be saddled with the whole task. Some way to share the new records and import? Or is that messy. --Maybe when someone has an update for an area, they upload the files with the corrections to this thread?
Sean how does one edit/create these records? Use Image Wizard to determine coordinates?
2. Establish coordinate record in coordinatesets.xml?
3. Reference the coordinate record in the new record for URL in weatherfaxinternetretrieval.xml?
I had thought the images themselves had the coordinate information in the record, like Photo Properties - Georeferencing? I have looked at several image properties and have not found that information however. I suppose if the image record had that info the coordinates could be extracted from that? ..so I guess that you use the Image Wizard to overlay an image/fax/satellite image and use those saved coords?