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] GPF in UnrealEd when unaligning a "broken" surface #1254

Closed
SeriousBarbie opened this issue May 15, 2023 · 4 comments
Closed

[469c] GPF in UnrealEd when unaligning a "broken" surface #1254

SeriousBarbie opened this issue May 15, 2023 · 4 comments
Labels
bug This is a confirmed bug internal-fam UnrealEd This is an issue in Unreal Editor
Milestone

Comments

@SeriousBarbie
Copy link

In a map are a few "broken" surfaces, and when I select them and choose "Unalign", UnrealEd throws an GPF.
Details, Download link and Screenshots see https://ut99.org/viewtopic.php?p=142866

@SeriousBuggie
Copy link
Collaborator

Well all ok here if not use Software render.

D3D9:
img
xOpenGL;
img
OpenGL:
img
Software:
img

I think time move to use something different from Software render. It bugged itself and can mislead you to problems, which not exists.

It near ASMDAmmo0 if someone search this point.

Crash info:

History: ABrush::BuildCoords <- UEditorEngine::polyTexAlign <- (Type=0,Texels=0) <- UEditorEngine::Exec <- (POLY TEXALIGN DEFAULT)
SE(C0000005) @ 6C3E91EE
fl=0 rec=0 n=1817246576 i[0]=0 i[1]=240
eax=013dd588 ebx=013dd798 ecx=013dd4c8 edx=01727a14 esi=013dd4c8 edi=00000234 eip=6c3e91ee
ebp=013dd4b8 esp=013dd47c cs=0023 ds=002b es=002b fs=0053 gs=002b flags=00010206
In module 'Z:\UT_469c\System\Core.dll' at address 000191ee
 <- WEditorFrame::OnCommand <- WM_COMMAND

@SeriousBuggie
Copy link
Collaborator

SeriousBuggie commented May 15, 2023

Crash happens inside [FCoords::operator*=](public: class FCoords & __thiscall FCoords::operator*=(class FScale const &))
at movss xmm0, dword ptr [edi+0Ch]
edi is first argument passed via stack.

	FLOAT BuildCoords( FModelCoords* Coords, FModelCoords* Uncoords )
	{
		guard(ABrush::BuildCoords);
		if( Coords )
		{
			Coords->PointXform    = (GMath.UnitCoords * PostScale * Rotation * MainScale);
			Coords->VectorXform   = (GMath.UnitCoords / MainScale / Rotation / PostScale).Transpose();
		}
		if( Uncoords )
		{
			Uncoords->PointXform  = (GMath.UnitCoords / MainScale / Rotation / PostScale);
			Uncoords->VectorXform = (GMath.UnitCoords * PostScale * Rotation * MainScale).Transpose();
		}
		return MainScale.Orientation() * PostScale.Orientation();
		unguard;
	}

So I guess BuildCoords just called on NULL or Brush with NULL in PostScale or MainScale.

Possible need check this case in UEditorEngine::polyTexAlign.

							case TEXALIGN_Default:
								Orientation = Poly->Actor->BuildCoords(&Coords, &Uncoords);

So there need check if Poly->Actor is not NULL, before start do something.

Poly->Actor used in other textures align as well, so I guess need fix all at once.

@SeriousBarbie
Copy link
Author

I changed renderer to Direct3D9 and tried also XOpenGL but GPF still happens when trying to unalign one of the surfaces of that brush.

@SeriousBuggie
Copy link
Collaborator

Yes. I describe above why for devs.

@stijn-volckaert stijn-volckaert changed the title GPF in UnrealEd when unaligning a "broken" surface [469c] GPF in UnrealEd when unaligning a "broken" surface May 27, 2023
@stijn-volckaert stijn-volckaert added bug This is a confirmed bug UnrealEd This is an issue in Unreal Editor labels May 27, 2023
@stijn-volckaert stijn-volckaert added this to the 469e milestone May 27, 2023
@stijn-volckaert stijn-volckaert modified the milestones: 469e, 469d Oct 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

3 participants