Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[469c] UnrealEd crash on attempt delete actor #1400

Closed
SeriousBuggie opened this issue Oct 4, 2023 · 2 comments
Closed

[469c] UnrealEd crash on attempt delete actor #1400

SeriousBuggie opened this issue Oct 4, 2023 · 2 comments
Labels
bug This is a confirmed bug internal-fam UnrealEd This is an issue in Unreal Editor
Milestone

Comments

@SeriousBuggie
Copy link
Collaborator

Reproduce:
1 Open mhg_test.zip in UnrealEd
2. Press Delete key (one actor already selected on map, if not - select any)

img

Expected result: Selected actor deleted.
Actual result: Editor crash.

General protection fault!

History: EndState <- ULevel::DestroyActor <- (MHGSpot MyLevel.MHGSpot11591) <- 
UEditorEngine::edactDeleteSelected <- UEditorEngine::Exec <- (ACTOR DELETE)
SE(C0000005) @ 56EF47F6
fl=0 rec=0 n=1578908544 i[0]=0 i[1]=3f0
eax=00000000 ebx=10f7d704 ecx=1ed66b9c edx=56fc1714 esi=1ed66b9c edi=5e0dce20 eip=56ef47f6
ebp=0123a230 esp=0123a230 cs=0023 ds=002b es=002b fs=0053 gs=002b flags=00010246
In module 'Z:\UT_469c\System\Engine.dll' at address 001347f6
 <- WEditorFrame::OnCommand <- WM_COMMAND
@SeriousBuggie
Copy link
Collaborator Author

SeriousBuggie commented Oct 4, 2023

	// Send EndState notification.
	guard(EndState);
	if( ThisActor->GetStateFrame() && ThisActor->GetStateFrame()->StateNode && ThisActor->IsProbing(NAME_EndState) )
	{
		ThisActor->eventEndState();
		if( ThisActor->bDeleteMe )
			return 1;
	}
	unguard;

It died somewhere here.

.text:101347F0 ; void __thiscall AActor::ProcessEvent(AActor *this, struct UFunction *, void *, void *)
.text:101347F0                 public ?ProcessEvent@AActor@@UAEXPAVUFunction@@PAX1@Z
.text:101347F0 ?ProcessEvent@AActor@@UAEXPAVUFunction@@PAX1@Z proc near
.text:101347F0                                         ; DATA XREF: .rdata:10201724�o
.text:101347F0                                         ; .rdata:102017F4�o ...
.text:101347F0                 push    ebp
.text:101347F1                 mov     ebp, esp
.text:101347F3                 mov     eax, [ecx+64h]
.text:101347F6                 test    byte ptr [eax+3F0h], 2
.text:101347FD                 jz      short loc_10134806
.text:101347FF                 pop     ebp
.text:10134800                 jmp     ds:__imp_?ProcessEvent@UObject@@UAEXPAVUFunction@@PAX1@Z ; UObject::ProcessEvent(UFunction *,void *,void *)

crash at
.text:101347F6 test byte ptr [eax+3F0h], 2
eax is zero.

void AActor::ProcessEvent( UFunction* Function, void* Parms, void* Result )
{
	guardSlow(AActor::ProcessEvent);
	if( Level->bBegunPlay )
		Super::ProcessEvent( Function, Parms, Result );
	unguardSlow;
}

Level is None.
And in editor it confirmed:
img
So there fix goes as check Level in ProcessEvent.

But in general, on map load, Level must be set, for each actor, to actual level, for avoid such stuff. Because, I guess, such actors will crash editor in many places.

As manual workaround - select all actors on Level and set Level via actor properties.

@SeriousBuggie
Copy link
Collaborator Author

Exactly this issue happen because of Level field of actor:

class MHGSpot expands Actor;

var() int Seq, Jump, Level;
var() MHGSpot Prev;
var() ScriptedPawn MyMonster[3];

So when engine try set Level field it not goes to proper field and in fact left None.

@stijn-volckaert stijn-volckaert added bug This is a confirmed bug UnrealEd This is an issue in Unreal Editor labels Oct 12, 2023
@stijn-volckaert stijn-volckaert added this to the 469e milestone Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a confirmed bug internal-fam UnrealEd This is an issue in Unreal Editor
Projects
None yet
Development

No branches or pull requests

2 participants