代码之家  ›  专栏  ›  技术社区  ›  Wolfgang Wiens

Flutter应用程序在物理设备上调用extern-sdk时崩溃,但在模拟器上运行良好

  •  0
  • Wolfgang Wiens  · 技术社区  · 2 年前

    所以我有一个Flutter应用程序,我们在其中调用外部提供者的Sdk。sdk由Swift和Java原生代码包含和处理。我们通过方法通道调用与sdk交互。有趣的是,在iOS模拟器上一切正常,但如果打开应用程序并进行一些方法通道调用,与一些sdk方法交互,应用程序就会崩溃。我并不是在每个sdk类方法调用上都看到这种行为,只是在其中一些方法上看到了这种行为。 有人知道我能做什么吗? 这是我在Xcode中看到的日志

    -------------------------------------
    Translated Report (Full Report Below)
    -------------------------------------
    
    Incident Identifier: 41E1547A-2511-4BC7-8730-B0135640485E
    CrashReporter Key:   302b5fc3e066fb58e33a93030beabf4fa1315461
    Hardware Model:      iPhone16,1
    Process:             diagnosticd [446]
    Path:                /usr/libexec/diagnosticd
    Identifier:          diagnosticd
    Version:             ???
    Code Type:           ARM-64 (Native)
    Role:                Unspecified
    Parent Process:      ??? [1]
    Coalition:           com.apple.diagnosticd [634]
    
    Date/Time:           2024-08-27 11:04:30.1505 -0700
    Launch Time:         
    OS Version:          iPhone OS 17.3 (21D50)
    Release Type:        User
    Baseband Version:    1.40.01
    Report Version:      104
    
    Exception Type:  EXC_GUARD
    Exception Subtype: GUARD_TYPE_USER
    Exception Message: namespc 7 reason_code 0x0000000000000009
    Exception Codes: 0x6000000000000007, 0x0000000000000009
    Termination Reason: LIBXPC 9 XPC_EXIT_REASON_FAULT
    
    Triggered by Thread:  0
    
    Thread 0 Crashed:
    0   ???                                    0x1cf5474b8 0x180000000 + 1330934968
    1   ???                                    0x1f1f21e98 0x180000000 + 1911692952
    2   ???                                    0x1f1f225e4 0x180000000 + 1911694820
    3   ???                                    0x1f1f2b7b8 0x180000000 + 1911732152
    4   ???                                    0x1f1f2eaf8 0x180000000 + 1911745272
    5   ???                                    0x1f1f2beac 0x180000000 + 1911733932
    6   ???                                    0x1f1f2d2e0 0x180000000 + 1911739104
    7   ???                                    0x19066c1a4 0x180000000 + 275169700
    8   ???                                    0x19066d67c 0x180000000 + 275175036
    9   ???                                    0x18fdaa300 0x180000000 + 265986816
    10  ???                                    0x18fdabb3c 0x180000000 + 265993020
    11  ???                                    0x19066acd0 0x180000000 + 275164368
    12  ???                                    0x19066a6ec 0x180000000 + 275162860
    13  ???                                    0x19066a3c0 0x180000000 + 275162048
    14  ???                                    0x190673fb4 0x180000000 + 275201972
    15  ???                                    0x190668310 0x180000000 + 275153680
    16  ???                                    0x190670488 0x180000000 + 275186824
    17  ???                                    0x1a165ff50 0x180000000 + 560332624
    18  ???                                    0x190674b34 0x180000000 + 275204916
    19  ???                                    0x18fdaa300 0x180000000 + 265986816
    20  ???                                    0x18fdb96b4 0x180000000 + 266049204
    21  ???                                    0x1906711fc 0x180000000 + 275190268
    22  ???                                    0x19075e074 0x180000000 + 276160628
    23  ???                                    0x190700e58 0x180000000 + 275779160
    24  ???                                    0x1f4aafc54 0x180000000 + 1957362772
    25  ???                                    0x1f4aaa958 0x180000000 + 1957341528
    26  ???                                    0x1f4aad0d4 0x180000000 + 1957351636
    27  ???                                    0x1f4aaddf0 0x180000000 + 1957354992
    28  ???                                    0x1f1f2f1b0 0x180000000 + 1911746992
    29  ???                                    0x1f1f2f5f0 0x180000000 + 1911748080
    30  ???                                    0x18fdaa3c0 0x180000000 + 265987008
    31  ???                                    0x18fdc63d8 0x180000000 + 266101720
    32  ???                                    0x18fdb1718 0x180000000 + 266016536
    33  ???                                    0x18fdc7114 0x180000000 + 266105108
    34  ???                                    0x18fdbd004 0x180000000 + 266063876
    35  ???                                    0x18fdbc878 0x180000000 + 266061944
    36  ???                                    0x1f1edb964 0x180000000 + 1911404900
    37  ???                                    0x1f1edba04 0x180000000 + 1911405060
    
    
    Thread 0 crashed with ARM Thread State (64-bit):
        x0: 0x0000000000000000   x1: 0x0000000016468000   x2: 0xd1377597aeab401b   x3: 0xbc362540f222bcab
        x4: 0x0000000196468000   x5: 0x17f5d2b97141006c   x6: 0x0000000000000000   x7: 0x0000000a06905190
        x8: 0x0000000a06905190   x9: 0x0000000a0700c040  x10: 0x0000000000000000  x11: 0x00000001ef56dd70
       x12: 0x0000000000000001  x13: 0x0000000a06910ca0  x14: 0x0000000a06c00000  x15: 0x0000000102ed0000
       x16: 0x0000000000005000  x17: 0x000000016d156aa0  x18: 0xa475000102d383a4  x19: 0x0000000a06910ca0
       x20: 0x0000000a06c00000  x21: 0x0000000000000000  x22: 0x0000000000000000  x23: 0x000000016d156b70
       x24: 0x160a800102d4e800  x25: 0x0000000100000000  x26: 0x0000000100000000  x27: 0x0000000000000000
       x28: 0x0000000a0700c040   fp: 0x0000000000005000   lr: 0x0000000102ed0000
        sp: 0x0000000006b04e10   pc: 0x0000000000000034 cpsr: 0x00000000
       far: 0x0000000000000000  esr: 0x00000000  Address size fault
    
    Binary Images:
           0x180000000 -        0x22e3c1ffb ??? unknown-arch  <1b40abae977537d1abbc22f2402536bc> ???
    
    Error Formulating Crash Report:
    PC register does not match crashing frame (0x34 vs 0x1CF5474B8)
    
    EOF
    
    -----------
    Full Report
    -----------
    
    {"is_simulated":"1","app_name":"diagnosticd","timestamp":"2024-08-27 11:04:30.00 -0700","app_version":"","slice_uuid":"07e32b31-0b01-3dc5-883d-f70b4dfc7c6c","build_version":"","platform":"2","share_with_app_devs":"0","is_first_party":"1","bug_type":"308","os_version":"iPhone OS 17.3 (21D50)","roots_installed":"0","incident_id":"41E1547A-2511-4BC7-8730-B0135640485E","name":"diagnosticd"}
    {
    "uptime": 290,
    "procRole": "Unspecified",
    "version": 2,
    "userID": 0,
    "deployVersion": 210,
    "modelCode": "iPhone16,1",
    "coalitionID": 634,
    "osVersion": {
    "isEmbedded": true,
    "train": "iPhone OS 17.3",
    "releaseType": "User",
    "build": "21D50"
    },
    "captureTime": "2024-08-27 11:04:30.1505 -0700",
    "codeSigningMonitor": 2,
    "incident": "41E1547A-2511-4BC7-8730-B0135640485E",
    "pid": 446,
    "cpuType": "ARM-64",
    "roots_installed": 0,
    "bug_type": "308",
    "procStartAbsTime": 2190610977,
    "procName": "diagnosticd",
    "procPath": "/usr/libexec/diagnosticd",
    "parentPid": 1,
    "coalitionName": "com.apple.diagnosticd",
    "crashReporterKey": "302b5fc3e066fb58e33a93030beabf4fa1315461",
    "wasUnlockedSinceBoot": 1,
    "isLocked": 0,
    "codeSigningValidationCategory": 0,
    "codeSigningTrustLevel": 0,
    "basebandVersion": "1.40.01",
    "isLightWeightCorpse": 1,
    "exception": {
    "codes": "0x6000000000000007, 0x0000000000000009",
    "reason": 9,
    "message": "namespc 7 reason_code 0x0000000000000009",
    "subtype": "GUARD_TYPE_USER",
    "type": "EXC_GUARD",
    "rawCodes": [
    6917529027641081863,
    9
    ],
    "namespc": 7
    },
    "termination": {
    "flags": 518,
    "code": 9,
    "namespace": "LIBXPC",
    "indicator": "XPC_EXIT_REASON_FAULT"
    },
    "faultingThread": 0,
    "threads": [
    {
    "triggered": true,
    "id": 9215,
    "threadState": {
    "x": [
    {
    "value": 0
    },
    {
    "value": 373719040
    },
    {
    "value": 15075647571976994843
    },
    {
    "value": 13562068288743324843
    },
    {
    "value": 6816169984
    },
    {
    "value": 1726517726077321324
    },
    {
    "value": 0
    },
    {
    "value": 43059794320
    },
    {
    "value": 43059794320
    },
    {
    "value": 43067162688
    },
    {
    "value": 0
    },
    {
    "value": 8310414704
    },
    {
    "value": 1
    },
    {
    "value": 43059842208
    },
    {
    "value": 43062919168
    },
    {
    "value": 4344053760
    },
    {
    "value": 20480
    },
    {
    "value": 6125087392
    },
    {
    "value": 11850377998837711780
    },
    {
    "value": 43059842208
    },
    {
    "value": 43062919168
    },
    {
    "value": 0
    },
    {
    "value": 0
    },
    {
    "value": 6125087600
    },
    {
    "value": 1588222560432351232
    },
    {
    "value": 4294967296
    },
    {
    "value": 4294967296
    },
    {
    "value": 0
    },
    {
    "value": 43067162688
    }
    ],
    "flavor": "ARM_THREAD_STATE64",
    "lr": {
    "value": 4344053760
    },
    "cpsr": {
    "value": 0
    },
    "fp": {
    "value": 20480
    },
    "sp": {
    "value": 112217616
    },
    "esr": {
    "value": 0,
    "description": " Address size fault"
    },
    "pc": {
    "value": 52,
    "matchesCrashFrame": 0
    },
    "far": {
    "value": 0
    }
    },
    "frames": [
    {
    "imageOffset": 1330934968,
    "imageIndex": 0
    },
    {
    "imageOffset": 1911692952,
    "imageIndex": 0
    },
    {
    "imageOffset": 1911694820,
    "imageIndex": 0
    },
    {
    "imageOffset": 1911732152,
    "imageIndex": 0
    },
    {
    "imageOffset": 1911745272,
    "imageIndex": 0
    },
    {
    "imageOffset": 1911733932,
    "imageIndex": 0
    },
    {
    "imageOffset": 1911739104,
    "imageIndex": 0
    },
    {
    "imageOffset": 275169700,
    "imageIndex": 0
    },
    {
    "imageOffset": 275175036,
    "imageIndex": 0
    },
    {
    "imageOffset": 265986816,
    "imageIndex": 0
    },
    {
    "imageOffset": 265993020,
    "imageIndex": 0
    },
    {
    "imageOffset": 275164368,
    "imageIndex": 0
    },
    {
    "imageOffset": 275162860,
    "imageIndex": 0
    },
    {
    "imageOffset": 275162048,
    "imageIndex": 0
    },
    {
    "imageOffset": 275201972,
    "imageIndex": 0
    },
    {
    "imageOffset": 275153680,
    "imageIndex": 0
    },
    {
    "imageOffset": 275186824,
    "imageIndex": 0
    },
    {
    "imageOffset": 560332624,
    "imageIndex": 0
    },
    {
    "imageOffset": 275204916,
    "imageIndex": 0
    },
    {
    "imageOffset": 265986816,
    "imageIndex": 0
    },
    {
    "imageOffset": 266049204,
    "imageIndex": 0
    },
    {
    "imageOffset": 275190268,
    "imageIndex": 0
    },
    {
    "imageOffset": 276160628,
    "imageIndex": 0
    },
    {
    "imageOffset": 275779160,
    "imageIndex": 0
    },
    {
    "imageOffset": 1957362772,
    "imageIndex": 0
    },
    {
    "imageOffset": 1957341528,
    "imageIndex": 0
    },
    {
    "imageOffset": 1957351636,
    "imageIndex": 0
    },
    {
    "imageOffset": 1957354992,
    "imageIndex": 0
    },
    {
    "imageOffset": 1911746992,
    "imageIndex": 0
    },
    {
    "imageOffset": 1911748080,
    "imageIndex": 0
    },
    {
    "imageOffset": 265987008,
    "imageIndex": 0
    },
    {
    "imageOffset": 266101720,
    "imageIndex": 0
    },
    {
    "imageOffset": 266016536,
    "imageIndex": 0
    },
    {
    "imageOffset": 266105108,
    "imageIndex": 0
    },
    {
    "imageOffset": 266063876,
    "imageIndex": 0
    },
    {
    "imageOffset": 266061944,
    "imageIndex": 0
    },
    {
    "imageOffset": 1911404900,
    "imageIndex": 0
    },
    {
    "imageOffset": 1911405060,
    "imageIndex": 0
    }
    ]
    }
    ],
    "usedImages": [
    {
    "size": 2923175932,
    "source": "S",
    "base": 6442450944,
    "uuid": "1b40abae-9775-37d1-abbc-22f2402536bc"
    }
    ],
    "legacyInfo": {
    "threadTriggered": {}
    },
    "trialInfo": {
    "rollouts": [
    {
    "rolloutId": "60da5e84ab0ca017dace9abf",
    "factorPackIds": {},
    "deploymentId": 240000008
    },
    {
    "rolloutId": "64c025b28b7f0e739e4fbe58",
    "factorPackIds": {},
    "deploymentId": 240000019
    }
    ],
    "experiments": [
    {
    "treatmentId": "f5687f11-d85a-4939-ae50-e02f2bf87837",
    "experimentId": "65eb76345e31b60d077e7f95",
    "deploymentId": 400000019
    },
    {
    "treatmentId": "c47ab4cc-c9c3-4b5d-a87c-e2433ce02597",
    "experimentId": "6639bc6ba73d460582162323",
    "deploymentId": 400000006
    }
    ]
    },
    "reportNotes": [
    "PC register does not match crashing frame (0x34 vs 0x1CF5474B8)"
    ]
    }```
    
    0 回复  |  直到 2 年前