Skip to content

AirSim causes Heap Corruption exceptions with Unreal in HITL mode #2583

@MSBGit

Description

@MSBGit

When I try to run an Unreal environment with AirSim in HITL mode, the VS2019 debugger throws two exceptions: Source Not Available followed by Heap Corruption. Sometimes I don't get the Source Not Available exception and I see the actual source of where the exception occurred. I have included screenshots for both cases here. Caveat: I am not a Windows developer, I am an embedded and Linux developer, so VS2019 is like black magic to me and my expertise with it is relegated to pushing buttons following online build instructions.

Environment:

  • AirSim 1.3.1 (previous comment said: 1.2.0 Beta which was based on incorrect version info in the Unreal plugin file) in HITL mode with a Pixhawk 4 running PX4 1.10.1
  • Unreal 4.24
  • Windows 10
  • Blocks environment (from AirSim repo)

Steps to reproduce:

  1. I plug my Pixhawk into my computer via USB.
  2. I open the sln file in VS2019, select the environment as the startup project, select DebugGameEditor and Win64 mode.
  3. Press F5 to start the build.
  4. The Unreal Editor comes up with the Blocks environment loaded.
  5. I press Play and VS2019 will shortly breakpoint and I will either see Source Not Found followed by Unhandled Exception: Heap Corruption after I press Continue or I will see Exception Thrown: Breakpoint followed by Unhandled Exception: Heap Corruption. I suspect these two are identical, one is just that VS2019 can't find the source for some reason. It's troubling to me that my toolchain is producing inconsistent results on something as simple as finding the source code when debugging.

Pressing Continue allows the simulation to continue and then it seems to run well. However, this bug causes me to be unable to run the simulation outside of the VS2019 debugger.

If I do not plug in the Pixhawk and start the simulation, I do not get these exceptions. If I then plug in the Pixhawk while the simulation is running, I will see a message that AirSim has connected to the Pixhawk but HITL doesn't work since the Pixhawk doesn't get GPS data from AirSim (that's OK since I don't expect that AirSim would support hot plugging a flight controller while the simulation is running). If I then stop the simulation and restart it, I will get the same set of exceptions as above.

Blocks VS2019 Game Controller breakpoint exception

Blocks VS2019 InitDirectInput Heap Corruption

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions