You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
Found a bug and luckily this one is 100% repro: During module loading, the gateway.dll suffers from a heap corruption when built in release. It doesn’t happen in debug. Modules loading are the dotnet OPC UA client module and the IoT Hub module.
You should also build PDBs for Release builds to make debugging stuff like this easier.
The text was updated successfully, but these errors were encountered:
The issue here was that when you switched the build configuration to Release in Visual Studio for the gateway, it continued to link with the Debug build of the dependencies that it automatically built for you when you ran cmake. This is bad because on Windows, one gets different implementations of the C runtime (CRT) with different build configurations which means that anytime we have memory allocations and frees mixed between different CRTs, chaos ensues. A comprehensive fix for this issue will require us to change how we deal with gateway dependencies. We will essentially need to switch to depending on packages from external repositories such as nuget and Aptitude. This will take somewhat longer to accomplish and is on our backlog.
In the meantime we have checked in a change (655cd7c) that enables the following:
Propagate build configuration while automatically building dependencies when you run cmake, i.e., now when you run cmake you can pass the build configuration via the CMAKE_BUILD_TYPE cmake variable and it's value will be used as the configuration to use when building dependencies.
Support rebuilding of dependencies when running the build script (build.cmd or build.sh). This is necessary when you are switching configurations. For example, you may have been working with the Debug configuration and would now like to build Release bits. In order to accomplish this you can now run the build script like so -
build.cmd --rebuild-deps --config Release
Enable generation of debug symbols for all release configurations on Windows
Found a bug and luckily this one is 100% repro: During module loading, the gateway.dll suffers from a heap corruption when built in release. It doesn’t happen in debug. Modules loading are the dotnet OPC UA client module and the IoT Hub module.
You should also build PDBs for Release builds to make debugging stuff like this easier.
The text was updated successfully, but these errors were encountered: