I'm trying to add tests to the part of my kotlin multiplatform library that uses Mapbox, but I am unable to instantiate an instance of MKMapView.
Even a test as simple as this crashes.
#Test
fun `test creating view`() {
MKMapView(CGRectMake(0.0, 0.0, 512.0, 512.0))
}
The output is
2020-07-14 09:31:53.667 test.kexe[9090:10700111] Error creating notification handler for simulator graphics quality override: 3
2020-07-14 09:31:53.670 test.kexe[9090:10700111] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'contentScale is unreasonable (NaN or Inf)'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cad9 -[NSException raise] + 9
3 VectorKit 0x00007fff49c14143 _Z25checkForBogusContentScaled + 115
4 VectorKit 0x00007fff49c14252 -[VKMapView initShouldRasterize:inBackground:contentScale:auditToken:] + 62
5 MapKit 0x00007fff2782009a -[MKBasicMapView initWithFrame:andGlobe:shouldRasterize:] + 419
6 MapKit 0x00007fff27755b85 -[MKMapView _commonInitFromIB:gestureRecognizerHostView:showsAttribution:showsAppleLogo:] + 1331
7 MapKit 0x00007fff27756698 -[MKMapView initWithFrame:] + 253
8 test.kexe 0x000000010e346dd0 _70616e6765612d6170706c655f74657374_knbridge2 + 64
9 test.kexe 0x000000010e33fa8b kfun:com.weather.pangea.apple.AppleViewportTest.test creating view() + 987
10 test.kexe 0x000000010e3410a6 kfun:com.weather.pangea.apple.$AppleViewportTest$test$0.$test creating view$FUNCTION_REFERENCE$1.invoke#internal + 70
11 test.kexe 0x000000010e34111f kfun:com.weather.pangea.apple.$AppleViewportTest$test$0.$test creating view$FUNCTION_REFERENCE$1.$<bridge-UNNN>invoke(P1)#internal + 95
12 test.kexe 0x000000010e3e0fa7 kfun:kotlin.native.internal.test.BaseClassSuite.TestCase.run() + 1287
13 test.kexe 0x000000010e3d9256 kfun:kotlin.native.internal.test.TestRunner.run#internal + 2406
14 test.kexe 0x000000010e3da3e4 kfun:kotlin.native.internal.test.TestRunner.runIteration#internal + 2916
15 test.kexe 0x000000010e3dacee kfun:kotlin.native.internal.test.TestRunner.run()kotlin.Int + 958
16 test.kexe 0x000000010e3ce29d kfun:kotlin.native.internal.test.testLauncherEntryPoint(kotlin.Array<kotlin.String>)kotlin.Int + 301
17 test.kexe 0x000000010e3ce387 kfun:kotlin.native.internal.test.main(kotlin.Array<kotlin.String>) + 55
18 test.kexe 0x000000010e341315 Konan_start + 165
19 test.kexe 0x000000010e34ba1b Init_and_run_start + 107
20 libdyld.dylib 0x00007fff51a231fd start + 1
I am able to create the MKMapView correctly when running a real app on the Simulator. I'm guessing this is related to the environment that kotlin test uses to run the tests, but I have no clue how to configure that.
I'm using Kotlin 1.3.72 with the built in iOS test task for the gradle plugin.
The root cause here is that Kotlin/Native utilizes xcrun simctl spawn CLI tool for running tests.
This command runs a given test on a simulator, not as an app but just as an executable file. This makes testing more straightforward, but some corner cases can work wrong. Probably, here we got an issue with device services responsible for graphics. In this assumption, I rely on 1) Error creating notification handler for simulator graphics quality override: 3 error message and 2) initShouldRasterize in the stacktrace, which seems suspicious to me.
To prove that the problem is not directly related to Kotlin/Native, I've made two code snippets: map.swift and map.kt.
Compiling each of them like:
swiftc map.swift -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk -target x86_64-apple-ios13.5
~/.konan/kotlin-native-macos-1.3.72/bin/konanc -tr -g -ea map.kt -target ios_x64 -o map
creates two executable files: map and map.kexe. After that, I run both of them using simctl spawn:
xcrun simctl spawn -s "C01BDD64-19DC-49A0-9363-92EAFFD1B258" <absolute_path>/map
2020-07-15 12:49:57.262 map[8840:1053205] Error creating notification handler for simulator graphics quality override: 3
2020-07-15 12:49:57.264 map[8840:1053205] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'contentScale is unreasonable (NaN or Inf)'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cad9 -[NSException raise] + 9
3 VectorKit 0x00007fff49c14143 _Z25checkForBogusContentScaled + 115
4 VectorKit 0x00007fff49c14252 -[VKMapView initShouldRasterize:inBackground:contentScale:auditToken:] + 62
5 MapKit 0x00007fff2782009a -[MKBasicMapView initWithFrame:andGlobe:shouldRasterize:] + 419
6 MapKit 0x00007fff27755b85 -[MKMapView _commonInitFromIB:gestureRecognizerHostView:showsAttribution:showsAppleLogo:] + 1331
7 MapKit 0x00007fff27756698 -[MKMapView initWithFrame:] + 253
8 map 0x000000010b924f0d $sSo9MKMapViewC5frameABSo6CGRectV_tcfcTO + 77
9 map 0x000000010b924eaa $sSo9MKMapViewC5frameABSo6CGRectV_tcfC + 74
10 map 0x000000010b924e07 main + 183
11 libdyld.dylib 0x00007fff51a231fd start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Child process terminated with signal 6: Abort trap
xcrun simctl spawn -s "C01BDD64-19DC-49A0-9363-92EAFFD1B258" <absolute_path>/map.kexe
[==========] Running 1 tests from 1 test cases.
[----------] Global test environment set-up.
[----------] 1 tests from MapKt
[ RUN ] MapKt.test creating view
2020-07-15 13:49:19.079 map.kexe[9117:1072135] Error creating notification handler for simulator graphics quality override: 3
2020-07-15 13:49:19.082 map.kexe[9117:1072135] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'contentScale is unreasonable (NaN or Inf)'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cad9 -[NSException raise] + 9
3 VectorKit 0x00007fff49c14143 _Z25checkForBogusContentScaled + 115
4 VectorKit 0x00007fff49c14252 -[VKMapView initShouldRasterize:inBackground:contentScale:auditToken:] + 62
5 MapKit 0x00007fff2782009a -[MKBasicMapView initWithFrame:andGlobe:shouldRasterize:] + 419
6 MapKit 0x00007fff27755b85 -[MKMapView _commonInitFromIB:gestureRecognizerHostView:showsAttribution:showsAppleLogo:] + 1331
7 MapKit 0x00007fff27756698 -[MKMapView initWithFrame:] + 253
8 map.kexe 0x000000010e29c530 _6d6170_knbridge0 + 64
9 map.kexe 0x000000010e293605 kfun:test creating view() + 1077
10 map.kexe 0x000000010e2938f5 kfun:$test creating view$FUNCTION_REFERENCE$0.invoke#internal + 37
11 map.kexe 0x000000010e29394e kfun:$test creating view$FUNCTION_REFERENCE$0.$<bridge-UNN>invoke()#internal + 62
12 map.kexe 0x000000010e206218 kfun:kotlin.native.internal.test.TopLevelSuite.TestCase.run() + 1112
13 map.kexe 0x000000010e1fe73d kfun:kotlin.native.internal.test.TestRunner.run#internal + 2445
14 map.kexe 0x000000010e1ff8ea kfun:kotlin.native.internal.test.TestRunner.runIteration#internal + 2954
15 map.kexe 0x000000010e200215 kfun:kotlin.native.internal.test.TestRunner.run()kotlin.Int + 997
16 map.kexe 0x000000010e1f3826 kfun:kotlin.native.internal.test.testLauncherEntryPoint(kotlin.Array<kotlin.String>)kotlin.Int + 310
17 map.kexe 0x000000010e1f36ca kfun:kotlin.native.internal.test.main(kotlin.Array<kotlin.String>) + 58
18 map.kexe 0x000000010e1f3975 Konan_start + 165
19 map.kexe 0x000000010e2a13ab Init_and_run_start + 107
20 libdyld.dylib 0x00007fff51a231fd start + 1
21 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Child process terminated with signal 6: Abort trap
Nevertheless, I would agree that this inconvenience should be solved to make testing more user-friendly. I can file an issue at the Kotlin bug tracker, are you okay with that?
Related
I am trying to update or reinstall latest version of IDEA from 2020.3 to 2021.2.2 which is keep crashing in MacOS. I tried to uninstall and delete all existing folders like cache, logs etc but still same issue. Please help!
Below is the MacOS reporting stack trace:
Process: idea [46282] Path:
/private/var/folders/*/IntelliJ IDEA.app/Contents/MacOS/idea
Identifier: com.jetbrains.intellij Version:
2021.2.2 (IU-212.5284.40) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: idea [46282]
User ID: 501
Date/Time: 2021-09-20 16:40:06.524 +0530 OS Version:
macOS 11.6 (20G165) Report Version: 12 Bridge OS Version:
5.5 (18P4759a) Anonymous UUID: 434C2C7D-709A-E6A0-CE1E-44E6AABE6D87
Sleep/Wake UUID: 4A9CC604-3A7A-4339-B3FC-7C519F79F4C0
Time Awake Since Boot: 85000 seconds Time Since Wake: 20000
seconds
System Integrity Protection: enabled
Notes: Translocated Process
Crashed Thread: 3
Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes:
KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Note:
EXC_CORPSE_NOTIFY
VM Regions Near 0:
__TEXT 109749000-109751000 [ 32K] r-x/r-x SM=COW /var/folders/*/IntelliJ IDEA.app/Contents/MacOS/idea
Application Specific Information: abort() called
Thread 0:: Dispatch queue: com.apple.main-thread 0
libsystem_kernel.dylib 0x00007fff204ff2ba mach_msg_trap + 10 1
libsystem_kernel.dylib 0x00007fff204ff62c mach_msg + 60 2
com.apple.CoreFoundation 0x00007fff2062c49f
__CFRunLoopServiceMachPort + 316 3 com.apple.CoreFoundation 0x00007fff2062ab7f __CFRunLoopRun + 1328 4 com.apple.CoreFoundation
0x00007fff20629f8c CFRunLoopRunSpecific + 563 5
com.jetbrains.intellij 0x000000010974d9e3 main + 332 6
libdyld.dylib 0x00007fff2054ff3d start + 1
Thread 1: 0 libsystem_pthread.dylib 0x00007fff20530420
start_wqthread + 0
Thread 2: 0 libsystem_pthread.dylib 0x00007fff20530420
start_wqthread + 0
Thread 3 Crashed: 0 libsystem_kernel.dylib
0x00007fff2050592e __pthread_kill + 10 1 libsystem_pthread.dylib
0x00007fff205345bd pthread_kill + 263 2 libsystem_c.dylib
0x00007fff20489406 abort + 125 3 libjvm.dylib
0x000000010bcc33a0 os::abort(bool, void*, void const*) + 22 4
libjvm.dylib 0x000000010ba907f6 jni_FatalError + 244
5 libjvm.dylib 0x000000010bb7794d
JvmtiExport::post_vm_initialized() + 393 6 libjvm.dylib
0x000000010bdc4cea Threads::create_vm(JavaVMInitArgs*, bool*) + 1844
7 libjvm.dylib 0x000000010baaa2a0 JNI_CreateJavaVM
96 8 com.jetbrains.intellij 0x000000010974f7a8 -[Launcher launch] + 371 9 com.apple.Foundation 0x00007fff213b4437
NSThread__start + 1068 10 libsystem_pthread.dylib 0x00007fff205348fc _pthread_start + 224 11 libsystem_pthread.dylib
0x00007fff20530443 thread_start + 15
......
Thread 3 last branch register state not available.
Binary Images:
0x109749000 - 0x109750fff +com.jetbrains.intellij (2021.2.2 - IU-212.5284.40) <305B2794-5B9E-3DE9-B3ED-02140CF70AC2>
/var/folders//IntelliJ IDEA.app/Contents/MacOS/idea
0x10b690000 - 0x10b69afff +net.java.openjdk.11.0.12.jdk (1.0 - 11.0.12) <792B647E-6262-3390-A4F1-225DA7483FC1>
/var/folders//IntelliJ
IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib
0x10b6a5000 - 0x10bee8fff +libjvm.dylib (0) <17796A43-93D9-37A3-A25C-76C394E271F0> /var/folders//IntelliJ
IDEA.app/Contents/jbr/Contents/Home/lib/server/libjvm.dylib
0x10c3fd000 - 0x10c404fff +libverify.dylib (0) /var/folders//IntelliJ
IDEA.app/Contents/jbr/Contents/Home/lib/libverify.dylib
0x10c40e000 - 0x10c424fff +libjava.dylib (0) /var/folders//IntelliJ
IDEA.app/Contents/jbr/Contents/Home/lib/libjava.dylib
0x10c43a000 - 0x10c43cfff +libjimage.dylib (0) <32BBAD48-8E93-36F7-91EB-CA655358E61B> /var/folders//IntelliJ
IDEA.app/Contents/jbr/Contents/Home/lib/libjimage.dylib
0x10c448000 - 0x10c44efff +libinstrument.dylib (0) /var/folders//IntelliJ
IDEA.app/Contents/jbr/Contents/Home/lib/libinstrument.dylib
0x10c460000 - 0x10c464fff +libzip.dylib (0) <1612977E-7B76-3B4C-A588-7C550EE6276D> /var/folders//IntelliJ
IDEA.app/Contents/jbr/Contents/Home/lib/libzip.dylib
0x114671000 - 0x114677fff +libnio.dylib (0) <6EEB2F83-9F79-3DB6-81D1-71FA1AA15E69> /var/folders//IntelliJ
IDEA.app/Contents/jbr/Contents/Home/lib/libnio.dylib
0x114684000 - 0x114690fff +libnet.dylib (0) /var/folders//IntelliJ
IDEA.app/Contents/jbr/Contents/Home/lib/libnet.dylib
0x1147f0000 - 0x11480afff +libsunec.dylib (0) <9D5CB4FE-D40D-368F-87C6-302BCBFFA916> /var/folders/*/IntelliJ
IDEA.app/Contents/jbr/Contents/Home/lib/libsunec.dylib
0x115b15000 - 0x115bb0fff dyld (852.2) <0CC19410-FD43-39AE-A32A-50273F8303A4> /usr/lib/dyld
....
External Modification Summary: Calls made by other processes
targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0 Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0 Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary: ReadOnly portion of Libraries: Total=682.6M
resident=0K(0%) swapped_out_or_unallocated=682.6M(100%) Writable
regions: Total=838.7M written=0K(0%) resident=0K(0%)
swapped_out=0K(0%) unallocated=838.7M(100%)
I fixed it by downgrading Intellij version to 2020 version. I have also upgraded my MacOS version to latest that is 12.0.1
I have to get the details such as CPU, Memory(RAM), Battery, Startup time, App Size. Im able to get other things except App Size using Appium. Someone please help.
Thanks
Seems like Appium is not capable to perform this for you. However, you can check the memory usage in Android using adb:
$ adb shell dumpsys meminfo com.android.systemui
Which returns something like this:
Applications Memory Usage (in Kilobytes):
Uptime: 433213978 Realtime: 631179899
** MEMINFO in pid 1541 [com.android.systemui] **
Pss Private Private SwapPss Heap Heap Heap
Total Dirty Clean Dirty Size Alloc Free
------ ------ ------ ------ ------ ------ ------
Native Heap 106880 106780 0 73228 196200 182430 13769
Dalvik Heap 35655 35636 0 217 40741 20371 20370
Dalvik Other 3347 3344 0 112
Stack 56 56 0 16
Ashmem 4 0 0 0
Other dev 18 0 16 0
.so mmap 2998 164 352 499
.jar mmap 669 0 248 0
.apk mmap 17904 0 13620 0
.ttf mmap 372 0 180 0
.dex mmap 10041 16 10020 20
.oat mmap 3848 0 84 0
.art mmap 1641 1364 0 123
Other mmap 64 12 24 0
EGL mtrack 106434 106434 0 0
GL mtrack 55564 55564 0 0
Unknown 1952 1948 0 1565
TOTAL 423227 311318 24544 75780 236941 202801 34139
For iOS, my currently limited toolchain doesn't help much. You may have luck using Instruments, for which you can find here a command-line reference, but I haven't tried that: https://help.apple.com/instruments/mac/current/#/devb14ffaa5
2016-08-14 20:49:11.603 ACRCloudDemo_Swift[2332:76253] HER
INFO: cmd_ln.c(697): Parsing command line:
\
-hmm /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us \
-lm /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us.lm.dmp \
-dict /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/cmudict-en-us.dict
Current configuration:
[NAME] [DEFLT] [VALUE]
-agc none none
-agcthresh 2.0 2.000000e+00
-allphone
-allphone_ci no no
-alpha 0.97 9.700000e-01
-ascale 20.0 2.000000e+01
-aw 1 1
-backtrace no no
-beam 1e-48 1.000000e-48
-bestpath yes yes
-bestpathlw 9.5 9.500000e+00
-ceplen 13 13
-cmn current current
-cmninit 8.0 8.0
-compallsen no no
-debug 0
-dict /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/cmudict-en-us.dict
-dictcase no no
-dither no no
-doublebw no no
-ds 1 1
-fdict
-feat 1s_c_d_dd 1s_c_d_dd
-featparams
-fillprob 1e-8 1.000000e-08
-frate 100 100
-fsg
-fsgusealtpron yes yes
-fsgusefiller yes yes
-fwdflat yes yes
-fwdflatbeam 1e-64 1.000000e-64
-fwdflatefwid 4 4
-fwdflatlw 8.5 8.500000e+00
-fwdflatsfwin 25 25
-fwdflatwbeam 7e-29 7.000000e-29
-fwdtree yes yes
-hmm /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us
-input_endian little little
-jsgf
-keyphrase
-kws
-kws_plp 1e-1 1.000000e-01
-kws_threshold 1 1.000000e+00
-latsize 5000 5000
-lda
-ldadim 0 0
-lifter 0 0
-lm /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us.lm.dmp
-lmctl
-lmname
-logbase 1.0001 1.000100e+00
-logfn
-logspec no no
-lowerf 133.33334 1.333333e+02
-lpbeam 1e-40 1.000000e-40
-lponlybeam 7e-29 7.000000e-29
-lw 6.5 6.500000e+00
-maxhmmpf 30000 30000
-maxwpf -1 -1
-mdef
-mean
-mfclogdir
-min_endfr 0 0
-mixw
-mixwfloor 0.0000001 1.000000e-07
-mllr
-mmap yes yes
-ncep 13 13
-nfft 512 512
-nfilt 40 40
-nwpen 1.0 1.000000e+00
-pbeam 1e-48 1.000000e-48
-pip 1.0 1.000000e+00
-pl_beam 1e-10 1.000000e-10
-pl_pbeam 1e-10 1.000000e-10
-pl_pip 1.0 1.000000e+00
-pl_weight 3.0 3.000000e+00
-pl_window 5 5
-rawlogdir
-remove_dc no no
-remove_noise yes yes
-remove_silence yes yes
-round_filters yes yes
-samprate 16000 1.600000e+04
-seed -1 -1
-sendump
-senlogdir
-senmgau
-silprob 0.005 5.000000e-03
-smoothspec no no
-svspec
-tmat
-tmatfloor 0.0001 1.000000e-04
-topn 4 4
-topn_beam 0 0
-toprule
-transform legacy legacy
-unit_area yes yes
-upperf 6855.4976 6.855498e+03
-uw 1.0 1.000000e+00
-vad_postspeech 50 50
-vad_prespeech 10 10
-vad_threshold 2.0 2.000000e+00
-var
-varfloor 0.0001 1.000000e-04
-varnorm no no
-verbose no no
-warp_params
-warp_type inverse_linear inverse_linear
-wbeam 7e-29 7.000000e-29
-wip 0.65 6.500000e-01
-wlen 0.025625 2.562500e-02
INFO: cmd_ln.c(697): Parsing command line:
\
-lowerf 130 \
-upperf 6800 \
-nfilt 25 \
-transform dct \
-lifter 22 \
-feat 1s_c_d_dd \
-svspec 0-12/13-25/26-38 \
-agc none \
-cmn current \
-varnorm no \
-model ptm \
-cmninit 40,3,-1
Current configuration:
[NAME] [DEFLT] [VALUE]
-agc none none
-agcthresh 2.0 2.000000e+00
-alpha 0.97 9.700000e-01
-ceplen 13 13
-cmn current current
-cmninit 8.0 40,3,-1
-dither no no
-doublebw no no
-feat 1s_c_d_dd 1s_c_d_dd
-frate 100 100
-input_endian little little
-lda
-ldadim 0 0
-lifter 0 22
-logspec no no
-lowerf 133.33334 1.300000e+02
-ncep 13 13
-nfft 512 512
-nfilt 40 25
-remove_dc no no
-remove_noise yes yes
-remove_silence yes yes
-round_filters yes yes
-samprate 16000 1.600000e+04
-seed -1 -1
-smoothspec no no
-svspec 0-12/13-25/26-38
-transform legacy dct
-unit_area yes yes
-upperf 6855.4976 6.800000e+03
-vad_postspeech 50 50
-vad_prespeech 10 10
-vad_threshold 2.0 2.000000e+00
-varnorm no no
-verbose no no
-warp_params
-warp_type inverse_linear inverse_linear
-wlen 0.025625 2.562500e-02
INFO: acmod.c(252): Parsed model-specific feature parameters from /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/feat.params
INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='current', VARNORM='no', AGC='none'
INFO: cmn.c(143): mean[0]= 12.00, mean[1..12]= 0.0
INFO: acmod.c(171): Using subvector specification 0-12/13-25/26-38
INFO: mdef.c(518): Reading model definition: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/mdef
INFO: mdef.c(531): Found byte-order mark BMDF, assuming this is a binary mdef file
INFO: bin_mdef.c(336): Reading binary model definition: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/mdef
INFO: bin_mdef.c(516): 42 CI-phone, 137053 CD-phone, 3 emitstate/phone, 126 CI-sen, 5126 Sen, 29324 Sen-Seq
INFO: tmat.c(206): Reading HMM transition probability matrices: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/transition_matrices
INFO: acmod.c(124): Attempting to use PTM computation module
INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/means
INFO: ms_gauden.c(292): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(294): 128x13
INFO: ms_gauden.c(294): 128x13
INFO: ms_gauden.c(294): 128x13
INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/variances
INFO: ms_gauden.c(292): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(294): 128x13
INFO: ms_gauden.c(294): 128x13
INFO: ms_gauden.c(294): 128x13
INFO: ms_gauden.c(354): 222 variance values floored
INFO: ptm_mgau.c(476): Loading senones from dump file /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/sendump
INFO: ptm_mgau.c(500): BEGIN FILE FORMAT DESCRIPTION
INFO: ptm_mgau.c(563): Rows: 128, Columns: 5126
INFO: ptm_mgau.c(595): Using memory-mapped I/O for senones
INFO: ptm_mgau.c(835): Maximum top-N: 4
INFO: phone_loop_search.c(115): State beam -225 Phone exit beam -225 Insertion penalty 0
INFO: dict.c(320): Allocating 137526 * 32 bytes (4297 KiB) for word entries
INFO: dict.c(333): Reading main dictionary: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/cmudict-en-us.dict
INFO: dict.c(213): Allocated 1007 KiB for strings, 1662 KiB for phones
INFO: dict.c(336): 133425 words read
INFO: dict.c(342): Reading filler dictionary: /Users/Administrator/Library/Developer/CoreSimulator/Devices/8B673B41-2CE3-4E43-B848-3651BD36A0F9/data/Containers/Bundle/Application/CB5DFC36-5AA6-4C79-B1B7-90734EC00C58/ACRCloudDemo_Swift.app/en-us/en-us/noisedict
INFO: dict.c(213): Allocated 0 KiB for strings, 0 KiB for phones
INFO: dict.c(345): 5 words read
INFO: dict2pid.c(396): Building PID tables for dictionary
INFO: dict2pid.c(406): Allocating 42^3 * 2 bytes (144 KiB) for word-initial triphones
INFO: dict2pid.c(132): Allocated 42672 bytes (41 KiB) for word-final triphones
INFO: dict2pid.c(196): Allocated 42672 bytes (41 KiB) for single-phone word triphones
INFO: ngram_model_arpa.c(77): No \data\ mark in LM file
INFO: ngram_model_dmp.c(142): Will use memory-mapped I/O for LM file
INFO: ngram_model_dmp.c(196): ngrams 1=19794, 2=1377200, 3=3178194
INFO: ngram_model_dmp.c(242): 19794 = LM.unigrams(+trailer) read
INFO: ngram_model_dmp.c(288): 1377200 = LM.bigrams(+trailer) read
INFO: ngram_model_dmp.c(314): 3178194 = LM.trigrams read
INFO: ngram_model_dmp.c(339): 57155 = LM.prob2 entries read
INFO: ngram_model_dmp.c(359): 10935 = LM.bo_wt2 entries read
INFO: ngram_model_dmp.c(379): 34843 = LM.prob3 entries read
INFO: ngram_model_dmp.c(407): 2690 = LM.tseg_base entries read
INFO: ngram_model_dmp.c(463): 19794 = ascii word strings read
INFO: ngram_search_fwdtree.c(99): 788 unique initial diphones
INFO: ngram_search_fwdtree.c(148): 0 root, 0 non-root channels, 56 single-phone words
INFO: ngram_search_fwdtree.c(186): Creating search tree
INFO: ngram_search_fwdtree.c(192): before: 0 root, 0 non-root channels, 56 single-phone words
INFO: ngram_search_fwdtree.c(326): after: max nonroot chan increased to 44782
INFO: ngram_search_fwdtree.c(339): after: 573 root, 44654 non-root channels, 47 single-phone words
INFO: ngram_search_fwdflat.c(157): fwdflat: min_ef_width = 4, max_sf_win = 25
2016-08-14 20:49:12.787 ACRCloudDemo_Swift[2332:76253] 20:49:12.786 ERROR: AVAudioIONodeImpl.mm:784: SetOutputFormat: required condition is false: format.sampleRate == hwFormat.sampleRate
2016-08-14 20:49:12.802 ACRCloudDemo_Swift[2332:76253] *** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: format.sampleRate == hwFormat.sampleRate'
*** First throw call stack:
(
0 CoreFoundation 0x000000010d484d85 exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010f260deb objc_exception_throw + 48
2 CoreFoundation 0x000000010d484bea +[NSException raise:format:arguments:] + 106
3 libAVFAudio.dylib 0x00000001100bfff3 Z19AVAE_RaiseExceptionP8NSStringz + 176
4 libAVFAudio.dylib 0x0000000110101aef _ZN17AVAudioIONodeImpl15SetOutputFormatEmP13AVAudioFormat + 533
5 libAVFAudio.dylib 0x00000001100d2ead _ZN18AVAudioEngineGraph8_ConnectEP19AVAudioNodeImplBaseS1_jjP13AVAudioFormat + 2027
6 libAVFAudio.dylib 0x00000001100d5df0 _ZN18AVAudioEngineGraph7ConnectEP11AVAudioNodeS1_mmP13AVAudioFormat + 322
7 libAVFAudio.dylib 0x0000000110108a71 _ZN17AVAudioEngineImpl7ConnectEP11AVAudioNodeS1_mmP13AVAudioFormat + 301
8 libAVFAudio.dylib 0x0000000110108ad8 -[AVAudioEngine connect:to:format:] + 83
9 ACRCloudDemo_Swift 0x000000010c4b7737 _TFC18ACRCloudDemo_Swift7Decoder19startDecodingSpeechfFGSqVS_10Hypothesis_T_T + 1127
10 ACRCloudDemo_Swift 0x000000010c4aca45 TFC18ACRCloudDemo_Swift14ViewController11viewDidLoadfT_T + 2149
11 ACRCloudDemo_Swift 0x000000010c4ad892 TToFC18ACRCloudDemo_Swift14ViewController11viewDidLoadfT_T + 34
12 UIKit 0x000000010de47984 -[UIViewController loadViewIfRequired] + 1198
13 UIKit 0x000000010de47cd3 -[UIViewController view] + 27
14 UIKit 0x000000010dd1dfb4 -[UIWindow addRootViewControllerViewIfPossible] + 61
15 UIKit 0x000000010dd1e69d -[UIWindow _setHidden:forced:] + 282
16 UIKit 0x000000010dd30180 -[UIWindow makeKeyAndVisible] + 42
17 UIKit 0x000000010dca4ed9 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
18 UIKit 0x000000010dcab568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
19 UIKit 0x000000010dca8714 -[UIApplication workspaceDidEndTransaction:] + 188
20 FrontBoardServices 0x000000011216e8c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24
21 FrontBoardServices 0x000000011216e741 -[FBSSerialQueue performNext] + 178
22 FrontBoardServices 0x000000011216eaca -[FBSSerialQueue performNextFromRunLoopSource] + 45
23 CoreFoundation 0x000000010d3aa301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
24 CoreFoundation 0x000000010d3a022c __CFRunLoopDoSources0 + 556
25 CoreFoundation 0x000000010d39f6e3 __CFRunLoopRun + 867
26 CoreFoundation 0x000000010d39f0f8 CFRunLoopRunSpecific + 488
27 UIKit 0x000000010dca7f21 -[UIApplication _run] + 402
28 UIKit 0x000000010dcacf09 UIApplicationMain + 171
29 ACRCloudDemo_Swift 0x000000010c4ba742 main + 114
30 libdyld.dylib 0x000000010fd5492d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
So, this is my output and a crash.... upon my app starting I call startDecoding speech...
how can I get specific outputs in an organized way ???? help
It seems fixing this is simple, I'm working on it on my own and if someone can help that'd be great.
I am using Qt and MS-Sql Server on Windows7 OS.
What I have is an MS-SQL database that I use to store data/info coming from equipment that is mounted in some vehicles.
There is a table in the database named TransactionFilesInfo - a table used to store information about transaction files from the equipment, when they connect to the TCP-server.
We are using this table as we are requested to avoid duplicate files. It happens (sometimes) when the remote equipment does NOT delete the transaction files after they are sent to the server. Hence, I use the info from the table to check [size and CRC] to avoid downloading duplicates.
Some sample data for TransactionFilesInfo table looks like this:
[TransactionFilesInfo]:
DeviceID FileNo FileSequence FileSize FileCRC RecordTimeStamp
10203 2 33 230 55384 2015-11-26 14:54:15
10203 7 33 624 55391 2015-11-26 14:54:15
10203 2 34 146 21505 2015-11-26 14:54:16
10203 7 34 312 35269 2015-11-26 14:54:16
10203 2 35 206 23022 2015-11-26 15:33:22
10203 7 35 208 11091 2015-11-26 15:33:22
10203 2 36 134 34918 2015-11-26 15:55:44
10203 7 36 104 63865 2015-11-26 15:55:44
10203 2 37 140 35466 2015-11-26 16:20:38
10203 7 37 208 62907 2015-11-26 16:20:38
10203 2 38 134 17706 2015-11-26 16:38:33
10203 7 38 104 42358 2015-11-26 16:38:33
11511 2 21 194 29913 2015-12-02 16:22:59
11511 7 21 114 30038 2015-12-02 16:22:59
On the other hand, every time a device connects to the server, it first sends a list of file information. The Qt application takes care of that.
The list contains elements like this:
struct FileInfo
{
unsigned short FileNumber;
unsigned short FileSequence;
unsigned short FileCRC;
unsigned long FileSize;
};
So, as an example (inspired by the table above) the connected device (DeviceID=10203) may say that it has the following files:
QList<FileInfo> filesList;
// here is the log4qt output...
filesList[0] --> FileNo=2 FileSeq=33 FileSize=230 and FileCRC=55384
filesList[1] --> FileNo=2 FileSeq=34 FileSize=146 and FileCRC=21505
filesList[2] --> FileNo=7 FileSeq=33 FileSize=624 and FileCRC=55391
filesList[3] --> FileNo=7 FileSeq=34 FileSize=312 and FileCRC=35269 ...
Well, what I need is a method to remove/delete, for a given DeviceID, all the records in the TransactionFilesInfo table, records that are NOT in the list sent by the remote device. Hence, I will be able to decrease the burden (size) on the database table.
Remark: For the moment I just delete (#midnight) all the records that are older than let's say 10 days, based on RecordTimeStamp field. So, the size of the table doesn't increase over an alarming level :)
Finally, to clarify it a little bit: I would mainly need help with SQL. Yet, I would not refuse any idea on how to do some related things/tricks on the Qt side ;)
The SQL to delete those records might look something like this:
DELETE FROM [SAMPLE DATA]
WHERE DeviceID = 10203
and 'File' + CONVERT(varchar(11),FileNo) + '_' +
RIGHT('000' + CONVERT(varchar(11),FileSequence),3)
NOT IN ('File2_033','File2_034','File7_033','File7_034',...)
If you wanted to delete all of them for a device, you could drop the code that looks at the FileNo and FileSequence so it is simply:
DELETE FROM [SAMPLE DATA]
WHERE DeviceID = 10203
I got a crash report with this stack trace:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 1
Thread 0:
0 libSystem.B.dylib 0x30d2ac98 fsync + 8
1 libsqlite3.dylib 0x3617b52a _sqlite3_purgeEligiblePagerCacheMemory + 1626
2 libsqlite3.dylib 0x3617b54e _sqlite3_purgeEligiblePagerCacheMemory + 1662
3 libsqlite3.dylib 0x36172824 sqlite3_db_status + 1072
4 libsqlite3.dylib 0x3619c5dc sqlite3_create_function16 + 38176
5 libsqlite3.dylib 0x3619c63c sqlite3_create_function16 + 38272
6 libsqlite3.dylib 0x3619cc50 sqlite3_create_function16 + 39828
7 libsqlite3.dylib 0x361b0d96 fts3DbExec + 21826
8 libsqlite3.dylib 0x36171de4 sqlite3_step + 56
9 DesignScene 0x0000d750 -[FMDatabase executeUpdate:withArgumentsInArray:orVAList:] (FMDatabase.m:488)
Shame to get an fsync exception, but shit happens, right? My question is, how best should I handle this exception? Wrap it in a #try/#catch block?
Update: The crash was in thread 1. Here's the complete trace from Thread 1:
Thread 1 Crashed:
0 libSystem.B.dylib 0x30d30974 kevent + 24
1 libSystem.B.dylib 0x30dda704 _dispatch_mgr_invoke + 88
2 libSystem.B.dylib 0x30dda174 _dispatch_queue_invoke + 96
3 libSystem.B.dylib 0x30dd9b98 _dispatch_worker_thread2 + 120
4 libSystem.B.dylib 0x30d7e24a _pthread_wqthread + 258
5 libSystem.B.dylib 0x30d76970 start_wqthread + 0
All I can say is, WTF? Could there have been some sort of weird system issue here? ’Cause I don't see any of my own code in that trace.
I think this was a system-level exception from iOS. Not much to be done about it. Freakish stuff happens, right?