Closed did-g closed 5 years ago
Hi did-g thanks for making this. I've tested it this morning and there is a problem when you https://ci.appveyor.com/project/seandepagnier/watchdog-pi/builds/22616521/artifacts
I believe the watchdogconfiguration.xml file is properly formatted but it is not being read successfully so Opencpn crashes.
This has been a consistent issue since f79fdef and probably before as I have tested each appveyer compile back to f79fdef.
Please see https://github.com/seandepagnier/watchdog_pi/issues/101 O crash on Enable, after Commit Sept 5 2018 - Correct logic error - f79fdef #101
[WatchdogConfiguration.xml.txt](https://github.com/seandepagnier/watchdog_pi/files/2901044
/WatchdogConfiguration.xml.txt) WatchdogConfiguration-old1.xml.txt WatchdogConfiguration-old2.xml.txt opencpn - current.ini.txt opencpn.log
BIG Problem. It just does not read the watchdogconfiguration.xml file once OpenCPN is closed. Actually it is working with 3 alarms now. I can close the plugin and open it and also close opencpn and open the plugin again with no crash.
I think I added two more alarms and the last one failed when I opened Opencpn immediately. When a plugin fails why should Opencpn fail? Shouldn't just the plugin fail?
WatchdogConfiguration.old4.xml.txt
I think the problem is with Barometer
YES Barometer is the problem.
Rick,
Could you elaborate on how barometer is the problem?
If you comment line 484 on src/watchdog_pi.cpp does it fix the crash?
Yes I could comment out the line on 484 and it would fix the crash.
Have made a PR
} else if(message_id == "AIS") {
if(!reader.parse( (std::string)message_body, root )) {
line484 > wxLogMessage(wxString("watchdog_pi: Error parsing AIS JSON message: ") + reader.getFormattedErrorMessages() + " : " + message_body );
return;
}
The compile fails https://ci.appveyor.com/project/seandepagnier/watchdog-pi/builds/22644778 "C:\project\watchdog_pi\build\package.vcxproj" (default target) (1) -> "C:\project\watchdog_pi\build\ALL_BUILD.vcxproj" (default target) (3) -> "C:\project\watchdog_pi\build\watchdog_pi.vcxproj" (default target) (4) -> (ClCompile target) -> C:\project\watchdog_pi\src\watchdog_pi.cpp(484): fatal error C1021: invalid preprocessor command 'wxLogMessage' [C:\project\watchdog_pi\build\watchdog_pi.vcxproj] 3 Warning(s) 1 Error(s)
Why not comment out the alarm itself? Maybe just get rid of it? Like some thing at line 637 of Alarm.cpp to where?
Hi, Update travis OSX and appveyor with O 5.0 and wx 3.12, 100% untested but it compiles.
Regards Ddidier