From 83372c5ac2a90fad6d3e06b07d1de9deae7b4c50 Mon Sep 17 00:00:00 2001 From: Merlin <36685500+Merlin-san@users.noreply.github.com> Date: Sat, 28 Mar 2020 03:55:25 -0700 Subject: [PATCH] Fix null reference exception when settings object is not populated --- Assets/NewScriptTest.cs | 13 + Assets/NewScriptTest.cs.meta | 11 + .../8aa748fd06939154e92b04a733232a00.asset | 17 ++ ...a748fd06939154e92b04a733232a00.asset.meta} | 2 +- .../NewScriptTest Udon C# Program Asset.asset | 225 ++++++++++++++++++ ...criptTest Udon C# Program Asset.asset.meta | 8 + .../Editor/UdonSharpCompilationModule.cs | 2 +- Assets/UdonSharp/UdonSharpSettings.asset | 19 -- 8 files changed, 276 insertions(+), 21 deletions(-) create mode 100644 Assets/NewScriptTest.cs create mode 100644 Assets/NewScriptTest.cs.meta create mode 100644 Assets/SerializedUdonPrograms/8aa748fd06939154e92b04a733232a00.asset rename Assets/{UdonSharp/UdonSharpSettings.asset.meta => SerializedUdonPrograms/8aa748fd06939154e92b04a733232a00.asset.meta} (79%) create mode 100644 Assets/TestScene_UdonProgramSources/NewScriptTest Udon C# Program Asset.asset create mode 100644 Assets/TestScene_UdonProgramSources/NewScriptTest Udon C# Program Asset.asset.meta delete mode 100644 Assets/UdonSharp/UdonSharpSettings.asset diff --git a/Assets/NewScriptTest.cs b/Assets/NewScriptTest.cs new file mode 100644 index 00000000..7922e747 --- /dev/null +++ b/Assets/NewScriptTest.cs @@ -0,0 +1,13 @@ + +using UdonSharp; +using UnityEngine; +using VRC.SDKBase; +using VRC.Udon; + +public class NewScriptTest : UdonSharpBehaviour +{ + void Start() + { + Debug.Log("hello this is a new script 3"); + } +} diff --git a/Assets/NewScriptTest.cs.meta b/Assets/NewScriptTest.cs.meta new file mode 100644 index 00000000..e31d9296 --- /dev/null +++ b/Assets/NewScriptTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 77c56a4f2e1bf204791d84042e3b06e2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SerializedUdonPrograms/8aa748fd06939154e92b04a733232a00.asset b/Assets/SerializedUdonPrograms/8aa748fd06939154e92b04a733232a00.asset new file mode 100644 index 00000000..40eae3a8 --- /dev/null +++ b/Assets/SerializedUdonPrograms/8aa748fd06939154e92b04a733232a00.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bf61d954ecb803046953c666facfb904, type: 3} + m_Name: 8aa748fd06939154e92b04a733232a00 + m_EditorClassIdentifier: + serializedProgramBytesString: Ai8AAAAAASwAAABWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgAuAFUAZABvAG4AUAByAG8AZwByAGEAbQAsACAAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4AAAAAACcBGAAAAEkAbgBzAHQAcgB1AGMAdABpAG8AbgBTAGUAdABJAGQAZQBuAHQAaQBmAGkAZQByAAEEAAAAVQBEAE8ATgAXARUAAABJAG4AcwB0AHIAdQBjAHQAaQBvAG4AUwBlAHQAVgBlAHIAcwBpAG8AbgABAAAAAQEIAAAAQgB5AHQAZQBDAG8AZABlAC8BAAAAARcAAABTAHkAcwB0AGUAbQAuAEIAeQB0AGUAWwBdACwAIABtAHMAYwBvAHIAbABpAGIAAQAAAAgsAAAAAQAAAAAAAAEAAAADAAAAAQAAAAQAAAAJAAAAAQAAAAIAAAAGAAAABQAAAAgAAAAEBQEBBAAAAEgAZQBhAHAALwIAAAABKQAAAFYAUgBDAC4AVQBkAG8AbgAuAEMAbwBtAG0AbwBu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gBVAGQAbwBuAC4AQwBvAG0AbQBvAG4ALgBVAGQAbwBuAFMAeQBuAGMATQBlAHQAYQBkAGEAdABhAFQAYQBiAGwAZQAsACAAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4AGQAAAAYBAAAAAAAAACcBBAAAAHQAeQBwAGUAAWwAAABTAHkAcwB0AGUAbQAuAEMAbwBsAGwAZQBjAHQAaQBvAG4AcwAuAEcAZQBuAGUAcgBpAGMALgBMAGkAcwB0AGAAMQBbAFsAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4ALgBJAG4AdABlAHIAZgBhAGMAZQBzAC4ASQBVAGQAbwBuAFMAeQBuAGMATQBlAHQAYQBkAGEAdABhACwAIABWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgBdAF0ALAAgAG0AcwBjAG8AcgBsAGkAYgABAQwAAABTAHkAbgBjAE0AZQB0AGEAZABhAHQAYQAvDgAAAAFsAAAAUwB5AHMAdABlAG0ALgBDAG8AbABsAGUAYwB0AGkAbwBuAHMALgBHAGUAbgBlAHIAaQBjAC4ATABpAHMAdABgADEAWwBbAFYAUgBDAC4AVQBkAG8AbgAuAEMAbwBtAG0AbwBuAC4ASQBuAHQAZQByAGYAYQBjAGUAcwAuAEkAVQBkAG8AbgBTAHkAbgBjAE0AZQB0AGEAZABhAHQAYQAsACAAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4AXQBdACwAIABtAHMAYwBvAHIAbABpAGIAGgAAAAYAAAAAAAAAAAcFBwUF + programUnityEngineObjects: [] + serializationDataFormat: 0 diff --git a/Assets/UdonSharp/UdonSharpSettings.asset.meta b/Assets/SerializedUdonPrograms/8aa748fd06939154e92b04a733232a00.asset.meta similarity index 79% rename from Assets/UdonSharp/UdonSharpSettings.asset.meta rename to Assets/SerializedUdonPrograms/8aa748fd06939154e92b04a733232a00.asset.meta index 2c74c6b7..d257d1f9 100644 --- a/Assets/UdonSharp/UdonSharpSettings.asset.meta +++ b/Assets/SerializedUdonPrograms/8aa748fd06939154e92b04a733232a00.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fe0e6af5826e91b46a5a10eadc4bf187 +guid: dc9642a6a9caa794dbfd63826f514809 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/TestScene_UdonProgramSources/NewScriptTest Udon C# Program Asset.asset b/Assets/TestScene_UdonProgramSources/NewScriptTest Udon C# Program Asset.asset new file mode 100644 index 00000000..52bdc816 --- /dev/null +++ b/Assets/TestScene_UdonProgramSources/NewScriptTest Udon C# Program Asset.asset @@ -0,0 +1,225 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} + m_Name: NewScriptTest Udon C# Program Asset + m_EditorClassIdentifier: + serializedUdonProgramAsset: {fileID: 11400000, guid: dc9642a6a9caa794dbfd63826f514809, + type: 2} + udonAssembly: ".data_start\r\n\r\n\r\n __refl_const_intnl_udonTypeID: %SystemInt64, + null\r\n __refl_const_intnl_udonTypeName: %SystemString, null\r\n __0_const_intnl_SystemString: + %SystemString, null\r\n __0_const_intnl_SystemUInt32: %SystemUInt32, null\r\n + \ __0_intnl_returnTarget_UInt32: %SystemUInt32, null\r\n\r\n.data_end\r\n\r\n + \ \r\n # using UdonSharp;\r\n \r\n # using UnityEngine;\r\n + \ \r\n # using VRC.SDKBase;\r\n \r\n # using VRC.Udon;\r\n + \ \r\n # public class NewScriptTest : UdonSharpBehaviour\r\n.code_start\r\n + \ \r\n # void Start()\r\n .export _start\r\n \r\n _start:\r\n + \ \r\n PUSH, __0_const_intnl_SystemUInt32\r\n PUSH, __0_intnl_returnTarget_UInt32\r\n + \ COPY\r\n \r\n # {\r\n \r\n # Debug.Log(\"hello + this is a new script 3\");\r\n PUSH, __0_const_intnl_SystemString\r\n EXTERN, + \"UnityEngineDebug.__Log__SystemObject__SystemVoid\"\r\n JUMP_INDIRECT, + __0_intnl_returnTarget_UInt32\r\n \r\n.code_end\r\n" + assemblyError: + sourceCsScript: {fileID: 11500000, guid: 77c56a4f2e1bf204791d84042e3b06e2, type: 3} + behaviourIDHeapVarName: __refl_const_intnl_udonTypeID + compileErrors: [] + debugInfo: + serializedDebugSpans: + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 0 + endSourceChar: 2 + line: 0 + lineChar: 0 + spanCodeSection: "\r\n" + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 2 + endSourceChar: 2 + line: 1 + lineChar: 0 + spanCodeSection: + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 2 + endSourceChar: 8 + line: 1 + lineChar: 0 + spanCodeSection: 'using ' + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 8 + endSourceChar: 20 + line: 1 + lineChar: 6 + spanCodeSection: "UdonSharp;\r\n" + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 20 + endSourceChar: 26 + line: 2 + lineChar: 0 + spanCodeSection: 'using ' + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 26 + endSourceChar: 40 + line: 2 + lineChar: 6 + spanCodeSection: "UnityEngine;\r\n" + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 40 + endSourceChar: 46 + line: 3 + lineChar: 0 + spanCodeSection: 'using ' + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 46 + endSourceChar: 46 + line: 3 + lineChar: 6 + spanCodeSection: + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 46 + endSourceChar: 50 + line: 3 + lineChar: 6 + spanCodeSection: VRC. + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 50 + endSourceChar: 60 + line: 3 + lineChar: 10 + spanCodeSection: "SDKBase;\r\n" + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 60 + endSourceChar: 66 + line: 4 + lineChar: 0 + spanCodeSection: 'using ' + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 66 + endSourceChar: 66 + line: 4 + lineChar: 6 + spanCodeSection: + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 66 + endSourceChar: 70 + line: 4 + lineChar: 6 + spanCodeSection: VRC. + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 70 + endSourceChar: 79 + line: 4 + lineChar: 10 + spanCodeSection: "Udon;\r\n\r\n" + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 79 + endSourceChar: 106 + line: 6 + lineChar: 0 + spanCodeSection: 'public class NewScriptTest ' + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 106 + endSourceChar: 108 + line: 6 + lineChar: 27 + spanCodeSection: ': ' + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 108 + endSourceChar: 108 + line: 6 + lineChar: 29 + spanCodeSection: + - startInstruction: 0 + endInstruction: -1 + startSourceChar: 108 + endSourceChar: 135 + line: 6 + lineChar: 29 + spanCodeSection: "UdonSharpBehaviour\r\n{\r\n " + - startInstruction: 0 + endInstruction: 19 + startSourceChar: 135 + endSourceChar: 153 + line: 8 + lineChar: 4 + spanCodeSection: "void Start()\r\n " + - startInstruction: 20 + endInstruction: 19 + startSourceChar: 153 + endSourceChar: 164 + line: 9 + lineChar: 4 + spanCodeSection: "{\r\n " + - startInstruction: 20 + endInstruction: 19 + startSourceChar: 164 + endSourceChar: 164 + line: 10 + lineChar: 8 + spanCodeSection: + - startInstruction: 20 + endInstruction: 19 + startSourceChar: 164 + endSourceChar: 174 + line: 10 + lineChar: 8 + spanCodeSection: Debug.Log( + - startInstruction: 20 + endInstruction: 20 + startSourceChar: 174 + endSourceChar: 174 + line: 10 + lineChar: 18 + spanCodeSection: + serializationData: + SerializedFormat: 2 + SerializedBytes: + ReferencedUnityObjects: [] + SerializedBytesString: + Prefab: {fileID: 0} + PrefabModificationsReferencedUnityObjects: [] + PrefabModifications: [] + SerializationNodes: + - Name: fieldDefinitions + Entry: 7 + Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.FieldDefinition, + UdonSharp.Editor]], mscorlib + - Name: comparer + Entry: 7 + Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, + mscorlib]], mscorlib + - Name: + Entry: 8 + Data: + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: diff --git a/Assets/TestScene_UdonProgramSources/NewScriptTest Udon C# Program Asset.asset.meta b/Assets/TestScene_UdonProgramSources/NewScriptTest Udon C# Program Asset.asset.meta new file mode 100644 index 00000000..d4f131d4 --- /dev/null +++ b/Assets/TestScene_UdonProgramSources/NewScriptTest Udon C# Program Asset.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8aa748fd06939154e92b04a733232a00 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UdonSharp/Editor/UdonSharpCompilationModule.cs b/Assets/UdonSharp/Editor/UdonSharpCompilationModule.cs index 8654fa5c..a932c407 100644 --- a/Assets/UdonSharp/Editor/UdonSharpCompilationModule.cs +++ b/Assets/UdonSharp/Editor/UdonSharpCompilationModule.cs @@ -94,7 +94,7 @@ public int Compile(List classDefinitions) if (settings == null || settings.buildDebugInfo) { - debugInfo = new ClassDebugInfo(sourceCode, settings.includeInlineCode); + debugInfo = new ClassDebugInfo(sourceCode, settings == null || settings.includeInlineCode); } ASTVisitor visitor = new ASTVisitor(resolver, moduleSymbols, moduleLabels, methodVisitor.definedMethods, classDefinitions, debugInfo); diff --git a/Assets/UdonSharp/UdonSharpSettings.asset b/Assets/UdonSharp/UdonSharpSettings.asset deleted file mode 100644 index e8a93c2a..00000000 --- a/Assets/UdonSharp/UdonSharpSettings.asset +++ /dev/null @@ -1,19 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 0} - m_Name: UdonSharpSettings - m_EditorClassIdentifier: UdonSharp.Editor:UdonSharp:UdonSharpSettingsObject - autoCompileOnModify: 1 - compileAllScripts: 1 - newScriptTemplateOverride: {fileID: 0} - buildDebugInfo: 1 - includeInlineCode: 1