I have gone through the logs to where the actual problem occurs (with ITools4) ONLY IN THE APP DOWNLOADED FROM THE APPLE STORE (no problems in local dev nor release mode app): the App crashes right after receiving a scan result with iBarcodeScanner, I don't get any problems / debug output when I try to run this either with a non-store cert in release or debug mode, it simply works there.
Here is the part of the logs where it crashes when I use the App downloaded from the store, it is very cryptic and I hope there is an Iphone Expert who can decyhper what is going wrong:
(it actually happens where it says Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x1b62d4878') as mentioned this only happens with the App when it is derived from the store, it does not happen when testing in dev or release mode. Only change for Store app... certificates and running it again through the remote builder as a release app with release certs. Everything else work fine with the app. The situation of the crash is the following:
- Scanner stops, Sound plays, scan result is send to webview to process it. First the code of the respective sub in B4i then the logs from the console.... the Beep sub simply plays a previously initialized mediaplayer (ScanNotificator.Initialize(File.DirAssets,"shutter.mp3", "Scanned") as mentioned all works fine except when running the actual store app.
Here is the part of the logs where it crashes when I use the App downloaded from the store, it is very cryptic and I hope there is an Iphone Expert who can decyhper what is going wrong:
(it actually happens where it says Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x1b62d4878') as mentioned this only happens with the App when it is derived from the store, it does not happen when testing in dev or release mode. Only change for Store app... certificates and running it again through the remote builder as a release app with release certs. Everything else work fine with the app. The situation of the crash is the following:
- Scanner stops, Sound plays, scan result is send to webview to process it. First the code of the respective sub in B4i then the logs from the console.... the Beep sub simply plays a previously initialized mediaplayer (ScanNotificator.Initialize(File.DirAssets,"shutter.mp3", "Scanned") as mentioned all works fine except when running the actual store app.
B4X:
Sub Scanner_Detected(Codes As List)
Scanner.Stop
Panel2.Visible = False
Panel1.Visible = True
Beep("Scan")
Dim sb As StringBuilder
sb.Initialize
For Each code As BarcodeCode In Codes
sb.Append(code.Value)
Next
Private val As String = sb.ToString
Private s As String = $"Sabatschus.send("${val}")"$
WKWebView1.EvaluateJavaScript("send", s)
Wait For WKWebView1_JSComplete(Success As Boolean, Tag As Object, Result As String)
End Sub
B4X:
Jul 11 13:06:48 iPhone-von-Olaf kernel(AppleEmbeddedAudio)[0] <Notice>: Speaker: streaming audio
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(AudioToolbox)[27] <Notice>: 935: aqmeio@0x106324430, device 0x88 (AQDefaultDevice), AudioDeviceStart (err 0)
Jul 11 13:06:49 iPhone-von-Olaf mediaremoted[29] <Notice>: [MediaServerNowPlayingDataSource] Any app is playing did change notification received. SomeClientIsPlaying = YES
Jul 11 13:06:49 iPhone-von-Olaf FuerteCoin Wallet[294] <Notice>: waves://asdkfjhasdflkahsfdlasfdahs344543
Jul 11 13:06:49 iPhone-von-Olaf FuerteCoin Wallet[294] <Notice>: Sabatschus.send("waves://asdkfjhasdflkahsfdlasfdahs344543")
Jul 11 13:06:49 iPhone-von-Olaf FuerteCoin Wallet(WebKit)[294] <Notice>: 0x104258000 - WebProcessProxy::didSetAssertionState(Foreground) taking foreground assertion for network process
Jul 11 13:06:49 iPhone-von-Olaf FuerteCoin Wallet(WebKit)[294] <Notice>: 0x104258000 - WebProcessProxy::didSetAssertionState(Foreground) taking foreground assertion for network process
Jul 11 13:06:49 iPhone-von-Olaf FuerteCoin Wallet(WebKit)[294] <Notice>: 0x104258000 - WebProcessProxy::didSetAssertionState(Foreground) taking foreground assertion for network process
Jul 11 13:06:49 iPhone-von-Olaf mediaremoted(MediaRemote)[29] <Notice>: Posted Active Now Playing Notification kMRMediaRemoteAnyApplicationIsPlayingDidChangeNotification for path origin-iPhone von Olaf-1280262988/client--0/player-(null)
Jul 11 13:06:49 iPhone-von-Olaf FuerteCoin Wallet[294] <Notice>: true
Jul 11 13:06:49 iPhone-von-Olaf FuerteCoin Wallet(CoreFoundation)[294] <Notice>: -[NSNull length]: unrecognized selector sent to instance 0x1b62d4878
Jul 11 13:06:49 iPhone-von-Olaf FuerteCoin Wallet(CoreFoundation)[294] <Notice>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x1b62d4878'
*** First throw call stack:
(0x183f5ed8c 0x1831185ec 0x183f6c098 0x183f645c8 0x183e4a41c 0x10047f8d0 0x10047f84c 0x1004823a4 0x10047080c 0x10047e128 0x10047ddbc 0x100477684 0x1004cab94 0x193c8141c 0x193b2f160 0x193b2f028 0x193b53ea8 0x193b4b92c 0x193969634 0x193ba86d4 0x19392c618 0x19392f020 0x18b594148 0x18b594408 0x183f07404 0x183f06c2c 0x183f0479c 0x183e24da8 0x185e09020 0x18de41758 0x10046fc44 0x1838b5fc0)
Jul 11 13:06:49 iPhone-von-Olaf MTLCompilerService(MTLCompiler)[297] <Notice>: Build request: pipeline
Jul 11 13:06:49 iPhone-von-Olaf MTLCompilerService(MTLCompiler)[297] <Notice>: Compilation (pipeline) time 16.760667 ms
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(AudioToolbox)[27] <Notice>: 105: { "action":"client_died", "session":{"ID":"0x1b13e","PID":294,"name":"FuerteCoin Walle"}, "details":null }
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(CoreMedia)[27] <Notice>: -CMSessionMgr- cmsSetIsPlaying: CMSession: 'sid:0x1b13e, FuerteCoin Walle(294), 'prim'' with [SoloAmbientSound/Default] [NonMixable] [System Audio] stopping playing.
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(libAudioStatistics.dylib)[27] <Notice>: CAReportingClient.mm:328:-[CAReportingClient sendMessage:category:type:reporters:]: message {
Volume = "0.8125";
VolumeCategory = "Audio/Video";
VolumeOperationProcess = "com.workandsun.billateria";
VolumeOperationTime = 1178;
VolumePlayingState = 0;
}: (
1769500
)
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(CoreMedia)[27] <Notice>: -CMSessionMgr- cmsSetIsPlaying: CMSession: Starting deactivate timer for client 'sid:0x1b13e, FuerteCoin Walle(294), 'prim''
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(libAudioStatistics.dylib)[27] <Notice>: CAReportingClient.mm:328:-[CAReportingClient sendMessage:category:type:reporters:]: message {
"active devices" = "[ { vdef, [ ], [ pspk ( 0 ) ] }, { vcal, [ pdln ( 0 ) ], [ puln ( 0 ) ] } ]";
category = csav;
"going_active" = 0;
mode = imdf;
"staying_active" = 1;
}: (
1769500
)
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(CoreMedia)[27] <Notice>: -CMSessionMgr- cmsSetIsActive: CMSession: 'sid:0x1b13e, FuerteCoin Walle(294), 'prim'' with category/mode SoloAmbientSound/Default going inactive 0 1
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(VirtualAudio)[27] <Notice>: VirtualAudio_Stream.cpp:241:SetPropertyData: Client request to set virtual format [ 32/44100/1; flags: 0x29; bpp: 4; fpp: 1; Bpf: 4 ] on virtual audio stream 171.
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(CoreMedia)[27] <Notice>: -CMSessionMgr- cmsSetIsActive: CMSession: Stopping deactivate timer for client 'sid:0x1b13e, FuerteCoin Walle(294), 'prim''
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(libAudioStatistics.dylib)[27] <Notice>: CAReportingClient.mm:328:-[CAReportingClient sendMessage:category:type:reporters:]: message {
Volume = "0.8125";
VolumeOperationProcess = "com.workandsun.billateria";
VolumeOperationTime = 1178;
VolumePlayingState = 0;
}: (
1769500
)
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(CoreMedia)[27] <Notice>: -CMSUtilities- CMSUtility_SendSessionStateAndVolumeReportToAudioToolBox: Stopping reporter for session : sid:0x1b13e, FuerteCoin Walle(294), 'prim', reporter id = 1769500
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(libAudioStatistics.dylib)[27] <Notice>: CAReportingClient.mm:316:-[CAReportingClient stopReporters:]: stopping (
1769500
)
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(libAudioStatistics.dylib)[27] <Notice>: CAReportingClient.mm:328:-[CAReportingClient sendMessage:category:type:reporters:]: message {
"session_duration" = "11.65443801879883";
}: (
1769500
)
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(libAudioStatistics.dylib)[27] <Notice>: CAReportingClient.mm:273:-[CAReportingClient destroyReporterWithID:]: removing 1769500 from client and server
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(AudioToolbox)[27] <Notice>: 192: stopping 1769500
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(AudioToolbox)[27] <Notice>: 210: destroying 1769500
Jul 11 13:06:49 iPhone-von-Olaf com.apple.WebKit.WebContent(WebKit)[295] <Error>: WebLoaderStrategy::networkProcessCrashed: failing all pending resource loaders
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: Client relinquished <BKProcessAssertion: 0x103127f20; "CMSession.294."com.workandsun.billateria"."SoloAmbientSound".isPlayingProcessAssertion" (audio:inf); id:\M-b\M^@\M-&711BE47E67DC>
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [FuerteCoin Wall:294] Deactivate assertion: <BKProcessAssertion: 0x103127f20; "CMSession.294."com.workandsun.billateria"."SoloAmbientSound".isPlayingProcessAssertion" (audio:inf); id:\M-b\M^@\M-&711BE47E67DC>
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [FuerteCoin Wall:294] dump all assertions HWM:4 (deactivateAssertion): {
<BKProcessAssertion: 0x103119840; "Resume" (activation:inf); id:\M-b\M^@\M-&052D399E08EA> [active]
<BKProcessAssertion: 0x10313c580; "com.apple.WebKit.ProcessAssertion" (finishTask:180s); id:\M-b\M^@\M-&343C90836188> [active]
}
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [FuerteCoin Wall:294] Scheduling allow-idle-sleep timer with interval: 180.0
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [FuerteCoin Wall:294] Setting jetsam priority to 10 [0x10108]
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [FuerteCoin Wall:294] dump all assertions HWM:4 (CPUMON check): {
<BKProcessAssertion: 0x103119840; "Resume" (activation:inf); id:\M-b\M^@\M-&052D399E08EA> [active]
<BKProcessAssertion: 0x10313c580; "com.apple.WebKit.ProcessAssertion" (finishTask:180s); id:\M-b\M^@\M-&343C90836188> [active]
}
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: Updating PowerAssertion on FuerteCoin Wall:294
Jul 11 13:06:49 iPhone-von-Olaf SpringBoard(KeyboardArbiter)[55] <Error>: HW kbd: Failed to set (null) as keyboard focus
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(libAudioStatistics.dylib)[27] <Notice>: CAReportingClient.mm:273:-[CAReportingClient destroyReporterWithID:]: removing 1769503 from client and server
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(AudioToolbox)[27] <Notice>: 210: destroying 1769503
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [FuerteCoin Wall:294] Remove assertion: <BKProcessAssertion: 0x103127f20; "CMSession.294."com.workandsun.billateria"."SoloAmbientSound".isPlayingProcessAssertion" (audio:inf); id:\M-b\M^@\M-&711BE47E67DC>
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [FuerteCoin Wall:294] dump all assertions HWM:4 (CPUMON check): {
<BKProcessAssertion: 0x103119840; "Resume" (activation:inf); id:\M-b\M^@\M-&052D399E08EA> [active]
<BKProcessAssertion: 0x10313c580; "com.apple.WebKit.ProcessAssertion" (finishTask:180s); id:\M-b\M^@\M-&343C90836188> [active]
}
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: Updating PowerAssertion on FuerteCoin Wall:294
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: -[BKAssertion dealloc] - <0x103127f20>
Jul 11 13:06:49 iPhone-von-Olaf mediaremoted[29] <Notice>: [MediaServerNowPlayingDataSource] Any app is playing did change notification received. SomeClientIsPlaying = NO
Jul 11 13:06:49 iPhone-von-Olaf mediaremoted(MediaRemote)[29] <Notice>: Posted Active Now Playing Notification kMRMediaRemoteAnyApplicationIsPlayingDidChangeNotification for path origin-iPhone von Olaf-1280262988/client--0/player-(null)
Jul 11 13:06:49 iPhone-von-Olaf backboardd(BaseBoard)[60] <Error>: Unable to get short BSD proc info for 294: No such process
Jul 11 13:06:49 iPhone-von-Olaf backboardd(BaseBoard)[60] <Error>: Unable to get proc info for 294: Undefined error: 0
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(AudioToolbox)[27] <Notice>: 390: AQME device AQDefaultDevice: client stopping: <AudioQueueObject@0x10396ee00; sid:0x1b13e, FuerteCoin Walle(294), 'prim'; play>; running count now 0
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(RTCReporting)[27] <Notice>: startLogging: Client starts logging...
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(AudioToolbox)[27] <Error>: 294: flush error Nothing to flush
Jul 11 13:06:49 iPhone-von-Olaf mediaserverd(RTCReporting)[27] <Notice>: aboutToDealloc: RTCReporting client session 0x106c2b870 is about to dealloc
Jul 11 13:06:49 iPhone-von-Olaf rtcreportingd[247] <Notice>: createReportingSessionWithDelegate: retained XPC Transaction. Ref count is 2
Jul 11 13:06:49 iPhone-von-Olaf rtcreportingd[247] <Notice>: updateCorrelatedSessions: Session 4294967295 has no correlated sessions as it is a standalone session
Jul 11 13:06:49 iPhone-von-Olaf rtcreportingd(RTCReporting)[247] <Notice>: getPersistentIdentifierForDNU: The value for uuidRespectDNU: <private>
Jul 11 13:06:49 iPhone-von-Olaf rtcreportingd(RTCReporting)[247] <Notice>: getPersistentIdentifierForDNU: The value for uuidOverrideDNU: <private>
Jul 11 13:06:49 iPhone-von-Olaf rtcreportingd[247] <Error>: RTCReportingBackend(newBackendWithName): release_timeout
Jul 11 13:06:49 iPhone-von-Olaf rtcreportingd(RTCReporting)[247] <Notice>: getPersistentIdentifierForDNU: The value for uuidRespectDNU: <private>
Jul 11 13:06:49 iPhone-von-Olaf rtcreportingd(RTCReporting)[247] <Notice>: getPersistentIdentifierForDNU: The value for uuidOverrideDNU: <private>
Jul 11 13:06:49 iPhone-von-Olaf ReportCrash(CrashReporterSupport)[300] <Notice>: Trying to create CR directory structure as root
Jul 11 13:06:49 iPhone-von-Olaf callservicesd(CallKit)[129] <Notice>: Connection invalidated for call controller host connection: <private>
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [com.apple.WebKi:295] Port death watcher fired.
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: Server invalidated <BKProcessAssertion: 0x103033750; "Web content visible" (extension:inf); id:\M-b\M^@\M-&4A569E74F54A>
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: Client relinquished <BKProcessAssertion: 0x103034780; "Web content visible" (extension:inf); id:\M-b\M^@\M-&869A468CB066>
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: Client relinquished <BKProcessAssertion: 0x103033750; "Web content visible" (extension:inf); id:\M-b\M^@\M-&4A569E74F54A>
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: Client relinquished <BKProcessAssertion: 0x10313c580; "com.apple.WebKit.ProcessAssertion" (finishTask:180s); id:\M-b\M^@\M-&343C90836188>
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [FuerteCoin Wall:294] Deactivate assertion: <BKProcessAssertion: 0x10313c580; "com.apple.WebKit.ProcessAssertion" (finishTask:180s); id:\M-b\M^@\M-&343C90836188>
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [FuerteCoin Wall:294] dump all assertions HWM:4 (deactivateAssertion): {
<BKProcessAssertion: 0x103119840; "Resume" (activation:inf); id:\M-b\M^@\M-&052D399E08EA> [active]
}
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [com.apple.WebKi:296] Port death watcher fired.
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [com.apple.WebKi:296] Ignoring assertion remove, because we are terminated or pending termination
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [com.apple.WebKi:295] Ignoring assertion remove, because we are terminated or pending termination
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: Server invalidated <BKProcessAssertion: 0x103034780; "Web content visible" (extension:inf); id:\M-b\M^@\M-&869A468CB066>
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [FuerteCoin Wall:294] New process assertion state; preventSuspend, preventThrottleDownUI, preventThrottleDownCPU, preventSuspendOnSleep (assertion 0x10313c580 added: (none); removed: preventIdleSleep)
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [FuerteCoin Wall:294] Setting jetsam priority to 10 [0x10100]
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: [FuerteCoin Wall:294] dump all assertions HWM:4 (CPUMON check): {
<BKProcessAssertion: 0x103119840; "Resume" (activation:inf); id:\M-b\M^@\M-&052D399E08EA> [active]
}
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: Releasing PowerAssertion on FuerteCoin Wall:294 from update
Jul 11 13:06:49 iPhone-von-Olaf assertiond[66] <Notice>: Process exited: <BKProcess: 0x10303f8b0; com.apple.WebKi; com.apple.WebKit.WebContent; pid: 295; agency: Extension; visibility: foreground; task: none; hostpid: 294>
Jul 11 13:06:49 iPhone