Just a quick follow-up… I have tried the SITL configuration on three different machines. Two of them are Win 10 HP ProBook 6570b with AMD Radeon HD 7570M. Nothing I have tried on those machines worked, SITL software always crashes.
Third machine is Win 7 HP Probook 6570b with Intel (embedded) graphic. Most of the configurations I tried have failed, but currently it works with Mission Planner 1.3.61 build 1.3.6904.12435 and MavProxy 1.5.2.
Hi! I ran into what seemed like a similar issue with the AP3.9 bits which I’m using in SITL mode with X-Plane 11. I finally traced it to a divide by zero issue in get_servo_out() in AP_YawController.cpp in ArduPilot/libraries/APM_Control/. @khancyr, noticed that the ‘scaler’ parameter passed to get_servo_out() was not being checked before being used to compute float intLimScaled = _imax * 0.01f / (_K_D * scaler * scaler); It looks like this code has not changed in the latest version. I forgot to post something about it at that time. Hope this helps.
thanks that help ! I don’t have Xplane but that may be the root cause.
If you can share a way to reproduce the issue or try to have it crash in debug mode and send us the dumfile we would be able to confirm that the issue is here.
@khancyr, the problem used to happen very infrequently and almost a year ago. I do remember that even though I was running with a debug build of AP (for plane) under gdb, when the problem happened, I never got a stack trace! I remember having to insert printf’s at various places to narrow in on the problem location. Unfortunately, we don’t have the same environment anymore, so I am unable induce the issue and get a dump for you. I got around the issue by doing something like:
if (scaler == 0)
{
return constrain_float(_last_out * 100, -4500, 4500);
}
at the very beginning of the function. I know that use of the manifest constants is bad news, but it got us around the issue and we haven’t seen it since.
For what it’s worth, a day or two after my last post, I built ArduPlane 3.9.11 on two machines and ArduPlane 4.0.0 on the third, and they have all worked without a single glitch up to now.