diff options
| author | Rémi Verschelde | 2018-01-12 19:35:57 +0100 |
|---|---|---|
| committer | GitHub | 2018-01-12 19:35:57 +0100 |
| commit | d486cae7016c77af114d8019abf37c57e8bba386 (patch) | |
| tree | 0dbdf9dea6486a60f48d9490c726de77acaa5fdd /modules/mono/csharp_script.cpp | |
| parent | a9b18041fc42b36f3930ed7e49f58313cad9397f (diff) | |
| parent | bff9627dc47f12d517c96a2ba5ee929810491761 (diff) | |
| download | godot-d486cae7016c77af114d8019abf37c57e8bba386.tar.gz godot-d486cae7016c77af114d8019abf37c57e8bba386.tar.zst godot-d486cae7016c77af114d8019abf37c57e8bba386.zip | |
Diffstat (limited to 'modules/mono/csharp_script.cpp')
| -rw-r--r-- | modules/mono/csharp_script.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 8f8116e26..7df2043a6 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -449,7 +449,7 @@ Vector<ScriptLanguage::StackInfo> CSharpLanguage::debug_get_current_stack_info() // Printing an error here will result in endless recursion, so we must be careful - if (!gdmono->is_runtime_initialized() && GDMono::get_singleton()->get_api_assembly()) + if (!gdmono->is_runtime_initialized() || !GDMono::get_singleton()->get_api_assembly() || !GDMonoUtils::mono_cache.corlib_cache_updated) return Vector<StackInfo>(); MonoObject *stack_trace = mono_object_new(mono_domain_get(), CACHED_CLASS(System_Diagnostics_StackTrace)->get_mono_ptr()); @@ -503,6 +503,10 @@ Vector<ScriptLanguage::StackInfo> CSharpLanguage::stack_trace_get_info(MonoObjec return Vector<StackInfo>(); } + // TODO + // what if the StackFrame method is null (method_decl is empty). should we skip this frame? + // can reproduce with a MissingMethodException on internal calls + sif.file = GDMonoMarshal::mono_string_to_godot(file_name); sif.line = file_line_num; sif.func = GDMonoMarshal::mono_string_to_godot(method_decl); |
