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
Hi @POWER-KI Does the rs-hello-realsense.exe pre-built example program launch correctly on your x86 computer, please? As you have installed the full RealSense SDK for Windows, you should be able to find the program and the other pre-built .exe examples at the folder location below:
If you were attempting to build rs-hello-realsense.cpp in Visual Studio for an x86 system, you could check whether the build target is configured for x86.
Could you try building the starter C++ Visual Studio project in the tutorial linked to below please to see whether that project experiences the same problem.
Hi @POWER-KI Intel were able to replicate your problem with x86 compilation on D405 specifically and created an internal bug report to investigate it further. I will therefore add an Enhancement tag to this case as a reminder to keep the case open whilst that bug report is active.
I tested a very simple program and it crashes on last line. I am somewhat motivated to tackle this as would like to use D405 in our application and it needs to be x86. Is there a cmake that creates the x86 compiled libraries?
var ctx = new Context();
var list = ctx.QueryDevices(); // Get a snapshot of currently connected devices
if (list.Count == 0)
throw new Exception("No device detected. Is it plugged in?");
var dev = list[0];//throws system.accessviolationexception
Building the RealSense SDK from source code with CMake should generate the RealSense.dll files, though I cannot offer guarantees regarding whether it will make a difference to whether the generated .dll works with D405.
There is no need to carry out the 'Enabling metadata on Windows' section of the instructions as metadata can be enabled through the RealSense Viewer program.
Thanks very much for your ongoing debug process. Please continue logging it here and I will pass the results on to Intel when you have completed your tests. Good luck!
I verified the same thing with compiling libraries in debug mode using cmake -a win32 vs cmake to generate the x64 debug libraries:
x64 D405 -> ok
x86 D405 -> crash
x64 D435 -> ok
x86 D435 -> ok
x64 L515 -> ok
x86 L515 -> ok
Seems with source code and compiling of debug mode should be able to figure out what's the difference between x64 and x86 code for D405. Seems it crashes when it creates the device. I'm not really a cpp expert so considering outsourcing it.
@henryjliu thanks for reporting the issue to RealSense team. we reproduced the problem and will investigate. In the meantime, please try the solution below.
Remove/comment out the line highlighted below in src\ds5\advanced_mode\advanced_mode.cpp. The single line of code caused the library to crash with d405 but it's redundant. Removing it should fix the issue.
Thanks for the workaround - confirmed it works now but will warrant further testing. Not sure why it works fine in x64 and not x86 so prob should be deeper issue to be resolved.
@henryjliu glad to know the workaround worked. thanks for the confirmation. on x86, a memory alignment issue on x86 along call stack in that particular line of code caused the crash. that's why the issue only appeared on x86. the rest of sdk use a different call stack, so the issue should not impact other areas. we have created an internal ticket to investigate it further to be sure.
RealSenseCustomerSupport commented on Sep 19, 2022
Hi everyone, can anyone who reported an x86 dll problem on this case confirm if the x86 dll crash issue is resolved for them when using SDK 2.51.1 please? Thanks!
Activity
MartyG-RealSense commentedon Mar 24, 2022
Hi @POWER-KI Does the rs-hello-realsense.exe pre-built example program launch correctly on your x86 computer, please? As you have installed the full RealSense SDK for Windows, you should be able to find the program and the other pre-built .exe examples at the folder location below:
C: > Program Files (x86) > Intel RealSense SDK 2.0 > tools
If you wish to build the example programs in Visual Studio, Intel provide guidance for doing so at the link below.
https://www.intel.com/content/www/us/en/support/articles/000030463/emerging-technologies/intel-realsense-technology.html
If you were attempting to build rs-hello-realsense.cpp in Visual Studio for an x86 system, you could check whether the build target is configured for x86.
https://docs.microsoft.com/en-us/visualstudio/ide/how-to-configure-projects-to-target-platforms?view=vs-2022
POWER-KI commentedon Mar 24, 2022
The pre-built works (but I think that is an X64 version).
To check the problems:
We have tested this because other programs tha we have with the new DLL crash.
Regards,
CAP
POWER-KI commentedon Mar 24, 2022
I think that the problems is in
rs2_create_device(_list.get(), index, &e);MartyG-RealSense commentedon Mar 24, 2022
Could you try building the starter C++ Visual Studio project in the tutorial linked to below please to see whether that project experiences the same problem.
https://github.com/EduardoWang/visual-studio-real-sense-record-and-playback-project
[-]BUG in x86 DLL[/-][+]BUG in x86 DLL with D405[/+]POWER-KI commentedon Mar 25, 2022
The x86 DLL with:
L515 works;
D435 works;
D405 CRASH.
MartyG-RealSense commentedon Mar 25, 2022
I will highlight the issue to Intel to seek their feedback. Thanks very much for the report!
MartyG-RealSense commentedon Apr 1, 2022
Hi @POWER-KI Intel were able to replicate your problem with x86 compilation on D405 specifically and created an internal bug report to investigate it further. I will therefore add an Enhancement tag to this case as a reminder to keep the case open whilst that bug report is active.
henryjliu commentedon Apr 27, 2022
Any update to this? We also need the x86 compiled version for D405
MartyG-RealSense commentedon Apr 27, 2022
Hi @henryjliu There is no further information to provide at this time.
henryjliu commentedon Apr 27, 2022
I tested a very simple program and it crashes on last line. I am somewhat motivated to tackle this as would like to use D405 in our application and it needs to be x86. Is there a cmake that creates the x86 compiled libraries?
MartyG-RealSense commentedon Apr 27, 2022
Building the RealSense SDK from source code with CMake should generate the RealSense.dll files, though I cannot offer guarantees regarding whether it will make a difference to whether the generated .dll works with D405.
Windows source code build
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_windows.md
There is no need to carry out the 'Enabling metadata on Windows' section of the instructions as metadata can be enabled through the RealSense Viewer program.
Linux source code build
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md
3 remaining items
henryjliu commentedon Apr 27, 2022
henryjliu commentedon Apr 27, 2022
Works fine with D435 but crashes with D405
henryjliu commentedon Apr 27, 2022
Not sure what this _Find_lower_bound code does. Is there a way to escalate to Realsense Engineer?
bostjanv commentedon Apr 28, 2022
_Find_lower_bound is part of VS C++ standard library implementation, but the bug must be somewhere higher in the call stack.
MartyG-RealSense commentedon Apr 28, 2022
Thanks very much for your ongoing debug process. Please continue logging it here and I will pass the results on to Intel when you have completed your tests. Good luck!
henryjliu commentedon Apr 29, 2022
I verified the same thing with compiling libraries in debug mode using cmake -a win32 vs cmake to generate the x64 debug libraries:
x64 D405 -> ok
x86 D405 -> crash
x64 D435 -> ok
x86 D435 -> ok
x64 L515 -> ok
x86 L515 -> ok
Seems with source code and compiling of debug mode should be able to figure out what's the difference between x64 and x86 code for D405. Seems it crashes when it creates the device. I'm not really a cpp expert so considering outsourcing it.
MartyG-RealSense commentedon Apr 29, 2022
Thanks very much @henryjliu for your detailed testing. I have passed your debug findings to Intel.
gwen2018 commentedon May 4, 2022
@henryjliu thanks for reporting the issue to RealSense team. we reproduced the problem and will investigate. In the meantime, please try the solution below.
Remove/comment out the line highlighted below in src\ds5\advanced_mode\advanced_mode.cpp. The single line of code caused the library to crash with d405 but it's redundant. Removing it should fix the issue.
https://github.com/IntelRealSense/librealsense/blob/master/src/ds5/advanced_mode/advanced_mode.cpp#L25
// "Remove IR Pattern" visual preset is available only for D400, D410, D415, D460, D465
std::string pid = _depth_sensor.get_info(RS2_CAMERA_INFO_PRODUCT_ID);
henryjliu commentedon May 5, 2022
Thanks for the workaround - confirmed it works now but will warrant further testing. Not sure why it works fine in x64 and not x86 so prob should be deeper issue to be resolved.
gwen2018 commentedon May 6, 2022
@henryjliu glad to know the workaround worked. thanks for the confirmation. on x86, a memory alignment issue on x86 along call stack in that particular line of code caused the crash. that's why the issue only appeared on x86. the rest of sdk use a different call stack, so the issue should not impact other areas. we have created an internal ticket to investigate it further to be sure.
RealSenseCustomerSupport commentedon Sep 19, 2022
This issue has been resolved in RealSense SDK 2.51.1 (https://github.com/IntelRealSense/librealsense/wiki/Release-Notes#release-2511).
MartyG-RealSense commentedon Oct 7, 2022
Hi everyone, can anyone who reported an x86 dll problem on this case confirm if the x86 dll crash issue is resolved for them when using SDK 2.51.1 please? Thanks!
MartyG-RealSense commentedon Oct 25, 2026
Case closed due to the discussed issue having been resolved in SDK version 2.51.1.