Unreal5 & ART DTrack plugin crash

Hi!

I managed to compile it for UE5 but when I add a DTrack source with Livelink, Unreal crashes.

**Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\Templates\Casts.cpp] [Line: 10] Cast of LiveLinkSourceSettings /Engine/Transient.LiveLinkSourceSettings_0 to DTrackLiveLinkSourceSettings failed

UnrealEditor_CoreUObject
UnrealEditor_DTrackPlugin!FDTrackLiveLinkSource::InitializeSettings() [D:\Documents\Unreal Projects\ProjetCPP\Plugins\DTrackPlugin\Source\DTrackPlugin\Private\DTrackLiveLinkSource.cpp:56]
UnrealEditor_LiveLink**

Ligne 56: m_source_settings = CastChecked(InSettings);

I put the issue on the github link

1 Like

I fixed it and made a pull request on UnrealDTrackPlugin github.
It works now for UE5.

1 Like

I’m having the same problem, informed ART but the have not replied. Care to share the link to your solution?

What changes did you make? I’ve trying to understand how the plugin works so I can adapt the VRPN plugin to work with DTrack in our cave, DTrack->VRPN->VRPNLivelink, but there are problems there also because the LiveLinkVRPN plugin doesn’t handle multiple trackers.

We don’t use VRPN since UE4.27. You can handle multiple trackers by adding DTrack sources directly in Livelink in UE editor.

You can directly download the DTrackPlugin I forked from ART and made some changes to make it work for unreal5.

When you managed to compile it, add sources like mentionned in the read me of DTrack sample.

1 Like

Thanks! It compiled ok. Now I have some work to do.
If you are ever in Antwerp in Belgium I’ll buy you a beer.

I’m from Lille University, northern France.:wink:
Hope it will work for you!
I have a crash on runtime with ndisplay and tracking, but it doesn’t crash without tracking.
Hope it’s not another DTrack issue. I’ll go furter to see what’s wrong.
If it works for you, keep me informed, it can help me too!

I’ll keep you posted, I have to make changes to our network before I can test, so could be a while.

1 Like

Just for information, Tracking works for me in Unreal 5 with the DTrack plugin I updated.

Good to hear!
How do you get the signal into unreal, DTrack 2 can only send to a small amount of ip-numbers?

Do you use the multicast option?

I just changed our network so the DTrack signal is going out on the correct subnet, but I still have to get it working with nDisplay. I am thinking that it should be possible to send the signal to one graphics server and then have nDisplay copy it to the other nodes.

Ok I have tried with nDisplay and it crashes. The crash is triggered by DTrack sending tracking data, with DTrack stopped there is no crash, as soon as I start DTrack it crashes.

I tried changing the IP number that the plugin listens on, then it crashes only when I send to the primary node.

It’s difficult to answer without seeing the problems;)

  • Do you use Livelink & DTrack source?
  • Does it work on editor when you change the ip in DTrack output to your pc dev?
  • We had some problems with port 50000, that was already used, so we used localhost ip on the master with another port (127.0.0.1:5042 for example)
  • It’s important to save the art preset (although it might be obvious, I had the problem)
  • After that, you can package in development and see the logs in the nodes master and cluster to get furthermore information.

Good luck!

  • Do you use Livelink & DTrack source?
    yes

  • Does it work on editor when you change the ip in DTrack output to your pc dev?
    yes, I have one output to the master node and one output to localhost on the DTrack/dev machine, both port 5052 so I don’t have to change preset all the time

  • We had some problems with port 50000, that was already used, so we used localhost ip on the master with another port (127.0.0.1:5042 for example)
    Tried it, didn’t get better

  • It’s important to save the art preset (although it might be obvious, I had the problem)
    Yes, I do this

  • After that, you can package in development and see the logs in the nodes master and cluster to get furthermore information.
    getting this error:

