I'm training some faster rcnn models with only one class on
my own data set. The training goes fine but when I export
model for inference and try to used it on android sample app
(TF Detect), I'm getting the following exception:
11-28 10:56:27.002 15666 16593 E AndroidRuntime: FATAL EXCEPTION: inference
11-28 10:56:27.002 15666 16593 E AndroidRuntime: Process: org.tensorflow.demo, PID: 15666
11-28 10:56:27.002 15666 16593 E AndroidRuntime: java.nio.BufferOverflowException
11-28 10:56:27.002 15666 16593 E AndroidRuntime: at java.nio.HeapFloatBuffer.put(HeapFloatBuffer.java:179)
11-28 10:56:27.002 15666 16593 E AndroidRuntime: at org.tensorflow.Tensor.writeTo(Tensor.java:488)
11-28 10:56:27.002 15666 16593 E AndroidRuntime: at org.tensorflow.contrib.android.TensorFlowInferenceInterface.fetch(TensorFlowInferenceInterface.java:478)
11-28 10:56:27.002 15666 16593 E AndroidRuntime: at org.tensorflow.contrib.android.TensorFlowInferenceInterface.fetch(TensorFlowInferenceInterface.java:432)
11-28 10:56:27.002 15666 16593 E AndroidRuntime: at org.tensorflow.demo.TensorFlowObjectDetectionAPIModel.recognizeImage(TensorFlowObjectDetectionAPIModel.java:167)
at the following line of code from TensorFlowObjectDetectionAPIModel class:
inferenceInterface.fetch(outputNames[0], outputLocations);
I tried these two models:
faster_rcnn_resnet101_pets
faster_rcnn_inception_v2_pets
Do you have any idea about what is causing this exception?
Regards,
I am using FasterRcnn, I've solved same issue by changing value of MAX_RESULTS from 100 to 500 in TensorFlowObjectDetectionAPIModel.java (TensorFlow android example app)
Problem is RCNN returns more output than SSD
Sorry, this is my first answer
Related
I'm creating a React Native chat / messenger app. In order to get the intent the app was launched with (say with a share intent), I am overriding the createReactActivityDelegate method in MainActivity.java
However, this is causing the app to crash repeatably with the following exceptions:
03-30 10:30:50.165 6977 7026 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
03-30 10:30:50.165 6977 7026 E AndroidRuntime: Process: com.heloprotocol.helo.app.rn.notificationtester, PID: 6977
03-30 10:30:50.165 6977 7026 E AndroidRuntime: java.lang.IllegalArgumentException: Could not convert class
03-30 10:30:50.165 6977 7026 E AndroidRuntime: at com.facebook.react.bridge.Arguments.fromBundle(Unknown Source:152)
03-30 10:30:50.165 6977 7026 E AndroidRuntime: at d.f.n.M.c(Unknown Source:40)
03-30 10:30:50.165 6977 7026 E AndroidRuntime: at d.f.n.M.b(Unknown Source:87)
03-30 10:30:50.165 6977 7026 E AndroidRuntime: at d.f.n.M.a(Unknown Source:0)
03-30 10:30:50.165 6977 7026 E AndroidRuntime: at d.f.n.G.run(Unknown Source:6)
03-30 10:30:50.165 6977 7026 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:794)
03-30 10:30:50.165 6977 7026 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
03-30 10:30:50.165 6977 7026 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(Unknown Source:0)
03-30 10:30:50.165 6977 7026 E AndroidRuntime: at android.os.Looper.loop(Looper.java:176)
03-30 10:30:50.165 6977 7026 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(Unknown Source:37)
03-30 10:30:50.165 6977 7026 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)
AND
03-31 12:58:53.844 29352 29396 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
03-31 12:58:53.844 29352 29396 E AndroidRuntime: Process: com.heloprotocol.helo.chat.app.rn.notificationtester, PID: 29352
03-31 12:58:53.844 29352 29396 E AndroidRuntime: java.lang.IllegalArgumentException: Could not convert class android.os.BinderProxy
03-31 12:58:53.844 29352 29396 E AndroidRuntime: at com.facebook.react.bridge.Arguments.fromBundle(Unknown Source:152)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: at d.f.n.M.c(Unknown Source:40)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: at d.f.n.M.b(Unknown Source:87)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: at d.f.n.M.a(Unknown Source:0)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: at d.f.n.G.run(Unknown Source:6)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(Unknown Source:0)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(Unknown Source:37)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)
I can see the following exception in debug mode:
2020-03-16 17:26:05.214 31063-31063/com.heloprotocol.helo.app.rn.notificationtester E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.heloprotocol.helo.app.rn.notificationtester, PID: 31063
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.heloprotocol.helo.app.rn.notificationtester/com.heloprotocol.helo.app.rn.notificationtester.MainActivity}: java.lang.IllegalArgumentException: Could not convert class android.net.Uri$HierarchicalUri
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3047)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3182)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1916)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6898)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.IllegalArgumentException: Could not convert class android.net.Uri$HierarchicalUri
at com.facebook.react.bridge.Arguments.fromBundle(Arguments.java:302)
at com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1063)
at com.facebook.react.ReactInstanceManager.attachRootView(ReactInstanceManager.java:748)
at com.facebook.react.ReactRootView.attachToReactInstanceManager(ReactRootView.java:568)
at com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:399)
at com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:363)
at com.facebook.react.ReactDelegate.loadApp(ReactDelegate.java:102)
at com.facebook.react.ReactActivityDelegate.loadApp(ReactActivityDelegate.java:88)
at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:83)
at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:44)
at com.heloprotocol.helo.app.rn.notificationtester.MainActivity.onCreate(MainActivity.java:38)
at android.app.Activity.performCreate(Activity.java:7149)
at android.app.Activity.performCreate(Activity.java:7140)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1288)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3027)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3182)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1916)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6898)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
2020-03-16 17:26:05.249 31063-31458/com.heloprotocol.helo.app.rn.notificationtester D/OSTracker: OS Event: crash
2020-03-16 17:26:05.258 31063-31063/com.heloprotocol.helo.app.rn.notificationtester I/Process: Sending signal. PID: 31063 SIG: 9
How to fix this error ?
My app builds successfully, opens on the emulator, then immediately shuts down. I spent almost 24 hours straight studying what could be wrong and going over all the answers and none of them work for me. Here is the final details...
BUILD SUCCESSFUL in 21s
262 actionable tasks: 1 executed, 261 up-to-date
info Running adb -s emulator-5554 reverse tcp:8081 tcp:8081
info Starting the app on emulator-5554 (adb -s emulator-5554 shell am start -n com.myapp/com.myapp.MainActivity)...
Starting: Intent { cmp=com.myapp/.MainActivity }
Would greatly appreciate someone figuring this out with me!
Here is the logcat...
10-17 13:27:27.409 3405 3492 I MicroDetector: Keeping mic open: false
10-17 13:27:27.409 3405 3492 I MicroDetectionWorker: #onError(false)
10-17 13:27:27.498 1756 2440 E GnssHAL_GnssInterface: gnssSvStatusCb: a: input svInfo.flags is 8
10-17 13:27:27.498 1756 2440 E GnssHAL_GnssInterface: gnssSvStatusCb: b: input svInfo.flags is 8
10-17 13:27:28.501 1756 2440 E GnssHAL_GnssInterface: gnssSvStatusCb: a: input svInfo.flags is 8
10-17 13:27:28.501 1756 2440 E GnssHAL_GnssInterface: gnssSvStatusCb: b: input svInfo.flags is 8
10-17 13:27:28.519 2021 2368 W AppOps : Noting op not finished: uid 10101 pkg com.google.android.gms code 41 time=1571344043502 duration=0
10-17 13:27:29.506 1756 2440 E GnssHAL_GnssInterface: gnssSvStatusCb: a: input svInfo.flags is 8
10-17 13:27:29.506 1756 2440 E GnssHAL_GnssInterface: gnssSvStatusCb: b: input svInfo.flags is 8
10-17 13:27:30.511 1756 2440 E GnssHAL_GnssInterface: gnssSvStatusCb: a: input svInfo.flags is 8
10-17 13:27:30.511 1756 2440 E GnssHAL_GnssInterface: gnssSvStatusCb: b: input svInfo.flags is 8
10-17 13:27:31.515 1756 2440 E GnssHAL_GnssInterface: gnssSvStatusCb: a: input svInfo.flags is 8
10-17 13:27:31.515 1756 2440 E GnssHAL_GnssInterface: gnssSvStatusCb: b: input svInfo.flags is 8
10-17 13:27:32.413 3405 3492 I MicroDetectionWorker: #startMicroDetector [speakerMode: 0]
10-17 13:27:32.414 3405 3492 W ErrorReporter: reportError [type: 211, code: 393244, bug: 0]: errorCode: 393244, engine: 0
try turning debugger off and on again
try building the code in xcode/android studio, inspect errors if any
usually it's a debugger issue for me. good luck!
Okay - I found the problem and have finally got this up and running. Way, way, way high up in the logcat was a message from Google Admob saying that I needed to add the appId in the meta tag of the AndroidManifest file. This was very hard to find because the logcat keeps running constantly and even if you look deep in the log it disappears quickly.
To figure this out I started adb logcat in a new shell (terminal window), gave it a second to fill up, then cleared it using CMD K, then in another shell ran react-native run-android.
When it fully built I immediately pressed Cmd C in the logcat window to stop it from running. Then I scrolled all the way to the top and found the error message from Google AdMob with instructions to add the following code to the AndroidManifest.xml file within the <application></application> section...
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
It also stated that without this the app would crash. So I added my id and now have a running app in the emulator.
My react-native developing environment is on Windows 7; worked fine until yesterday, but suddenly the APK reports an error after it loads the bundle.
The error Message:
Unknown
run
NativeRunnable.java
handleCallback
Handler.java:873
dispatchMessage
Handler.java:99
dispatchMessage
MessageQueueThreadHandler.java:29
loop
Looper.java:193
run
MessageQueueThreadImpl.java:232
run
Thread.java:764
I did google for the error, but no luck. I tried clearing the cache using npm start -- --reset-cache, but the error remains.
I found and tried similar posts but their solutions did not work either.
Error Logcat:
06-16 14:30:16.144 5885 6735 E unknown:ReactNative: Exception in native call
06-16 14:30:16.144 5885 6735 E unknown:ReactNative: com.facebook.jni.UnknownCppException: Unknown
06-16 14:30:16.144 5885 6735 E unknown:ReactNative: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
06-16 14:30:16.144 5885 6735 E unknown:ReactNative: at android.os.Handler.handleCallback(Handler.java:873)
06-16 14:30:16.144 5885 6735 E unknown:ReactNative: at android.os.Handler.dispatchMessage(Handler.java:99)
06-16 14:30:16.144 5885 6735 E unknown:ReactNative: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
06-16 14:30:16.144 5885 6735 E unknown:ReactNative: at android.os.Looper.loop(Looper.java:193)
06-16 14:30:16.144 5885 6735 E unknown:ReactNative: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232)
06-16 14:30:16.144 5885 6735 E unknown:ReactNative: at java.lang.Thread.run(Thread.java:764)
06-16 14:30:16.152 5885 6735 E ReactNativeJNI: Attempting to call JS function on a bad application bundle: RCTDeviceEventEmitter.emit()
06-16 14:30:16.155 5885 6735 E unknown:ReactNative: Exception in native call
06-16 14:30:16.155 5885 6735 E unknown:ReactNative: java.lang.RuntimeException: Attempting to call JS function on a bad application bundle: RCTDeviceEventEmitter.emit()
06-16 14:30:16.155 5885 6735 E unknown:ReactNative: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
06-16 14:30:16.155 5885 6735 E unknown:ReactNative: at android.os.Handler.handleCallback(Handler.java:873)
06-16 14:30:16.155 5885 6735 E unknown:ReactNative: at android.os.Handler.dispatchMessage(Handler.java:99)
06-16 14:30:16.155 5885 6735 E unknown:ReactNative: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
06-16 14:30:16.155 5885 6735 E unknown:ReactNative: at android.os.Looper.loop(Looper.java:193)
06-16 14:30:16.155 5885 6735 E unknown:ReactNative: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232)
06-16 14:30:16.155 5885 6735 E unknown:ReactNative: at java.lang.Thread.run(Thread.java:764)
06-16 14:30:16.155 5885 6735 E ReactNativeJNI: Attempting to call JS function on a bad application bundle: AppRegistry.runApplication()
06-16 14:30:16.156 5885 6735 E unknown:ReactNative: Exception in native call
06-16 14:30:16.156 5885 6735 E unknown:ReactNative: java.lang.RuntimeException: Attempting to call JS function on a bad application bundle: AppRegistry.runApplication()
06-16 14:30:16.156 5885 6735 E unknown:ReactNative: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
06-16 14:30:16.156 5885 6735 E unknown:ReactNative: at android.os.Handler.handleCallback(Handler.java:873)
06-16 14:30:16.156 5885 6735 E unknown:ReactNative: at android.os.Handler.dispatchMessage(Handler.java:99)
06-16 14:30:16.156 5885 6735 E unknown:ReactNative: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
06-16 14:30:16.156 5885 6735 E unknown:ReactNative: at android.os.Looper.loop(Looper.java:193)
06-16 14:30:16.156 5885 6735 E unknown:ReactNative: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232)
06-16 14:30:16.156 5885 6735 E unknown:ReactNative: at java.lang.Thread.run(Thread.java:764)
06-16 14:30:16.165 5885 5885 D ReactNative: CatalystInstanceImpl.destroy() start
06-16 14:30:16.181 1571 1571 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 3936256
06-16 14:30:16.187 1571 1571 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 3936256
06-16 14:30:16.189 5885 6734 D ReactNative: CatalystInstanceImpl.destroy() end
06-16 14:30:16.193 1571 1571 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 3936256
06-16 14:30:16.224 5885 5885 D ReactNative: CatalystInstanceImpl.destroy() start
06-16 14:30:16.224 5885 5885 D ReactNative: CatalystInstanceImpl.destroy() start
06-16 14:30:16.233 5885 5885 W unknown:ReactNative: Tried to enqueue runnable on already finished thread: 'js... dropping Runnable.
06-16 14:30:16.233 5885 5885 W MessageQueue: Handler (com.facebook.react.bridge.queue.MessageQueueThreadHandler) {ef3c15} sending message to a Handler on a dead thread
06-16 14:30:16.233 5885 5885 W MessageQueue: java.lang.IllegalStateException: Handler (com.facebook.react.bridge.queue.MessageQueueThreadHandler) {ef3c15} sending message to a Handler on a dead thread
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.os.MessageQueue.enqueueMessage(MessageQueue.java:546)
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.os.Handler.enqueueMessage(Handler.java:745)
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.os.Handler.sendMessageAtTime(Handler.java:697)
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.os.Handler.sendMessageDelayed(Handler.java:667)
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.os.Handler.post(Handler.java:395)
06-16 14:30:16.233 5885 5885 W MessageQueue: at com.facebook.react.bridge.queue.MessageQueueThreadImpl.runOnQueue(MessageQueueThreadImpl.java:70)
06-16 14:30:16.233 5885 5885 W MessageQueue: at com.facebook.react.bridge.ReactContext.runOnJSQueueThread(ReactContext.java:306)
06-16 14:30:16.233 5885 5885 W MessageQueue: at com.facebook.react.uimanager.events.EventDispatcher$ScheduleDispatchFrameCallback.doFrame(EventDispatcher.java:302)
06-16 14:30:16.233 5885 5885 W MessageQueue: at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:166)
06-16 14:30:16.233 5885 5885 W MessageQueue: at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84)
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947)
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.view.Choreographer.doCallbacks(Choreographer.java:761)
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.view.Choreographer.doFrame(Choreographer.java:693)
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.os.Handler.handleCallback(Handler.java:873)
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.os.Handler.dispatchMessage(Handler.java:99)
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.os.Looper.loop(Looper.java:193)
06-16 14:30:16.233 5885 5885 W MessageQueue: at android.app.ActivityThread.main(ActivityThread.java:6669)
06-16 14:30:16.233 5885 5885 W MessageQueue: at java.lang.reflect.Method.invoke(Native Method)
06-16 14:30:16.233 5885 5885 W MessageQueue: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
06-16 14:30:16.233 5885 5885 W MessageQueue: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
06-16 14:30:16.251 2042 2042 I GoogleInputMethod: onFinishInput() : Dummy InputConnection bound
06-16 14:30:16.252 2042 2042 I GoogleInputMethod: onStartInput() : Dummy InputConnection bound
06-16 14:30:16.255 5885 5902 D EGL_emulation: eglMakeCurrent: 0xe5dc78a0: ver 2 0 (tinfo 0xe7055d70)
Edit: I have excluded from above log the parts that were the same as when the error was fixed.
After debugging; disabling the #babel/plugin-transform-arrow-functions plugin (version 7.2.0) and then clearing the cache (as suggested in another answer) fixed it for me:
Steps:
Disable the #babel/plugin-transform-arrow-functions plugin, for example, I did just comment it out inside the babel.config.js file, like below:
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
['#babel/plugin-proposal-decorators', { decoratorsBeforeExport: false }],
// Below plugin is unable to handle some of our arrow-functions,
// which results in "Unknown" error after the app is launched.
// ```
// ['#babel/plugin-transform-arrow-functions', { spec: true }]
// ```
]
};
When the Packager is already running, close and/or terminate it using process-manager
For react-native init approach (without expo), run:
npm start -- --reset-cache
(those who are using expo-cli should instead of above run expo start -c)
Above mentioned command is for me equal to removing the %temp%/metro-cache directory.
But still, cannot hurt to delete the ~/.babel.json file (on Windows %userProfile%/.babel.json file) as suggested here, I mean, I have tested and the above-mentioned command did not remove and/or change the .babel.json file.
Logcat after fixed:
06-16 14:55:48.670 5885 6650 D ReactNative: CatalystInstanceImpl.destroy() end
06-16 14:55:49.374 5885 6652 W ReactNativeJS: Require cycle: node_modules\react-native-reanimated\src\utils.js -> node_modules\react-native-reanimated\src\core\AnimatedBlock.js -> node_modules\react-native-reanimated\src\utils.js
06-16 14:55:49.374 5885 6652 W ReactNativeJS:
06-16 14:55:49.374 5885 6652 W ReactNativeJS: Require cycles are allowed, butcan result in uninitialized values. Consider refactoring to remove the need fora cycle.
06-16 14:55:49.374 5885 6652 W ReactNativeJS: Require cycle: node_modules\react-native-reanimated\src\base.js -> node_modules\react-native-reanimated\src\core\AnimatedCond.js -> node_modules\react-native-reanimated\src\utils.js -> node_modules\react-native-reanimated\src\core\AnimatedValue.js -> node_modules\react-native-reanimated\src\base.js
06-16 14:55:49.374 5885 6652 W ReactNativeJS:
06-16 14:55:49.374 5885 6652 W ReactNativeJS: Require cycles are allowed, butcan result in uninitialized values. Consider refactoring to remove the need fora cycle.
06-16 14:55:49.374 5885 6652 W ReactNativeJS: Require cycle: node_modules\react-native-reanimated\src\utils.js -> node_modules\react-native-reanimated\src\core\AnimatedValue.js -> node_modules\react-native-reanimated\src\utils.js
06-16 14:55:49.374 5885 6652 W ReactNativeJS:
06-16 14:55:49.374 5885 6652 W ReactNativeJS: Require cycles are allowed, butcan result in uninitialized values. Consider refactoring to remove the need fora cycle.
06-16 14:55:49.375 5885 6652 W ReactNativeJS: Require cycle: node_modules\react-native-reanimated\src\core\AnimatedValue.js -> node_modules\react-native-reanimated\src\derived\evaluateOnce.js -> node_modules\react-native-reanimated\src\core\AnimatedValue.js
06-16 14:55:49.375 5885 6652 W ReactNativeJS:
06-16 14:55:49.375 5885 6652 W ReactNativeJS: Require cycles are allowed, butcan result in uninitialized values. Consider refactoring to remove the need fora cycle.
06-16 14:55:49.375 5885 6652 W ReactNativeJS: Require cycle: node_modules\react-native-reanimated\src\base.js -> node_modules\react-native-reanimated\src\core\AnimatedCond.js -> node_modules\react-native-reanimated\src\utils.js -> node_modules\react-native-reanimated\src\core\AnimatedValue.js -> node_modules\react-native-reanimated\src\derived\evaluateOnce.js -> node_modules\react-native-reanimated\src\base.js
06-16 14:55:49.375 5885 6652 W ReactNativeJS:
06-16 14:55:49.375 5885 6652 W ReactNativeJS: Require cycles are allowed, butcan result in uninitialized values. Consider refactoring to remove the need fora cycle.
06-16 14:55:49.375 5885 6652 W ReactNativeJS: Require cycle: node_modules\react-native-reanimated\src\base.js -> node_modules\react-native-reanimated\src\core\AnimatedCond.js -> node_modules\react-native-reanimated\src\utils.js -> node_modules\react-native-reanimated\src\core\AnimatedValue.js -> node_modules\react-native-reanimated\src\derived\interpolate.js -> node_modules\react-native-reanimated\src\base.js
06-16 14:55:49.375 5885 6652 W ReactNativeJS:
06-16 14:55:49.375 5885 6652 W ReactNativeJS: Require cycles are allowed, butcan result in uninitialized values. Consider refactoring to remove the need fora cycle.
06-16 14:55:49.478 5885 6652 I ReactNativeJS: Running application "StormHoundsApp" with appParams: {"rootTag":201}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
06-16 14:55:49.749 5885 5885 I ReactNative: [GESTURE HANDLER] Initialize gesture handler for root view com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView{32e1596 V.E...... ......ID 0,0-768,1136 #c9}
06-16 14:55:51.469 1831 1854 W audio_hw_generic: Not supplying enough data toHAL, expected position 5387280 , only wrote 5234400
06-16 14:55:52.561 1912 2108 I GnssLocationProvider: WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo#b89f9d4)
06-16 14:55:52.562 1912 1926 I GnssLocationProvider: WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo#b89f9d4)
06-16 14:55:52.566 2537 2951 W ctxmgr : [AclManager]No 2 for (accnt=account#-517948760#, com.google.android.gms(10015):IndoorOutdoorProducer, vrsn=13280000,0, 3pPkg = null , 3pMdlId = null , pid = 2537). Was: 3 for 57, account#-517948760#
To have a cleaner log, I have excluded from above the parts that were the same as when the error was present.
In my case I stoped metro, cleaned the watchman list:
watchman watch-del-all
and started it again, with the --reset-cache parameter:
react-native start --reset-cache
After deploying the app once more, the error was gone. I didn't need to do anything else.
I think some java files got corrupted (perhaps a racing condition, between updatas?) and nothing else seemed to trigger the recreation of those files again.
I have 2 GPUs installed and when i train a model i get the following message. What means "Peer access not supported between device ordinals 0 and 1" and "Peer access not supported between device ordinals 1 and 0"? Is it an error is it something i have to fix? I mean, the model itself trains successfully in the end. I think it uses only one of the GPUs, not both. But i want to understand this message and fix the problem. Is there something i need to do?
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library cublas64_80.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library cudnn64_5.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library cufft64_80.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library nvcuda.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library curand64_80.dll locally
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "BestSplits" device_type: "CPU"') for unknown op: BestSplits
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "CountExtremelyRandomStats" device_type: "CPU"') for unknown op: CountExtremelyRandomStats
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "FinishedNodes" device_type: "CPU"') for unknown op: FinishedNodes
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "GrowTree" device_type: "CPU"') for unknown op: GrowTree
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "ReinterpretStringToFloat" device_type: "CPU"') for unknown op: ReinterpretStringToFloat
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "SampleInputs" device_type: "CPU"') for unknown op: SampleInputs
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "ScatterAddNdim" device_type: "CPU"') for unknown op: ScatterAddNdim
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TopNInsert" device_type: "CPU"') for unknown op: TopNInsert
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TopNRemove" device_type: "CPU"') for unknown op: TopNRemove
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TreePredictions" device_type: "CPU"') for unknown op: TreePredictions
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "UpdateFertileSlots" device_type: "CPU"') for unknown op: UpdateFertileSlots
Using TensorFlow backend.
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:885] Found device 0 with properties:
name: GeForce GTX 970
major: 5 minor: 2 memoryClockRate (GHz) 1.253
pciBusID 0000:01:00.0
Total memory: 4.00GiB
Free memory: 3.31GiB
W c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_driver.cc:590] creating context when one is currently active; existing: 0000022BB5DD0500
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:885] Found device 1 with properties:
name: GeForce GTX 970
major: 5 minor: 2 memoryClockRate (GHz) 1.253
pciBusID 0000:02:00.0
Total memory: 4.00GiB
Free memory: 3.31GiB
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:777] Peer access not supported between device ordinals 0 and 1
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:777] Peer access not supported between device ordinals 1 and 0
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:906] DMA: 0 1
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:916] 0: Y N
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:916] 1: N Y
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 970, pci bus id: 0000:01:00.0)
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:975] Creating TensorFlow device (/gpu:1) -> (device: 1, name: GeForce GTX 970, pci bus id: 0000:02:00.0)
This just means that the gpus cannot communicate (pass information between gpu0 to gpu1 or vice versa) without passing the data back to cpu first.
i have written an Titanium iOS Module for streaming audio.
On iPhone 5s and above the app and the module is running great.
The problem is every time the stopStream function is called in my app on an iPhone 5 or lower the app crashes.
I think there is a memory leak or something but i doesnt find the solution for that problem.
Here is my module code:
//THIS FUNCTION THET STARTS THE STREAM. THERE IS NO PROBLEM ON THE IPHONE 5
-(id)startStream:(id)args
{
ENSURE_SINGLE_ARG(args,NSString);
NSURL *url = [NSURL URLWithString:args];
playerItem = [AVPlayerItem playerItemWithURL:url];
[playerItem addObserver:self forKeyPath:#"timedMetadata" options:NSKeyValueObservingOptionNew context:nil];
player = [[AVPlayer playerWithPlayerItem:playerItem] retain];
[player addObserver:self forKeyPath:#"status" options:0 context:nil];
[player play];
[self fireEvent:#"START" withObject:nil];
NSLog(#"[INFO] player item error : %#", playerItem.error.description);
NSLog(#"[INFO] player error : %#", player.error.description);
return args;
}
//THIS IS THE FUNCTION WHERE MY APP CRASH ON IPHONE 5
-(id)stopStream:(id)args
{
NSLog(#"[INFO]AVPlayer STOP");
[player pause];
[playerItem removeObserver:self forKeyPath:#"timedMetadata" context:nil];
[player removeObserver:self forKeyPath:#"status" context:nil];
player=nil;
}
Here an part of the device log.
296 00:43:40 W TestApp[3487] <Warning>: [INFO]AVPlayer STOP
297 00:43:40 E ReportCrash[3490] <Error>: task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument)
301 00:43:40 W mediaserverd[37] <Warning>: 00:43:40.969 [0x3257000] CMSession retain count > 1!
306 00:43:41 W SpringBoard[43] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.
307 00:43:41 W SpringBoard[43] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.
308 00:43:41 W SpringBoard[43] <Warning>: Unable to get short BSD proc info for 3483: No such process
309 00:43:41 W SpringBoard[43] <Warning>: Unable to get short BSD proc info for 3487: No such process
310 00:43:41 W SpringBoard[43] <Warning>: Unable to get short BSD proc info for 3487: No such process
311 00:43:41 W SpringBoard[43] <Warning>: Unable to get short BSD proc info for 3487: No such process
312 00:43:41 E ReportCrash[3490] <Error>: Not saving crash log because we have reached the limit for logs to store on disk. Sync or otherwise clear logs from /var/mobile/Library/Logs/CrashReporter to save new logs.
313 00:43:41 E ReportCrash[3490] <Error>: Could not save crash report to disk!
314 00:43:41 W SpringBoard[43] <Warning>: Application 'UIKitApplication:com.fpmsoft.isa.TestApp[0x476c]' crashed.
315 00:43:41 W assertiond[58] <Warning>: pid_suspend failed for <BKNewProcess: 0x14d90e90; com.fpmsoft.isa.TestApp; pid: 3487; hostpid: -1>: Unknown error: -1, Unknown error: -1
316 00:43:41 W assertiond[58] <Warning>: Could not set priority of <BKNewProcess: 0x14d90e90; com.fpmsoft.isa.TestApp; pid: 3487; hostpid: -1> to 2, priority: No such process
317 00:43:41 W assertiond[58] <Warning>: Could not set priority of <BKNewProcess: 0x14d90e90; com.fpmsoft.isa.TestApp; pid: 3487; hostpid: -1> to 4096, priority: No such process
318 00:43:41 W UserEventAgent[17] <Warning>: id=com.fpmsoft.isa.TestApp pid=3487, state=0
319 00:43:41 E ReportCrash[3490] <Error>: Incident Identifier: 5CF594F7-3628-4EAE-88D6-B6AA4DC4C028
320 00:43:41 E ReportCrash[3490] <Error>: CrashReporter Key: 509d7f4d78bbd031f5bf1a6ef122f14f5be24f8b
321 00:43:41 E ReportCrash[3490] <Error>: Hardware Model: iPhone5,2
322 00:43:41 E ReportCrash[3490] <Error>: Process: TestApp [3487]
323 00:43:41 E ReportCrash[3490] <Error>: Path: /private/var/mobile/Containers/Bundle/Application/78A7A4DB-3377-4875-B86F-217F1B8DFF9E/TestApp.app/TestApp
324 00:43:41 E ReportCrash[3490] <Error>: Identifier: TestApp
325 00:43:41 E ReportCrash[3490] <Error>: Version: ???
326 00:43:41 E ReportCrash[3490] <Error>: Code Type: ARM (Native)
327 00:43:41 E ReportCrash[3490] <Error>: Parent Process: launchd [1]
328 00:43:41 E ReportCrash[3490] <Error>: Date/Time: 2015-09-13 00:43:40.855 +0200
329 00:43:41 E ReportCrash[3490] <Error>: Launch Time: 2015-09-13 00:43:34.825 +0200
330 00:43:41 E ReportCrash[3490] <Error>: OS Version: iOS 8.3 (12F70)
331 00:43:41 E ReportCrash[3490] <Error>: Report Version: 105
332 00:43:41 E ReportCrash[3490] <Error>: Exception Type: EXC_BAD_ACCESS (SIGSEGV)
333 00:43:41 E ReportCrash[3490] <Error>: Exception Subtype: KERN_INVALID_ADDRESS at 0x9805ac14
334 00:43:41 E ReportCrash[3490] <Error>: Triggered by Thread: 6
335 00:43:41 E ReportCrash[3490] <Error>: Thread 0 name: Dispatch queue: com.apple.main-thread
336 00:43:41 E ReportCrash[3490] <Error>: Thread 0:
337 00:43:41 E ReportCrash[3490] <Error>: 0 libsystem_kernel.dylib 0x359b1474 0x359b0000 + 5236
338 00:43:41 E ReportCrash[3490] <Error>: 1 libsystem_kernel.dylib 0x359b1268 0x359b0000 + 4712
339 00:43:41 E ReportCrash[3490] <Error>: 2 CoreFoundation 0x2708256e 0x26fb5000 + 841070
340 00:43:41 E ReportCrash[3490] <Error>: 3 CoreFoundation 0x27080b14 0x26fb5000 + 834324
341 00:43:41 E ReportCrash[3490] <Error>: 4 CoreFoundation 0x26fcd1fc 0x26fb5000 + 98812
342 00:43:41 E ReportCrash[3490] <Error>: 5 CoreFoundation 0x26fcd00e 0x26fb5000 + 98318
343 00:43:41 E ReportCrash[3490] <Error>: 6 GraphicsServices 0x2e8ac1fc 0x2e8a3000 + 37372
344 00:43:41 E ReportCrash[3490] <Error>: 7 UIKit 0x2a771a54 0x2a702000 + 457300
345 00:43:41 E ReportCrash[3490] <Error>: 8 TestApp 0x00024ca2 0x20000 + 19618
346 00:43:41 E ReportCrash[3490] <Error>: 9 libdyld.dylib 0x358faaac 0x358f9000 + 6828
347 00:43:41 E ReportCrash[3490] <Error>: Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
348 00:43:41 E ReportCrash[3490] <Error>: Thread 1:
349 00:43:41 E ReportCrash[3490] <Error>: 0 libsystem_kernel.dylib 0x359b1224 0x359b0000 + 4644
350 00:43:41 E ReportCrash[3490] <Error>: 1 libdispatch.dylib 0x358e60ec 0x358d8000 + 57580
351 00:43:41 E ReportCrash[3490] <Error>: 2 libdispatch.dylib 0x358dad36 0x358d8000 + 11574
352 00:43:41 E ReportCrash[3490] <Error>: Thread 2 name: Dispatch queue: com.appcelerator.anlaytics.databaseQueue
353 00:43:41 E ReportCrash[3490] <Error>: Thread 2:
354 00:43:41 E ReportCrash[3490] <Error>: 0 libsystem_kernel.dylib 0x359b14c4 0x359b0000 + 5316
355 00:43:41 E ReportCrash[3490] <Error>: 1 libdispatch.dylib 0x358e45da 0x358d8000 + 50650
356 00:43:41 E ReportCrash[3490] <Error>: 2 CFNetwork 0x26b50c6c 0x26aef000 + 400492
357 00:43:41 E ReportCrash[3490] <Error>: 3 CFNetwork 0x26b6bd3a 0x26aef000 + 511290
358 00:43:41 E ReportCrash[3490] <Error>: 4 TestApp 0x00374bbc 0x20000 + 3492796
359 00:43:41 E ReportCrash[3490] <Error>: 5 TestApp 0x0036c1d2 0x20000 + 3457490
360 00:43:41 E ReportCrash[3490] <Error>: 6 libdispatch.dylib 0x358e0a38 0x358d8000 + 35384
361 00:43:41 E ReportCrash[3490] <Error>: 7 TestApp 0x0036bdaa 0x20000 + 3456426
362 00:43:41 E ReportCrash[3490] <Error>: 8 libdispatch.dylib 0x358d92cc 0x358d8000 + 4812
i found the solution for my problem.
i must add an return in the function.
Now it is working for iPhone5 and lower
-(id)stopStream:(id)args
{
NSLog(#"[INFO]AVPlayer STOP");
[player pause];
[playerItem removeObserver:self forKeyPath:#"timedMetadata" context:nil];
[player removeObserver:self forKeyPath:#"status" context:nil];
return args;
}
You're also over retaining the player. You should [player release]; in your stopStream, or in startStream, only instantiate a new player if one does not already exist.