Hi Geoffroy,

I hope that you've already worked this out, but I ran into the same problem 
and am posting here now in case someone else encounters the problem.

For me, what caused the issue was copying over the *Release *DLLs for 
ChronoEngine.dll etc. to my  C:/workspace/my_project_build/Debug folder 
instead of the *Debug *dlls/pdbs. These should be located in your  
C:/workspace/chrono_build/bin/Debug folder (assuming you compiled both 
Release and Debug versions of Chrono when you installed, which you should 
do). Replacing these files allowed me to compile and run in debug mode. 
This is written up in the tutorial page "Building a Project that uses 
Chrono" located here 
<https://api.projectchrono.org/tutorial_install_project.html>under the 
heading "Important Information for Windows Users", but I found it rather 
difficult to parse.

Anyway, hope this helps someone!
David

On Tuesday, June 29, 2021 at 5:49:02 AM UTC-4 [email protected] wrote:

>
> Hi,
>
> I'm working on implementing kinematic simulation with Chrono in a CAD 
> software
>
> Using ChronoEngine.dll, I have an issue when debugging my application.
>
> When debugging this simple bit of code (copied from demo_IRR_motors.cpp):
>
>     chrono::ChVector<> positionA2(-3, 2, -2);
>     std::shared_ptr<chrono::ChBody> stator2;
>     std::shared_ptr<chrono::ChBody> rotor2;
>     // Create the motor
>     auto rotmotor2 = 
> chrono_types::make_shared<chrono::ChLinkMotorRotationAngle>();
>     // Connect the rotor and the stator and add the motor to the system:
>     rotmotor2->Initialize(rotor2, stator2, chrono::ChFrame<>(positionA2));
>
> I have an "Access violation reading location 0x000..." in the Initialize 
> function at the last line...
> I have no problem when executing the code in release mode however, and the 
> motor seems to behave correctly in the simulation (most of the time).
> No issues (in release or debug) with other links in my system (such as 
> ChLinkLockPrismatic for example).
>
> Is it a known issue? Do you have any idea what could possibly cause this 
> on my side?
>
> Thank you,
> Geoffroy ALEXANDRE
>

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/666406ae-7c4b-4e4a-b00b-883ddc64ae19n%40googlegroups.com.

Reply via email to