[2022.06.01-11.48.51:874][  1]LogWindows: Error: === Critical error: ===
[2022.06.01-11.48.51:874][  1]LogWindows: Error: 
[2022.06.01-11.48.51:874][  1]LogWindows: Error: Fatal error!
[2022.06.01-11.48.51:874][  1]LogWindows: Error: 
[2022.06.01-11.48.51:874][  1]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000038
[2022.06.01-11.48.51:874][  1]LogWindows: Error: 
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff764b30c9a Collab500.exe!FDTrackFlystickInputDevice::on_livelink_subject_added_handler() [E:\p4\Collab500\Plugins\UnrealDTrackPlugin-master\Source\DTrackInput\Private\DTrackFlystickInputDevice.cpp:202]
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff764b2f6f4 Collab500.exe!TBaseRawMethodDelegateInstance<0,FDTrackFlystickInputDevice,void __cdecl(FLiveLinkSubjectKey),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [F:\UE\UE_5.0\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:470]
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff76464c982 Collab500.exe!TMulticastDelegate<void __cdecl(FLiveLinkSubjectKey),FDefaultDelegateUserPolicy>::Broadcast() []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff764648b00 Collab500.exe!FLiveLinkSourceCollection::AddSubject() []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff76465a984 Collab500.exe!FLiveLinkClient::CreateSubject() []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff7646aadc0 Collab500.exe!FApplyToClientPollingOperation::Update() []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff764642697 Collab500.exe!<lambda_4aa784d1f82263610ffbf219db80e3c9>::operator()() []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff76466227d Collab500.exe!TBaseFunctorDelegateInstance<FOptionalSize __cdecl(void),FDefaultDelegateUserPolicy,<lambda_6189dcabfc4b1d4fbcd2768ca5f0b89c> >::ExecuteIfSafe() []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff76440dbbd Collab500.exe!TMulticastDelegate<void __cdecl(void),FDefaultDelegateUserPolicy>::Broadcast() []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff764401f97 Collab500.exe!FEngineLoop::Tick() []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff764416d9c Collab500.exe!GuardedMain() []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff764416e6a Collab500.exe!GuardedMainWrapper() []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff764419eec Collab500.exe!LaunchWindowsStartup() []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff76442b6a4 Collab500.exe!WinMain() []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ff76cc5aafa Collab500.exe!__scrt_common_main_seh() [d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ffcfec77034 KERNEL32.DLL!UnknownFunction []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: [Callstack] 0x00007ffd009e2651 ntdll.dll!UnknownFunction []
[2022.06.01-11.48.51:874][  1]LogWindows: Error: 
[2022.06.01-11.48.51:887][  1]LogExit: Executing StaticShutdownAfterError
[2022.06.01-11.48.51:888][  1]LogWindows: FPlatformMisc::RequestExit(1)
[2022.06.01-11.48.51:888][  1]LogWindows: FPlatformMisc::RequestExitWithStatus(1, 3)
[2022.06.01-11.48.51:888][  1]LogCore: Engine exit requested (reason: Win RequestExit)
[2022.06.01-11.48.51:899][  1]Log file closed, 06/01/22 13:48:51

Just for completeness, are my source settings:

Your last comment gave me some more things to try but still no luck. Do you remember exactley which change that made your setup work?

Ok I think I know.

The crash I got was because of the code that deals with the flystick, although I don’t have any (flystick).
So I commented some lines on the plugin (not the one I put on the git.
Maybe you can do that as a test.

Comment these two parts on DTrackFlystickInputDevice.cpp

And test first without the Flystick.

I won’t be able to solve the issue for the Flytick without one :wink:

Result!
It doesn’t crash, the livelink data for the DTrack bodies is available on all nodes.

The Flystick buttons don’t work of course but now I have a good place to look.

Lines 152-156 are commented out on AR-Trackings branch, and on yours too. I uncommented 152-156 and commented 204-208, now I’m getting input from the buttons.

I have no idea what the commented code does, but seems ok to leave it out for now.

This is fantastic! thanks for the assist! Next step for me is to modify the collab template to work with our ui.

Lines 152-156 should have been already commented.

Yeah! Glad it resolved your issue, I know it can be complicated and can take days or weeks to resolve this kind of issues.
You’re on the right track now!

More issues, commenting lines 204-208 removes the input mappings. Did you also experience this?

The output data formats in ART-Human include VRPN and 6dj data formats.
How does liveLink receive and parse this data in UE5?
I tried to parse the mocap data with VRPN in UE5,but failed.
Is there any other method to parse the data in ART-Human? Thank you.

I think the good way is to use DTracks plugin to make it work with livelink.
The only thing DTracks plugin handles is the headset and flystick vr.
For ART gloves, I needed to update the plugin to make it work and it can be a bit tricky…