Search Issue Tracker

By Design

Votes

0

Found in

5.3.4f1

Issue ID

824366

Regression

No

Fatal error occurs when trying to open the project that contains unsupported shader

Shaders

-

Steps to reproduce the issue:
1. Download the attached project and try opening it.
2. Agree to update the Scripting API if asked to.
3. Notice that after some time the loading process fails and "Fatal error!" window appears:

Fatal error! The file '/Users/unityqaiosteam/Downloads/case_824366-DESN1131A3_Singh_Jasjot/library/metadata/0d/0d1644bdf064147baa97f235fc5b4903' - 'Assets/Standard Assets/Effects/ImageEffects/Shaders/EdgeDetectNormals.shader' is corrupted! Remove it and launch unity again!
[Position out of bounds!]

4. In the "Fatal Error!" window press "Quit" button.

The Editor crashes on:

Receiving unhandled NULL exception
Obtained 79 stack frames.
#0 0x007fff973ae607 in std::_List_node_base::unhook()
#1 0x00000107babd80 in catch_exception_raise
#2 0x00000107ba9895 in catch_exception_raise
#3 0x00000107c145e6 in catch_exception_raise
#4 0x00000107c1ba59 in catch_exception_raise
#5 0x007fff91cb2ebb in (anonymous namespace)::AutoreleasePoolPage::pop(void*)
#6 0x007fff98b3aa72 in _CFAutoreleasePoolPop
#7 0x007fff8c9bfb8a in -[NSAutoreleasePool drain]
#8 0x00000109522549 in _CTFontManagerUnregisterFontForData
#9 0x00000106f55706 in cef_zip_reader_create
#10 0x00000106f557de in cef_zip_reader_create
#11 0x00000106f54bd7 in cef_zip_reader_create
#12 0x007fff8a1ff0ff in __cxa_finalize_ranges
#13 0x007fff8a1ff403 in exit
#14 0x0000010260ce83 in LaunchBugReporter(BugReportMode)
#15 0x00000100c74db4 in EditorMonoConsole::LogToConsoleImplementation(std::string const&, int, char const*, int, int, int, int, void (*)(CppLogEntry const&))
#16 0x00000100c7539d in LogToConsoleImplementation(std::string const&, int, char const*, int, int, int, int, void (*)(CppLogEntry const&))
#17 0x00000102180c43 in DebugStringToFilePostprocessedStacktrace(DebugStringToFileData const&)
#18 0x000001021813db in DebugStringToFile(DebugStringToFileData const&)
#19 0x0000010217f42d in DebugStringToFile(char const*, int, char const*, int, LogMessageFlags, int, int, void (*)(CppLogEntry const&))
#20 0x00000101d530cc in CachedReader::OutOfBoundsError(unsigned long, unsigned long)
#21 0x00000101d53a84 in CachedReader::UpdateReadCache(void*, unsigned long)
#22 0x00000101d582f4 in Walk(TypeTreeIterator const&, CachedReader&, int*, bool)
#23 0x00000101d581a1 in Walk(TypeTreeIterator const&, CachedReader&, int*, bool)
#24 0x00000101d581a1 in Walk(TypeTreeIterator const&, CachedReader&, int*, bool)
#25 0x00000101d581a1 in Walk(TypeTreeIterator const&, CachedReader&, int*, bool)
#26 0x00000101d58380 in Walk(TypeTreeIterator const&, CachedReader&, int*, bool)
#27 0x00000101d581a1 in Walk(TypeTreeIterator const&, CachedReader&, int*, bool)
#28 0x00000101d581a1 in Walk(TypeTreeIterator const&, CachedReader&, int*, bool)
#29 0x00000101d5859f in SafeBinaryRead::BeginTransfer(char const*, char const*, bool (**)(void*, SafeBinaryRead&), bool)
#30 0x000001015bc27d in void EditorExtension::Transfer<SafeBinaryRead>(SafeBinaryRead&)
#31 0x000001015dda46 in void NamedObject::Transfer<SafeBinaryRead>(SafeBinaryRead&)
#32 0x00000101da2413 in void Shader::Transfer<SafeBinaryRead>(SafeBinaryRead&)
#33 0x00000101d78e4d in Shader::VirtualRedirectTransfer(SafeBinaryRead&)
#34 0x000001021cb386 in SerializedFile::ReadObject(long long, ObjectCreationMode, bool, TypeTree const**, bool*, Object&)
#35 0x00000101d3bd30 in PersistentManager::ReadObjectThreaded(int)
#36 0x00000101d3a077 in PersistentManager::ReadObject(int, AwakeFromLoadMode)
#37 0x00000100d88563 in PPtr<Object>::operator*() const
#38 0x0000010231953a in GetFirstDerivedObjectAtCompletePath(std::string const&, int)
#39 0x00000102316c77 in GetFirstDerivedObjectInAssetsAndLibrary(std::string const&, int)
#40 0x00000102316a78 in AssetImporter::GetFirstDerivedObjectNamedImpl(std::string const&, int)
#41 0x000001023b9cad in ShaderImporter::GenerateAssetData()
#42 0x00000100d46e80 in AssetDatabase::ImportAsset(UnityGUID, Asset&, std::string const&, std::string const&, int, UpdateAssetOptions, std::basic_string<char, std::char_traits<char>, stl_allocator<char, (MemLabelIdentifier)1, 16> > const&, bool, InstanceIDLocalIdentifierLookup&, dynamic_array<Object*, 8ul>&)
#43 0x00000100d4bd34 in AssetDatabase::UpdateAsset(UnityGUID const&, UnityGUID const&, UpdateAssetOptions, Hash128, AssetImportingTimerStats*)
#44 0x00000100d69eba in AssetInterface::ProcessAssetsImplementation(double&, AssetInterface::CancelBehaviour, UpdateAssetOptions)
#45 0x00000100d67a8c in AssetInterface::StopAssetEditing(AssetInterface::CancelBehaviour, UpdateAssetOptions)
#46 0x00000100d664a5 in AssetInterface::Refresh(UpdateAssetOptions)
#47 0x00000100d2e190 in ScriptUpdatingManager::ReportPossibleUpdateFinished(bool)
#48 0x00000100d2e152 in ScriptUpdatingManager::FinishCompiling(bool)
#49 0x00000100df4858 in CompilationFinishedAsync(bool, int, bool, MonoIsland const&, std::list<MonoCompileError, std::allocator<MonoCompileError> > const&)
#50 0x00000100de7219 in UpdateMonoCompileTasks(bool)
#51 0x00000100de7aca in RecompileScripts(int, bool, BuildTargetPlatform, bool)
#52 0x00000100ded21c in LoadMonoAssembliesAndRecompileIfNecessary(bool)
#53 0x0000010257bbb0 in Application::InitializeProject()
#54 0x00000102612ef0 in -[EditorApplication applicationDidFinishLaunching:]
#55 0x007fff98b92a0c in __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
#56 0x007fff98b9299f in ___CFXRegistrationPost_block_invoke
#57 0x007fff98b92917 in _CFXRegistrationPost
#58 0x007fff98b92682 in ___CFXNotificationPost_block_invoke
#59 0x007fff98b4f442 in -[_CFXNotificationRegistrar find:object:observer:enumerator:]
#60 0x007fff98b4e695 in _CFXNotificationPost
#61 0x007fff8c9ae31a in -[NSNotificationCenter postNotificationName:object:userInfo:]
#62 0x007fff8be9e045 in -[NSApplication _postDidFinishNotification]
#63 0x007fff8be9ddaf in -[NSApplication _sendFinishLaunchingNotification]
#64 0x007fff8bd58f65 in -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:]
#65 0x007fff8bd58a0f in -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:]
#66 0x007fff8c9fcbbd in -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:]
#67 0x007fff8c9fca37 in _NSAppleEventManagerGenericHandler
#68 0x007fff8f5f61b5 in aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*)
#69 0x007fff8f5f5f3c in dispatchEventAndSendReply(AEDesc const*, AEDesc*)
#70 0x007fff8f5f5e58 in aeProcessAppleEvent
#71 0x007fff9b4c2ef5 in AEProcessAppleEvent
#72 0x007fff8bd543d4 in _DPSNextEvent
#73 0x007fff8bd53369 in -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
#74 0x007fff8bd47ecc in -[NSApplication run]
#75 0x007fff8bd11162 in NSApplicationMain
#76 0x0000010262dcb8 in EditorMain(int, char const**)
#77 0x0000010262e4c9 in main
#78 0x00000100002064 in start
Launching bug reporter

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

