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
my PC system is win10, the ros2 version is foxy, visual studio 2019, .net 3.1/6/7, first, every steps of build was ok, but when I try run the examples, it throw Exceptions, the error messages as follow:
PS C:\opt\ros_dotnet_ws> .\install\local_setup.ps1
PS C:\opt\ros_dotnet_ws> ros2 run rcldotnet_examples rcldotnet_talker
Unhandled Exception: System.TypeInitializationException: The type initializer for 'ROS2.RCLdotnetDelegates' threw an exception. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: ptr
at System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr ptr, Type t)
at ROS2.RCLdotnetDelegates..cctor() in C:\opt\ros_dotnet_ws\src\ros2_dotnet\ros2_dotnet\rcldotnet\RCLdotnet.cs:line 451
--- End of inner exception stack trace ---
at ROS2.RCLdotnet.Init() in C:\opt\ros_dotnet_ws\src\ros2_dotnet\ros2_dotnet\rcldotnet\RCLdotnet.cs:line 1399
at ConsoleApplication.RCLDotnetTalker.Main(String[] args) in C:\opt\ros_dotnet_ws\src\ros2_dotnet\ros2_dotnet\rcldotnet_examples\RCLDotnetTalker.cs:line 12
who can give me some suggestions, well regards.
The text was updated successfully, but these errors were encountered:
I've not particularly solved the problem, but I found something.
the rcldotnet_native.dll file is made in the _dllLoadUtils this file has a few ten's of functions. For me the file misses 2 functions that are needed in the RCLDotnet.cs. so I commented them out and now it works fine for me. only thing i'm concerned about is that I now miss these 2 functions. I guess these are not needed for me. but maybe someone can explain what these functions are for:
@cqulpj, @SiebeVerhoeven: Sorry for the late reply, currently my "spare" time I can allocate for this project is used to get the open PRs done. I tried to setup ros2_dotnet on windows once, but didn't have time to continue yet.
@SiebeVerhoeven did you try a cleen rebuild? Those functions should be defined in the c part of the library, so not sure how they would be missing for you.
my PC system is win10, the ros2 version is foxy, visual studio 2019, .net 3.1/6/7, first, every steps of build was ok, but when I try run the examples, it throw Exceptions, the error messages as follow:
PS C:\opt\ros_dotnet_ws> .\install\local_setup.ps1
PS C:\opt\ros_dotnet_ws> ros2 run rcldotnet_examples rcldotnet_talker
Unhandled Exception: System.TypeInitializationException: The type initializer for 'ROS2.RCLdotnetDelegates' threw an exception. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: ptr
at System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr ptr, Type t)
at ROS2.RCLdotnetDelegates..cctor() in C:\opt\ros_dotnet_ws\src\ros2_dotnet\ros2_dotnet\rcldotnet\RCLdotnet.cs:line 451
--- End of inner exception stack trace ---
at ROS2.RCLdotnet.Init() in C:\opt\ros_dotnet_ws\src\ros2_dotnet\ros2_dotnet\rcldotnet\RCLdotnet.cs:line 1399
at ConsoleApplication.RCLDotnetTalker.Main(String[] args) in C:\opt\ros_dotnet_ws\src\ros2_dotnet\ros2_dotnet\rcldotnet_examples\RCLDotnetTalker.cs:line 12
who can give me some suggestions, well regards.
The text was updated successfully, but these errors were encountered: