System.ExecutionEngineException:Exception_WasThrown
version:6.0 JsonConvert.DeserializeObject<T>(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 }
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:
- unsafe code twiddling with pointers in a way that corrupts memory (managed heap, memory internal to CLR, etc...), especially - but not limited to - pointer arithmethic that blindly and incorrectly assumes the program is running as 32-bit process while it actually runs as 64-bit process (or vice versa)
- invoking native code with incorrect values or that is buggy which can lead to it accessing and modifying memory it should not (and thus potentially corrupting the managed heap or CLR-internal memory states)
- COM interop going wrong
- IL code generators emitting incorrect IL code
- corrupted assemblies (whether they are part of your program of part of the .NET installation)
- defective/glitchy RAM modules (or any other related hardware part of the computer's memory subsystem)