User's call stack:

StreamedBinaryRead<0>::TransferSTLStyleArray<UnityStr>
ShaderSnippet::Transfer<StreamedBinaryRead<0> >
StreamedBinaryRead<0>::TransferSTLStyleMap<std::map<int,ShaderSnippet,std::less<int>,std::allocator<std::pair<int const ,ShaderSnippet> > > >
ShaderCompilationInfo::Transfer<StreamedBinaryRead<0> >
Shader::Transfer<StreamedBinaryRead<0> >
Shader::VirtualRedirectTransfer
SerializedFile::ReadObject
PersistentManager::ReadObjectThreaded
PersistentManager::ReadObject
PPtr<Object>::operator*
AssetImporter::SetThumbnail
AssetImporter::GetFirstDerivedObjectNamedImpl
AssetImporter::GetFirstDerivedObjectNamed<TextAsset>
ShaderImporter::GenerateAssetData
AssetDatabase::ImportAsset
AssetDatabase::UpdateAsset
AssetInterface::ProcessAssetsImplementation
AssetInterface::StopAssetEditing
AssetInterface::Refresh
Application::InitializeProject
WinMain
read

Expected result:
Even if the shader is not supported, the project should be opened fine.

Reproduced with:
5.1.5f1, 5.2.5f1, 5.3.5f1, 5.4.0f3, 5.4.0p2, 5.5.0a6.

Note:
Deleting "Library" folder and then trying to open the project works fine (there are some error messages in the "Console" window, but at least the Editor does not crash).

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.