JamesNK / Newtonsoft.Json

Json.NET is a popular high-performance JSON framework for .NET
https://www.newtonsoft.com/json
MIT License
10.8k stars 3.26k forks source link

System.ExecutionEngineException:Exception_WasThrown #2691

Open xyyp224 opened 2 years ago

xyyp224 commented 2 years ago

version:6.0 JsonConvert.DeserializeObject(json) . that throw System.ExecutionEngineException:Exception_WasThrown.

this is my json string:

{ "cainfo":null, "err_msg":null, "inf_refmsgid":"610124202206072040300306455627", "infcode":0, "output":{ "setldetail":[ { "crt_payb_lmt_amt":null, "fund_pay_type":"310200", "fund_pay_type_name":"城镇职工基本医疗保险个人账户基金", "fund_payamt":0.17, "inscp_scp_amt":0.17, "setl_proc_info":null } ], "setlinfo":{ "acct_mulaid_pay":0, "acct_pay":0.17, "act_pay_dedc":0.00, "age":32, "balc":0.90, "brdy":"1990-03-26", "certno":"610327199003263123", "clr_optins":"610327", "clr_type":"11", "clr_way":"1", "cvlserv_flag":"0", "cvlserv_pay":0.00, "fulamt_ownpay_amt":0.00, "fund_pay_sumamt":0.00, "gend":"2", "hifes_pay":0.00, "hifmi_pay":0.00, "hifob_pay":0.00, "hifp_pay":0.00, "hosp_part_amt":0.00, "inscp_scp_amt":0.17, "insutype":"310", "maf_pay":0.00, "mdtrt_cert_type":"03", "mdtrt_id":"115352569", "med_type":"11", "medfee_sumamt":0.17, "medins_setl_id":"H61032701698202206072042362207", "naty":"01", "oth_pay":0.00, "overlmt_selfpay":0.00, "pool_prop_selfpay":0.0000, "preselfpay_amt":0.00, "psn_cash_pay":0.00, "psn_cert_type":"01", "psn_name":"邱娜", "psn_no":"61000006000000000028514263", "psn_part_amt":0.17, "psn_type":"11", "setl_id":"77774365", "setl_time":"2022-06-07 20:40:24" } }, "refmsg_time":null, "respond_time":null, "signtype":null, "warn_msg":null }

elgonzo commented 2 years ago

System.ExecutionEngineException indicates that some internal state inside the CLR / runtime went horribly wrong.

In all likelihood this is not caused by Newtonsoft.Json.

The method call on which this exception is thrown (regardless of the method call being a method from Newtonsoft.Json or some other method) is typically not the cause of the problem (the method call basically just being the event that makes the CLR detect the invalid internal CLR state, but didn't cause that invalid internal CLR state). The exeption occuring is often just a symptom of a problem occuring earlier in the program execution. The causing problem might even have been occuring substantially earlier before that exeception has been thrown.

This makes System.ExecutionEngineException one of the hardest and nastiest exceptions to troubleshoot. There is no way around, you will have to diagnose this problem yourself, and quite likely this will be a rather tedious and frustrating endeavour, unfortunately. :-(

Some of the typically culprits that can produce such a problem: