dragonheat123 / unrealgt_ue5

MIT License
7 stars 5 forks source link

UnrealGT ActorInfo Crash #1

Open Shromm-Gaind opened 1 year ago

Shromm-Gaind commented 1 year ago

Running UnrealGT on UE5.1 with win 10.

The engine crashes when I try and use the ActorInfo uasset;

log.txt

Is anyone experiencing the same issue? It is showing it up as a memory problem, I have tried debugging the GTObjectFilter.cpp and the GTActorInfoGeneratorComponent.cpp using cout and flush however nothing pops on the terminal or when the engine crashes.

StuartGJohnson commented 1 year ago

OK, I have a tested fix. Let me do a PR and all the right way. It's a small fix.

Shromm-Gaind commented 1 year ago

Cool, I didn't get too much time to debug the thing. But thanks for all the help :)

StuartGJohnson commented 1 year ago

OK, After this fix I tested bounding boxes (GTActorInfoGenerator), semantic segmentation (GTSegmentationGenerator), depth (GTDepthImageGenerator) and rgb (GTImageGenerator). By testing I mean the outputs are not obviously wrong. I did not run in AccurateBoundingBoxes mode - which appears to not work! (more on that in another issue). Some bounding boxes appear to be quite sloppy. It is also not clear to me that GTActorInfoGenerator is really all you need to get bounding boxes from everything you need to label, either.

StuartGJohnson commented 1 year ago

Note that GTActorInfoGenerator is rather asleep by default. In order to get some bounding boxes, you need to turn them on in the output. In particular, the field "Format Actor String" in the UE5 editor details pane should be something like:

{ActorName} {WorldLocation} {MeshName} {ScreenBoundingBox}

and pay close attention to the settings in the "Format *" fields below for the formatting of these multidimensional outputs.

Shromm-Gaind commented 1 year ago

Hey thanks for all the help, I just managed to test it out myself. However, it is still crashing and giving me the same errors.

StuartGJohnson commented 1 year ago

That's the EXCEPTION_ACCESS_VIOLATION? So, are you using onedrive for your unreal project files? Hmm, does that work for other Unreal projects? Are you using a version of the unrealgt plugin you built yourself (e.g., via the RunUAT.bat BuildPlugin route)?

Shromm-Gaind commented 1 year ago

I did use onedrive for my unreal project files, it does work with other projects. I will try without it as well. But I switched to Linux and got UnrealGT working, it also crashes with ActorInfo.

StuartGJohnson commented 1 year ago

Could be you are doing something rather specific in your project that I am not doing. I note that your exception is in some SkeletalMesh processing - my test project may very well not go down that route.

Shromm-Gaind commented 1 year ago

My project is just the first person test map that comes with UE

StuartGJohnson commented 1 year ago

Ah, so it's Games/First Person in 5.1?

Shromm-Gaind commented 1 year ago

Yes

StuartGJohnson commented 1 year ago

OK, I get valid output out of that project after setting the GTActorInfoGenerator to "track actors that match filter" with the static mesh set to SM_Cube, so I get world locations of all the blue cubes - I think. But, there are a zillion options here that we could be setting different.

StuartGJohnson commented 1 year ago

Actually, the blue cubes are "SM_ChamferCube"s. But those seem to be working. I will plot a bounding box just to double check in the morning. But, I seem to not be breaking what you are breaking, so far !

Shromm-Gaind commented 1 year ago

Could it be possible for you to share your ActorInfo settings

Shromm-Gaind commented 1 year ago

I am trying to get world coordinates of the camera itself

Shromm-Gaind commented 1 year ago

I switched back to windows and tested the recent binaries that were published on this GitHub repo, I have attached the error log.

log2.txt It is worth noting that my desktop username is not "jiahen"...

Shromm-Gaind commented 1 year ago

I compiled the plugin from source, using the link you had put in the readme. However, it still crashes and this is the call stack for when the engine crashes;

image

This is the error it threw; Unhandled exception at 0x00007FFAE89981BA (UnrealEditor-UnrealGT-Win64-DebugGame.dll) in UnrealEditor-Win64-DebugGame.exe: 0xC0000005: Access violation reading location 0x0000000000000018.

