我有一个毛伊岛应用程序,未能在iPad上运行在发布模式。这是在最新的Visual Studio for MAC上运行的。
启动画面会出现一小会儿,然后关闭应用程序。
该应用程序在模拟器和我的iPhone/iPad上的调试模式下运行良好。
我是毛伊岛和IOS开发的新手,所以不知道如何解决这个问题。我花了很多时间在网上寻找解决方案,但到目前为止还没有任何效果。
有谁知道我能做些什么来解决这个问题,因为我有一个客户端等待他们的应用程序?
以下是崩溃日志:
{"app_name":"AssetVerifier","timestamp":"2023-05-29 09:44:51.00 -0700","app_version":"1.0","slice_uuid":"9d5a7c8d-689b-3ac4-9e40-182c7ed756c2","adam_id":"6449249070","build_version":"1","platform":2,"bundleID":"com.tbanda.assetverifier","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"iPhone OS 16.4.1 (20E772520a)","roots_installed":0,"name":"AssetVerifier","incident_id":"08193A1F-C436-4642-9CDF-7191619E2F08"}
{
"uptime" : 360000,
"procRole" : "Foreground",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "iPad8,9",
"coalitionID" : 1561,
"osVersion" : {
"isEmbedded" : true,
"train" : "iPhone OS 16.4.1",
"releaseType" : "User",
"build" : "20E772520a"
},
"captureTime" : "2023-05-29 09:44:50.5787 -0700",
"incident" : "08193A1F-C436-4642-9CDF-7191619E2F08",
"pid" : 5041,
"cpuType" : "ARM-64",
"roots_installed" : 0,
"bug_type" : "309",
"procLaunch" : "2023-05-29 09:44:50.0667 -0700",
"procStartAbsTime" : 8747229401222,
"procExitAbsTime" : 8747241655963,
"procName" : "AssetVerifier",
"procPath" : "\/private\/var\/containers\/Bundle\/Application\/2829FD23-04D0-47C4-996D-6F880906D923\/AssetVerifier.app\/AssetVerifier",
"bundleInfo" : {"CFBundleShortVersionString":"1.0","CFBundleVersion":"1","CFBundleIdentifier":"com.tbanda.assetverifier","DTAppStoreToolsBuild":"14E221"},
"storeInfo" : {"itemID":"6449249070","deviceIdentifierForVendor":"4CD95891-234E-4985-A6CC-4ED84F8E9AD8","thirdParty":true,"softwareVersionExternalIdentifier":"857155187"},
"parentProc" : "launchd",
"parentPid" : 1,
"coalitionName" : "com.tbanda.assetverifier",
"crashReporterKey" : "2c2c605b46ce34275d7f9ca8ce666d4f0653d30b",
"wasUnlockedSinceBoot" : 1,
"isLocked" : 0,
"throttleTimeout" : 2147483647,
"codeSigningID" : "com.tbanda.assetverifier",
"codeSigningTeamID" : "GYUSVALXL9",
"codeSigningFlags" : 570450689,
"codeSigningValidationCategory" : 4,
"codeSigningTrustLevel" : 0,
"exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
"asi" : {"libsystem_c.dylib":["abort() called"]},
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":1636680,"threadState":{"x":[{"value":0},{"value":0},{"value":0},{"value":0},{"value":18446744071954212566},{"value":8},{"value":6131690816},{"value":6131688496},{"value":15645619986983673170},{"value":15645619978885897298},{"value":512},{"value":6131688608},{"value":0},{"value":4339063568},{"value":326680576},{"value":2147483648},{"value":328},{"value":8100659456,"symbolLocation":0,"symbol":"_main_thread"},{"value":0},{"value":6},{"value":259},{"value":8100659680,"symbolLocation":224,"symbol":"_main_thread"},{"value":5780154368},{"value":1},{"value":10741634400},{"value":0},{"value":0},{"value":6131694735},{"value":10767828736}],"flavor":"ARM_THREAD_STATE64","lr":{"value":8246219032},"cpsr":{"value":1073741824},"fp":{"value":6131690832},"sp":{"value":6131690800},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":7698101592,"matchesCrashFrame":1},"far":{"value":9414934532}},"name":"tid_103","queue":"com.apple.main-thread","frames":[{"imageOffset":30040,"symbol":"__pthread_kill","symbolLocation":8,"imageIndex":2},{"imageOffset":28952,"symbol":"pthread_kill","symbolLocation":268,"imageIndex":3},{"imageOffset":119160,"symbol":"abort","symbolLocation":180,"imageIndex":4},{"imageOffset":39383056,"imageIndex":0},{"imageOffset":38907628,"imageIndex":0},{"imageOffset":8820,"symbol":"_sigtramp","symbolLocation":56,"imageIndex":5},{"imageOffset":28952,"symbol":"pthread_kill","symbolLocation":268,"imageIndex":3},{"imageOffset":119160,"symbol":"abort","symbolLocation":180,"imageIndex":4},{"imageOffset":36478012,"imageIndex":0},{"imageOffset":37771108,"imageIndex":0},{"imageOffset":38745020,"imageIndex":0},{"imageOffset":36512376,"imageIndex":0},{"imageOffset":39157360,"imageIndex":0},{"imageOffset":89580,"symbol":"start","symbolLocation":2220,"imageIndex":6}]},{"id":1636689,"frames":[{"imageOffset":2932,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":3}]},{"id":1636692,"name":"SGen worker","frames":[{"imageOffset":5464,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":2},{"imageOffset":32888,"symbol":"_pthread_cond_wait","symbolLocation":1232,"imageIndex":3},{"imageOffset":38665240,"imageIndex":0},{"imageOffset":5816,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":2952,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":1636705,"name":"Finalizer","frames":[{"imageOffset":3072,"symbol":"semaphore_wait_trap","symbolLocation":8,"imageIndex":2},{"imageOffset":38225040,"imageIndex":0},{"imageOffset":38093624,"imageIndex":0},{"imageOffset":38093248,"imageIndex":0},{"imageOffset":5816,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":2952,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":1636708,"frames":[{"imageOffset":2932,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":3}]},{"id":1636709,"frames":[{"imageOffset":2932,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":3}]},{"id":1636710,"frames":[{"imageOffset":2932,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":3}]},{"id":1636711,"name":"com.apple.uikit.eventfetch-thread","frames":[{"imageOffset":3204,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":2},{"imageOffset":80724,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":2},{"imageOffset":81452,"symbol":"mach_msg_overwrite","symbolLocation":540,"imageIndex":2},{"imageOffset":4552,"symbol":"mach_msg","symbolLocation":24,"imageIndex":2},{"imageOffset":495892,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":7},{"imageOffset":500544,"symbol":"__CFRunLoopRun","symbolLocation":1208,"imageIndex":7},{"imageOffset":521436,"symbol":"CFRunLoopRunSpecific","symbolLocation":612,"imageIndex":7},{"imageOffset":270532,"symbol":"-[NSRunLoop(NSRunLoop) runMode:beforeDate:]","symbolLocation":212,"imageIndex":8},{"imageOffset":270252,"symbol":"-[NSRunLoop(NSRunLoop) runUntilDate:]","symbolLocation":64,"imageIndex":8},{"imageOffset":5045676,"symbol":"-[UIEventFetcher threadMain]","symbolLocation":416,"imageIndex":9},{"imageOffset":374324,"symbol":"__NSThread__start__","symbolLocation":716,"imageIndex":8},{"imageOffset":5816,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":3},{"imageOffset":2952,"symbol":"thread_start","symbolLocation":8,"imageIndex":3}]},{"id":1636712,"frames":[{"imageOffset":2932,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":3}]},{"id":1636713,"queue":"com.apple.UIKit.KeyboardManagement","frames":[{"imageOffset":6076,"symbol":"__ulock_wait","symbolLocation":8,"imageIndex":2},{"imageOffset":18588,"symbol":"_dlock_wait","symbolLocation":56,"imageIndex":10},{"imageOffset":18000,"symbol":"_dispatch_thread_event_wait_slow","symbolLocation":56,"imageIndex":10},{"imageOffset":79636,"symbol":"__DISPATCH_WAIT_FOR_QUEUE__","symbolLocation":368,"imageIndex":10},{"imageOffset":78528,"symbol":"_dispatch_sync_f_slow","symbolLocation":148,"imageIndex":10},{"imageOffset":3790416,"symbol":"__37-[_UIRemoteKeyboards startConnection]_block_invoke_3","symbolLocation":156,"imageIndex":9},{"imageOffset":470260,"symbol":"__invoking___","symbolLocation":148,"imageIndex":7},{"imageOffset":134548,"symbol":"-[NSInvocation invoke]","symbolLocation":428,"imageIndex":7},{"imageOffset":661656,"symbol":"__NSXPCCONNECTION_IS_CALLING_OUT_TO_REPLY_BLOCK__","symbolLocation":16,"imageIndex":8},{"imageOffset":469868,"symbol":"-[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:]","symbolLocation":520,"imageIndex":8},{"imageOffset":6175276,"symbol":"__88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_5","symbolLocation":188,"imageIndex":8},{"imageOffset":122596,"symbol":"_xpc_connection_reply_callout","symbolLocation":124,"imageIndex":11},{"imageOffset":69352,"symbol":"_xpc_connection_call_reply_async","symbolLocation":88,"imageIndex":11},{"imageOffset":16172,"symbol":"_dispatch_client_callout3","symbolLocation":20,"imageIndex":10},{"imageOffset":138808,"symbol":"_dispatch_mach_msg_async_reply_invoke","symbolLocation":344,"imageIndex":10},{"imageOffset":46092,"symbol":"_dispatch_lane_serial_drain","symbolLocation":372,"imageIndex":10},{"imageOffset":49368,"symbol":"_dispatch_lane_invoke","symbolLocation":436,"imageIndex":10},{"imageOffset":93404,"symbol":"_dispatch_workloop_worker_thread","symbolLocation":648,"imageIndex":10},{"imageOffset":3548,"symbol":"_pthread_wqthread","symbolLocation":288,"imageIndex":3},{"imageOffset":2940,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":3}]}],
"usedImages" : [
{
"source" : "P",
"arch" : "arm64",
"base" : 4335190016,
"size" : 41320448,
"uuid" : "9d5a7c8d-689b-3ac4-9e40-182c7ed756c2",
"path" : "\/private\/var\/containers\/Bundle\/Application\/2829FD23-04D0-47C4-996D-6F880906D923\/AssetVerifier.app\/AssetVerifier",
"name" : "AssetVerifier"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 4415569920,
"size" : 49152,
"uuid" : "e57f2d6d-f3f1-38fe-a6c2-1fb6f6731d4c",
"path" : "\/private\/preboot\/Cryptexes\/OS\/usr\/lib\/libobjc-trampolines.dylib",
"name" : "libobjc-trampolines.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7698071552,
"size" : 229368,
"uuid" : "5998c9ae-c77e-3681-bd6c-0883c89297cf",
"path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
"name" : "libsystem_kernel.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 8246190080,
"size" : 49140,
"uuid" : "b1ee57e1-4484-3714-ba1a-104330ca10c6",
"path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
"name" : "libsystem_pthread.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6776229888,
"size" : 516084,
"uuid" : "72233fde-ddfe-3e78-b991-2dece8cd78c5",
"path" : "\/usr\/lib\/system\/libsystem_c.dylib",
"name" : "libsystem_c.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 8245571584,
"size" : 28656,
"uuid" : "2e6c66fc-2eb9-34f9-995b-ae0b16e030c4",
"path" : "\/usr\/lib\/system\/libsystem_platform.dylib",
"name" : "libsystem_platform.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7178776576,
"size" : 547108,
"uuid" : "41605dc7-f412-37d1-b51b-fee1a26701e9",
"path" : "\/usr\/lib\/dyld",
"name" : "dyld"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6653513728,
"size" : 4096000,
"uuid" : "6a07cbe8-4f65-3dbc-b59d-c1a188a7b95d",
"path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/CoreFoundation",
"name" : "CoreFoundation"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6556286976,
"size" : 9297920,
"uuid" : "35567930-fbc2-374b-b44b-1ddfe3ada4a1",
"path" : "\/System\/Library\/Frameworks\/Foundation.framework\/Foundation",
"name" : "Foundation"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6687518720,
"size" : 25309184,
"uuid" : "b0858d8e-7220-37bf-873f-ecc2b0a358c3",
"path" : "\/System\/Library\/PrivateFrameworks\/UIKitCore.framework\/UIKitCore",
"name" : "UIKitCore"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 6775939072,
"size" : 290816,
"uuid" : "b74732b5-d7fe-34a4-9346-41945701f020",
"path" : "\/usr\/lib\/system\/libdispatch.dylib",
"name" : "libdispatch.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 8246464512,
"size" : 270336,
"uuid" : "7afe0aec-5b9f-3e5d-9803-12ca228ad324",
"path" : "\/usr\/lib\/system\/libxpc.dylib",
"name" : "libxpc.dylib"
}
],
"sharedCache" : {
"base" : 6536511488,
"size" : 2958475264,
"uuid" : "782f7d5e-1a5f-3231-a200-cf048775184a"
},
"vmSummary" : "ReadOnly portion of Libraries: Total=992.9M resident=0K(0%) swapped_out_or_unallocated=992.9M(100%)\nWritable regions: Total=624.9M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=624.9M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nActivity Tracing 256K 1 \nColorSync 48K 3 \nCoreAnimation 32K 2 \nFoundation 16K 1 \nKernel Alloc Once 32K 1 \nMALLOC 596.4M 118 \nMALLOC guard page 128K 8 \nSTACK GUARD 160K 10 \nStack 7440K 10 \nVM_ALLOCATE 19.8M 31 \n__AUTH 2245K 223 \n__AUTH_CONST 27.2M 619 \n__CTF 824 1 \n__DATA 11.7M 614 \n__DATA_CONST 32.1M 625 \n__DATA_DIRTY 6693K 586 \n__FONT_DATA 2352 1 \n__INFO_FILTER 8 1 \n__LINKEDIT 313.2M 3 \n__OBJC_RO 79.3M 1 \n__OBJC_RW 2432K 1 \n__TEXT 679.7M 636 \ndyld private memory 272K 2 \nmapped file 53.2M 131 \nshared memory 48K 3 \n=========== ======= ======= \nTOTAL 1.8G 3632 \n",
"legacyInfo" : {
"threadTriggered" : {
"name" : "tid_103",
"queue" : "com.apple.main-thread"
}
},
"logWritingSignature" : "b4b560f55fed6a6c2f7926c9026b33ce4482c604",
"trialInfo" : {
"rollouts" : [
{
"rolloutId" : "5f72dc58705eff005a46b3a9",
"factorPackIds" : {
"SIRI_VIDEO_APP_SELECTION" : "63d867d28283bf1629655506"
},
"deploymentId" : 240000015
},
{
"rolloutId" : "60da5e84ab0ca017dace9abf",
"factorPackIds" : {
},
"deploymentId" : 240000008
}
],
"experiments" : [
{
"treatmentId" : "595d38ea-3211-4d6d-a267-6e13fa65c7de",
"experimentId" : "641b7ffb89b42413772b9435",
"deploymentId" : 400000002
},
{
"treatmentId" : "d28d100b-301c-49ae-b6c9-57930102d4d4",
"experimentId" : "64466b09a3b9440a82a18c34",
"deploymentId" : 400000002
}
]
}
}
非常感谢。
1条答案
按热度按时间wfauudbj1#
发生这种情况的原因可能有很多,但很有可能您遇到了this piece of documentation中所描述的情况。
从本文档的当前发布版本
当您编译iOS或Mac Catalyst的.NET多平台应用程序UI(.NET MAUI)应用程序时,编译器会将您的应用程序代码转换为Microsoft中间语言(MSIL)。当您在模拟器中运行iOS应用程序或Mac Catalyst应用程序时,.NET公共语言运行时(CLR)会使用即时(JIT)编译器编译MSIL。在运行时,MSIL被编译为本机代码,这些代码可以在应用的正确架构上运行。
但是,iOS上有一个由Apple设置的安全限制,它不允许在设备上执行动态生成的代码。同样,在模拟器中运行在ARM 64架构上的iOS应用程序以及运行在ARM 64架构上的Mac Catalyst应用程序中,也不允许执行动态生成的代码。为了满足此限制,iOS和Mac Catalyst应用程序使用提前(AOT)编译器来编译托管代码。这会生成一个可以部署到Apple设备的原生iOS二进制文件,或者一个原生Mac Catalyst二进制文件。
但更重要的是,还有这张纸条:
如果您的.NET MAUI iOS应用或基于ARM 64的Mac Catalyst应用作为调试版本可以正常工作,但在发布版本时崩溃,请尝试为应用的发布版本启用解释器。可能是您的应用或其中一个库使用了需要解释器的功能。
重要提示
虽然这很容易启用,并为您的整个应用程序启用它,但请确保您了解它的作用。您还可以为应用的某些部分启用解释器。
理想情况下,您应该仅为导致问题的部件启用它。
全应用开启Mono Interpreter
要为您的iOS应用启用解释器,请将以下内容添加到您的csproj:
对于macOS应用程序,请使用以下命令:
对特定程序集开启Mono Interpreter
排除一个程序集
要仅排除一个程序集,请使用以下命令:
这将为所有对象启用解释器,但不包括
System.Xml.dll
,它将被编译为AOT。解释一个程序集
这将为所有二进制文件编译AOT,除了
System.Xml.dll
,它不会被解释。这可能是您在确定了导致问题的程序集(很可能是插件)之后应该使用的选项。
不幸的是,找出哪个汇编/插件导致了问题并不是一件简单的事情,而是要理解解释器做了什么。