Hidden Runtime Dependency in JNBridgePro v12: Why x86 Shared-Memory Transport May Crash
Users running JNBridgePro v12 may encounter a crash when using the x86 Shared-Memory transport. This issue does not occur in prior versions or in other configurations, and appears only under very specific circumstances. Earlier versions of JNBridgePro bundled the Microsoft Visual C++ 2010 Redistributable, which ensured this dependency was present by default. Version 12 no longer includes it, which may cause this issue to appear on clean systems.
The Symptom
When running unit tests or demo applications using x86 Shared-Memory transport, you may see the following error:
System.AccessViolationException: Attempted to read or write protected memory.
This often happens during early Java proxy calls, such as:
new java.util.HashMap()
The crash occurs only when:
The process is compiled for x86
Shared-Memory transport is used
A standard Oracle JRE is installed (e.g.
jre1.8.0_202
)The v12 version of JNBridgePro is being used
Root Cause: JVM Built with Visual Studio 2010
The issue is caused by a runtime dependency inside the JVM itself, not JNBridgePro.
The 32-bit jvm.dll
from many Oracle JRE distributions is built using Visual Studio 2010, which means it dynamically depends on the VC++ 2010 Runtime (msvcr100.dll).
When this runtime is missing, Windows fails to fully load the JVM. But this failure is silent — instead of returning an error, it leads to memory corruption and ultimately causes the System.AccessViolationException
.
This affects only Shared-Memory transport because the JVM is loaded directly into the .NET process.
How to Confirm
To confirm the root cause:
Open Procmon
Add a filter:
Path contains msvcr100.dll
→ IncludeRun your x86 Shared-Memory test
If you see events trying to access
msvcr100.dll
, it confirms the JVM depends on it
You can also use:
dumpbin /dependents path\to\jvm.dll
Or open the file in Dependencies.exe to visually explore the runtime dependency tree.
Solution
Option 1: Use a Different JRE
Alternatively, switch to a 32-bit JRE that does not depend on the VC++ 2010 runtime — for example, some OpenJDK builds or newer distributions built with later toolchains may avoid this dependency. Example: The 32-bit jvm.dll
from Zulu OpenJDK 8(32-bit) was successfully tested and did not require msvcr100.dll
.
Option 2: Install the VC++ 2010 Redistributable (x86)
Installing the Microsoft Visual C++ 2010 Redistributable Package (x86) resolves the issue by providing the required msvcr100.dll
used by the JVM.
Download link:
https://www.microsoft.com/en-us/download/details.aspx?id=26999
Final Notes
This is a hidden dependency introduced by the Oracle Java Runtime, not by JNBridgePro. Because the Shared-Memory transport loads the JVM in-process, all of the JVM’s native dependencies must be available at runtime. If any are missing, especially msvcr100.dll
, you may see silent failures or memory access violations. Previous versions of JNBridgePro included the VC++ 2010 Redistributable to prevent this issue. In version 12, it is no longer bundled, so the crash may occur on systems where the runtime is not already installed.
If you’re running into crashes or corruption at startup when using Shared-Memory in x86 mode, this is a likely cause — and easily fixed once identified.