SampleApp 2.3 Stopping when plotting/emailing data

Hi,

When trying to either plot or email the accelerometer data in the 2.3 SampleApp, the app hangs or crashes. 

I ran it through the debugger, and it appears to be calls within the dataSampletoGS () method, specifically line 292 which causes it to crash, it calls InvocationTargetException(Throwable exception) after trying to run this code  byte[] config= samplingConfig.getBytes(); 

After that At one stage the debugger is unable to find the code it requires to display (ZygoteInit$MethodAndArgsCallers.run()line:735/736/737/738 - not sure if that is relevant though. 

Any pointers or a fix to this would great. 

Many thanks, 

Richard

Comments

  • In case it helps, here is the stack trace. 

    01-04 16:04:33.035: W/dalvikvm(16801): threadid=1: thread exiting with uncaught exception (group=0x41e28ce0)
    01-04 16:04:38.035: E/AndroidRuntime(16801): FATAL EXCEPTION: main
    01-04 16:04:38.035: E/AndroidRuntime(16801): Process: com.mbientlab.metawear.app, PID: 16801
    01-04 16:04:38.035: E/AndroidRuntime(16801): java.lang.NullPointerException
    01-04 16:04:38.035: E/AndroidRuntime(16801): at com.mbientlab.metawear.app.AccelerometerFragment.dataSampleToGs(AccelerometerFragment.java:292)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at com.mbientlab.metawear.app.AccelerometerFragment.access$22(AccelerometerFragment.java:287)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at com.mbientlab.metawear.app.AccelerometerFragment$4.onClick(AccelerometerFragment.java:263)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at android.view.View.performClick(View.java:4445)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at android.view.View$PerformClick.run(View.java:18446)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at android.os.Handler.handleCallback(Handler.java:733)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at android.os.Handler.dispatchMessage(Handler.java:95)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at android.os.Looper.loop(Looper.java:136)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at android.app.ActivityThread.main(ActivityThread.java:5146)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at java.lang.reflect.Method.invokeNative(Native Method)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at java.lang.reflect.Method.invoke(Method.java:515)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
    01-04 16:04:38.035: E/AndroidRuntime(16801): at dalvik.system.NativeStart.main(Native Method)
  • edited January 2015
    Hi Eibrandr
    I think is a bug in the sample app.
    Have you tried to select data sampling, press start button, wait some secs, press stop button and than plot?
    It works for me
  • Hi Tomcat,

    I've tried that numerous times at this stage, on two devices also (Samsung galaxy s3 and nexus 7), but experience the same problem on both unfortunately.

    I thought that perhaps my board was not generating the data, but with app version 2.2 I am able to generate a plot, so it does not appear to be board related.

    Thanks for the suggestion though.

    R
  • Hi R,

    We will look into the issue with our Android Developer.

    Thanks!
  • edited January 2015
    Getting a null pointer exception at line 292 (https://github.com/mbientlab/Metawear-SampleAndroidApp/blob/2.3/src/com/mbientlab/metawear/app/AccelerometerFragment.java#L292) suggests that the Data Sampling component was not enabled. Try killing the app from the settings menu, then follow the steps listed by tomcat.
This discussion has been closed.