NSRangeException in downloadLogAndStopLoggingAsync?

I'm having trouble getting logging to start and stop simultaneously on multiple devices I'm connected to. More specifically, I'm getting an exception I've traced down to something happening in my call to downloadLogAndStopLoggingAsync by eliminating lines one by one.

Here's my call to the function where downloadProgressAccel is a UILabel

[[currdevice.accelerometer.dataReadyEvent downloadLogAndStopLoggingAsync:YES

                     progressHandler:^(float number) {

                         // Update progress bar, as this can take upwards of one minute to download a full log

                         [self.downloadProgressAccel setText:[NSString stringWithFormat:@%f,number*100]];

                     }] success:^(NSArray<MBLNumericData *> * _Nonnull result) {}];

And the error trace

2016-04-26 20:37:09.648 Simple MetaWear Test[1957:786861] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 7 beyond bounds [0 .. 6]'

*** First throw call stack:

(0x183f7ae38 0x1835dff80 0x183e5aebc 0x1000b53cc 0x1000825c0 0x100219a7c 0x100219a3c 0x100226554 0x10021d72c 0x10022866c 0x100228364 0x183bdd470 0x183bdd020)

libc++abi.dylib: terminating with uncaught exception of type NSException

Thanks for the help!


  • I tried to get the logs using the sample MetaWearApp and it likewise crashed when it tried to stop and logs and it started downloading. However, the second time around, everything worked fine.
  • Edlee,

    We were actually just debugging this issue and already have a fix.  I'll just need get a release published, should happen within 24 hours.
  • Excellent!! This will be super helpful. Thanks!
This discussion has been closed.