我能从这样的崩溃信息中获得有用的信息吗?

时间:2016-12-15 13:03:33

标签: c# ios debugging crash crash-reports

我使用的是Xamarin.iOS,它是Objective-C的C#包装器。这是C#的调试问题。

我在任务中发生了崩溃,但该信息没有用,这里是:

*** Terminating app due to uncaught exception 'System.AggregateException', reason: 'System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
  at Newtonsoft.Json.JsonTextReader.ParseValue () <0x100b32280 + 0x004b4> in <filename unknown>:0 
  at Newtonsoft.Json.JsonTextReader.Read () <0x100b2ed80 + 0x00057> in <filename unknown>:0 
  at Newtonsoft.Json.JsonReader.ReadAndMoveToContent () <0x100b28ee0 + 0x0001f> in <filename unknown>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonContract contract, Boolean hasConverter) <0x100b78c70 + 0x00097> in <filename unknown>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, Boolean checkAdditionalContent) <0x100b6f700 + 0x0008f> in <filename unknown>:0 
  --- End of inner exception stack trace ---
---> (Inner Exception #0) Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
  at Newtonsoft.Json.JsonTextReader.ParseValue () <0x100b32280 + 0x004b4> in <filename unknown>:0 
  at Newtonsoft.Json.JsonTextReader.Read () <0x100b2ed80 + 0x00057> in <filename unknown>:0 
  at Newtonsoft.Json.JsonReader.ReadAndMoveToContent () <0x100b28ee0 + 0x0001f> in <filename unknown>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonContract contract, Boolean hasConverter) <0x100b78c70 + 0x00097> in <filename unknown>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, Boolean checkAdditionalContent) <0x100b6f700 + 0x0008f> in <filename unknown>:0 <---

据此,我知道在某个地方,我有一个JSON被反序列化,收到了HTML(以<开头)。

现在我正在浏览其余的崩溃信息,我开始考虑这些信息:

Thread 1:
0   libsystem_kernel.dylib               0x000000018ca1c16c 0x18ca1b000 + 4460
1   CoreFoundation                       0x000000018da17cec 0x18d93b000 + 904428
2   CoreFoundation                       0x000000018da15908 0x18d93b000 + 895240
3   CoreFoundation                       0x000000018d944048 0x18d93b000 + 36936
4   CFNetwork                            0x000000018e135fd0 0x18e067000 + 847824
5   Foundation                           0x000000018e55347c 0x18e449000 + 1090684
6   libsystem_pthread.dylib              0x000000018cb00850 0x18cafd000 + 14416
7   libsystem_pthread.dylib              0x000000018cb00760 0x18cafd000 + 14176
8   libsystem_pthread.dylib              0x000000018cafddac 0x18cafd000 + 3500

这些数字表示什么?我可以从这些数字中检索哪个文件甚至是哪个方法?

1 个答案:

答案 0 :(得分:1)

上述崩溃信息显示崩溃期间的活动帧列表

1   CoreFoundation                       0x000000018da17cec 0x18d93b000 + 904428

以上样本框架的详细信息

1 : Frame Number

CoreFoundation : Framework Name

0x000000018da17cec : Address of the called Function

0x18d93b000 : File Name

+8740 : Line of the Code

要从地址获取函数名称和文件名,我们需要表示崩溃报告。

您在此问题中发布的部分崩溃日志显示了所有默认的iOS框架,因此即使在符号化之后,您也可能无法获得有用的信息。您需要查找具有应用程序名称的活动框架,这可能会为您提供有用的信息。

我们可以使用许多第三方库来进行崩溃报告,例如Fabric,Hockey App,Flurry。

Hockey ap似乎支持Xamarin,希望它有所帮助。