Editor Crash:: if (GetNumber() == NAME_NO_NUMBER_INTERNAL)

Can anyone explain what is the possible cause of this crash?

The only guidance I have is that, usually when I encounter a exception like this (where you’re in the Engine code), it had to do with the call which got me there. So for your case it would be somewhere in which you’re calling FName’s ToString method. I would start there and see if there’s something odd about it.

1 Like

My guess is you have an FName incorrectly initializing somewhere. You should run up the call stack to find the function that is calling FName::ToString otherwise we are all in the dark

1 Like

@gh0stfase1 @Rumzie
I am not calling anywhere FName::ToString don’t know what is happening.
Call Stack

Happens on begin play then? Does it happen in every level or just one of your levels.

1 Like

Ugh, call stack…lies, all lies! This feels like a red-herring. I’m with @Rumzie, something is afoot on begin play. I do wonder what line 3517 in DispatchBeginPlay is doing. Maybe that will point to what is getting inspected (or ToString’d)…or maybe it’s nothing :slight_smile: …unfortunately I don’t have the editor in front of me.

1 Like

@gh0stfase1 @Rumzie

I found the cause of the problem, Something bad in the function GenerateItems(); I am calling this function on beginplay

1 Like

BeginPlay() strikes again

if I comment this function GenerateItems(); everything works fine

Word…an enigma for sure

1 Like

Money…and is ToString getting worked over in some fashion there?

this function has no call to FName::ToString , I can post this function if you want to take a look

Yes we need code

but this generate items function is calling more 4 functions, I have to look in them if they have something related to the error.
the most terrifying thing is everything was working fine, I restarted the computer and now these errors
didn’t modified the code.

I will post it in few minutes

This contains the Generateitems(); Functions

MyGameMode.cpp (6.2 KB)

I have a feeling it’s this chunk of code

for (auto& Array : ItemsIDArr)
			{
				if (Array.Type == EItemType::E_Weapon)
				{
					if (const UDataTable* DT_ItamWeapon{ LoadObject<UDataTable>(GetWorld(), TEXT("/Game/DataTables/Items/Weapon/DT_ItamWeapon")) })
					{
						if (const FST_ItemWeapon* OutRow{ DT_ItamWeapon->FindRow<FST_ItemWeapon>(FName(Array.ID), "") })
						{
							if (OutRow)
							{
								TempTypeAndID_Setter.Type = EItemType::E_Ammo;
								TempTypeAndID_Setter.ID = OutRow->UseAmmoID;
								ItemsIDArr.Add(TempTypeAndID_Setter);
								//Remove any item from the array if this is not a weapon
								for (auto& Array : ItemsIDArr)
								{
									if (Array.Type != EItemType::E_Weapon)
									{
										ItemsIDArr.RemoveAt(1);
										break;
									}
								}
							}
						}
					}
				}
			}



Can you add a breakpoint to you function and launch from VS in DebugEditor so we know which line to look at?

I commented these lines of codes and still the same error, this code is just checking if the type of spawn item is weapon, just delete he first index which is not a weapon and place the corresponding ammo bullet to that weapon which was ready to spawn, and spawn both of them.

I will now be trying what you recommended and will inform about the output

the code part you posted , in blueprint it looks like this