Shromm-Gaind commented 1 year ago

What have you set the skeletal mesh to within "track actors that match filter"

StuartGJohnson commented 1 year ago

It looks like within an entry in the tracking filter, the code performs a logical AND. But if I set the skeletal mesh - all else in the entry (Index[0]) None - to the gun (one of two choices - the mannequin bits are the other), I do indeed get a nice bounding box for the gun - which is right in the middle of the camera view.

How about pasting a screenshot of your GTActorInfoGenerator settings - say the top bit with the TrackedActors. You seem to have found the breaking combination of settings!

Really this should all be python code, not some hopelessly complex UI :).

Shromm-Gaind commented 1 year ago

I agree, maybe later I might spend some time modifying UnrealGT. Screenshot of the settings; image Error it threw; Exception thrown at 0x00007FFAE65281BA (UnrealEditor-UnrealGT-Win64-DebugGame.dll) in UnrealEditor-Win64-DebugGame.exe: 0xC0000005: Access violation reading location 0x0000000000000018. image

StuartGJohnson commented 1 year ago

The Wildcard Mesh is not functional. Don't do that!

Or open an issue. It should be a matter of fixing code which discovers assets by name ...

There should be multiple workarounds in the short term; you can add multiple filter entries with known mesh types, etc.

On Tue, Jan 10, 2023 at 7:33 PM Shromm-Gaind @.***> wrote:

I agree, maybe later I might spend some time modifying UnrealGT. Screenshot of the settings; [image: image] https://user-images.githubusercontent.com/55825273/211711602-ec0a33bc-8b80-4054-a48e-d7953cb37a33.png Error it threw; Exception thrown at 0x00007FFAE65281BA (UnrealEditor-UnrealGT-Win64-DebugGame.dll) in UnrealEditor-Win64-DebugGame.exe: 0xC0000005: Access violation reading location 0x0000000000000018. [image: image] https://user-images.githubusercontent.com/55825273/211711722-3de8f00b-339f-4891-bf9f-4c7df6bdf899.png

— Reply to this email directly, view it on GitHub https://github.com/dragonheat123/unrealgt_ue5/issues/1#issuecomment-1378199202, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPTXSMHCQ3OTIAWXXWKT7DWRYS2PANCNFSM6AAAAAATFQTFYE . You are receiving this because you commented.Message ID: @.***>

Shromm-Gaind commented 1 year ago

Thanks this did solve the issue, I will look through the code and see if I can solve it... It would have been good to know in the readme so as to not add Wildcard mesh name as it comes with a string attached as default.

StuartGJohnson commented 1 year ago

code with no tests should be assumed to not work :)

Shromm-Gaind commented 1 year ago

Hey Stuart,

I am struggling to interpret what GTActorInfo produces, specifically how to interpret the data within the ScreenBoundingBox. I have set the format actor string to; {ActorName} {WorldLocation} {MeshName} {ScreenBoundingBox}.

What I really want is for it show the 3DBox String

StuartGJohnson commented 1 year ago

The ScreenBoundingBox comes out as (unless you changed the default in the UI): Format2DBoxString(TEXT("{Min} {Max} {Center} {Extent} {Width} {Height}")) so that's 10 numbers (2+2+2+2+1+1). As far as I can tell (looking at the code), the 3D bounding box is not available yet. The ScreenBoundingBox is the 2D projection of it, but the 3d bounding box is not serialized nor even selectable - as far as I can tell. Doesn't look too hard to add it. I can give it a whirl at some point soon. I would not be surprised if some additional issues crop up in terms of additional camera parameters that are needed.

StuartGJohnson commented 1 year ago

By that I mean it might be nice to have components of the camera transform (position, orientation, etc) dumped as well. Maybe you should open this as a feature request in another issue. Certainly the 3d bounding box actually working is a feature request.

StuartGJohnson commented 1 year ago

On the other hand, maybe the natural 3rd dimension for the 3D BB is depth (i.e. along the camera normal).

StuartGJohnson commented 1 year ago

OK, finally got around to that issue with the skeletal mesh. Apparently a SkeletalMeshComponent can have a null SkeletalMesh in UE5.1. A quick fix is to add that check. Let me test a couple more things then do a PR.