Download

Cant read Data from my C++ File - Motioncapture Datastream

Hi,

I wrote a Plugin, that connects to a Motioncapture Server and get Data from there. The Protocol is Natnet (Optitrack)

I Use UNreal 4.15.0 and compiled it from source, because the plugin from Optitrack is only compatible up to this version.

When I print the incomming data to screen, the data is exact what I want and then, the program crashes. When I put the data onto the skeleton, it moves perfecty, and then crashes. The Errors are manifold.

Before I want to tell you anything about theese mass of different errors I got through the last week, I want to tell you, that it does NOT crash, when I dont read the data into a the Blueprint.

So, the program DOES NOT CRASH, when I dont read the data into a Blueprint.

So, I think, the problem is, that I want to read data, while it is written in the background within my c++ code. Optitrack says, that the stream is much faster, than the tick in unreal 4. So it would be possible, that the data changes, while Im reading it.

Is there a standart, about how to read from a stream? Somthing like, first STOP the stream to read it, and than after doing so, let it go ahead.

Also I tested to FIRST save the incomming data in the Blueprint to a variable, and then read only this stored data from the variable, but it does not work.

Thanks for helping me!!
Best,

Hi,

now I use a Getter-Function, to get a private variable FArray<FRotator> into blueprint. The Program runns between 7 and 25 minutes until it breaks. The Error is:

Ausnahme ausgelöst bei 0x000007FEF37DC5E0 (vcruntime140.dll) in UE4Editor.exe: 0xC0000005: Zugriffsverletzung beim Lesen an Position 0x0000000000000000.

As you can see, it happens at “CopyToEmpty” function.

I absolutely have no ideas anymore. It would be so nice to hear from someone from you!!!

Best,

Hi,

so I fixed it, by avoid to send Arrays instead of Rotators. I cant imagine why it ist not possible, to send Arrays or TMaps. So the fact ist, it is possible to write into Rotators into C++ Coed, and read them later from blueprint, without getting an read Error.

Shoul I report it as a Bug??

Best,