diff --git a/lib/fluent/plugin/exception_detector.rb b/lib/fluent/plugin/exception_detector.rb index 2d868bf..bd747f9 100644 --- a/lib/fluent/plugin/exception_detector.rb +++ b/lib/fluent/plugin/exception_detector.rb @@ -149,8 +149,17 @@ def self.supported rule(:dart_stack, /^$/, :dart_stack) ].freeze + UNITY_RULES = [ + rule(:start_state, /^Caught fatal signal.*$/, :unity_stack_begin), + rule(:unity_stack_begin, /^Obtained \d+ stack frames.*$/, + :unity_stack_frames), + rule(:unity_stack_frames, /^#\d.*in _start$/, :start_state), + rule(:unity_stack_frames, /^#\d/, :unity_stack_frames) + ].freeze + ALL_RULES = ( - JAVA_RULES + PYTHON_RULES + PHP_RULES + GO_RULES + RUBY_RULES + DART_RULES + JAVA_RULES + PYTHON_RULES + PHP_RULES + GO_RULES + RUBY_RULES + + DART_RULES + UNITY_RULES ).freeze RULES_BY_LANG = { @@ -165,6 +174,7 @@ def self.supported rb: RUBY_RULES, ruby: RUBY_RULES, dart: DART_RULES, + unity: UNITY_RULES, all: ALL_RULES }.freeze diff --git a/test/plugin/test_exception_detector.rb b/test/plugin/test_exception_detector.rb index f001d0e..a81c789 100644 --- a/test/plugin/test_exception_detector.rb +++ b/test/plugin/test_exception_detector.rb @@ -559,6 +559,33 @@ class ExceptionDetectorTest < Test::Unit::TestCase #3 main (file:///path/to/code/dartFile.dart:10:3) #4 _startIsolate. (dart:isolate-patch/isolate_patch.dart:265) #5 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151) +END + + UNITY_ERR = <c:<.cctor>b__7_0 (object) +#7 0x000000414ece0b in UnityEngine.UnitySynchronizationContext:Exec () +#8 0x000000414ec723 in UnityEngine.UnitySynchronizationContext:ExecuteTasks () +#9 0x007f94d3582505 in mono_print_method_from_ip +#10 0x007f94d36f15c3 in mono_perfcounter_foreach +#11 0x007f94d36f2470 in mono_runtime_invoke +#12 0x007f94d5ceb292 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) +#13 0x007f94d5ce92df in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) +#14 0x007f94d4ee5a87 in Scripting::UnityEngine::UnitySynchronizationContextProxy::ExecuteTasks(ScriptingExceptionPtr*) +#15 0x007f94d5aa602f in InitPlayerLoopCallbacks()::UpdateScriptRunDelayedTasksRegistrator::Forward() +#16 0x007f94d5a993ee in ExecutePlayerLoop(NativePlayerLoopSystem*) +#17 0x007f94d5a9945a in ExecutePlayerLoop(NativePlayerLoopSystem*) +#18 0x007f94d5a999d2 in PlayerLoop() +#19 0x007f94d5d57f7e in PlayerMain(int, char**) +#20 0x007f94d46e009b in __libc_start_main +#21 0x00555a30fc8689 in _start END ARBITRARY_TEXT = <