EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.
http://esotericsoftware.com/
Other
4.41k stars 2.91k forks source link

[ue4] Re-Importing .atlas crashes UE4 #1806

Closed DynasticGames closed 3 years ago

DynasticGames commented 4 years ago

Hi,

We are currently trying to export a spine project from Spine 3.8.99 to UE4 4.23.0 using the latest 3.8 ue4 runtimes as of 11/3/20. When reimporting the files, the .atlas file allows fails import with the following message. The .skel and the .png import fine.

Unhandled exception

UE4Editor_SpinePlugin!spine::String::operator=() [...\Plugins\SpinePlugin\Source\SpinePlugin\Public\spine-cpp\include\spine\SpineString.h:121] UE4Editor_SpinePlugin!spine::SkeletonBinary::readAttachment() [...\Plugins\SpinePlugin\Source\SpinePlugin\Public\spine-cpp\src\spine\SkeletonBinary.cpp:492] UE4Editor_SpinePlugin!spine::SkeletonBinary::readSkin() [...\Plugins\SpinePlugin\Source\SpinePlugin\Public\spine-cpp\src\spine\SkeletonBinary.cpp:472] UE4Editor_SpinePlugin!spine::SkeletonBinary::readSkeletonData() [...\Plugins\SpinePlugin\Source\SpinePlugin\Public\spine-cpp\src\spine\SkeletonBinary.cpp:277] UE4Editor_SpinePlugin!USpineSkeletonDataAsset::GetSkeletonData() [...\Plugins\SpinePlugin\Source\SpinePlugin\Private\SpineSkeletonDataAsset.cpp:296] UE4Editor_SpinePlugin!USpineSkeletonAnimationComponent::CheckState() [...\Plugins\SpinePlugin\Source\SpinePlugin\Private\SpineSkeletonAnimationComponent.cpp:130] UE4Editor_SpinePlugin!USpineSkeletonAnimationComponent::InternalTick() [...\Plugins\SpinePlugin\Source\SpinePlugin\Private\SpineSkeletonAnimationComponent.cpp:97] UE4Editor_Engine UE4Editor_Engine UE4Editor_Engine UE4Editor_Engine UE4Editor_Core UE4Editor_Core UE4Editor_Engine UE4Editor_Engine UE4Editor_Engine UE4Editor_Engine UE4Editor_UnrealEd UE4Editor_UnrealEd UE4Editor UE4Editor UE4Editor UE4Editor UE4Editor kernel32 ntdll

We exported Binary with extension .skel, with Nonessential data, Animation clean up, and warnings all checked.

We have reupdated the runtime.

badlogic commented 4 years ago

Could you send the exported files? If you can't share them publicly, please send them via email to contact@esotericsoftware.com.

DynasticGames commented 4 years ago

Thanks for the quick response. I just sent the files over email.

HaraldCsaszar commented 3 years ago

It seems as if your spine-cpp files are old and don't fit the spine-ue4 status. Can it be that you have updated spine-ue4 part of the plugin but not the spine-cpp subdirectory?The reason to believe it's outdated is that there is nothing on line 121 that could possibly throw an exception: https://github.com/EsotericSoftware/spine-runtimes/blob/3.8/spine-cpp/spine-cpp/include/spine/SpineString.h#L121An earlier revision of this file however could easily contain a line that throws on line 121, which would explain your failed import.

Could you please have a quick check and have a look at what the content of your \Plugins\SpinePlugin\Source\SpinePlugin\Public\spine-cpp\include\spine\SpineString.h file is at line 121? If it is indeed outdated, please be sure to copy the latest revision of the whole 3.8/spine-cpp/spine-cpp into your Plugins\SpinePlugin\Source\SpinePlugin\Public\spine-cpp directory after removing the previous old content.

After replacing the files in the spine-cpp directory, please be sure to hit the "Compile" button in Unreal Editor, then after successful compilation close Unreal Editor and reopen it. Alternatively you can also follow this procedure here: http://esotericsoftware.com/spine-ue4#Updating-spine-ue4-Runtime

Please let us know if this resolves your problem.

DynasticGames commented 3 years ago

Thank you, that solved the issue.

HaraldCsaszar commented 3 years ago

Thanks for letting us know, glad it resolved it.