Data Streaming Exceptions with UWP

edited October 2016 in C#

Comments

  • I am facing same issue. 

    Trying to get data stream (gyro or accelerometer) from two metawear sensors at 100Hz using high frequency data signal API with out processing data.

    Even trying to collect only accelerometer data using high frequency stream at 100Hz from single sensor. After 10-20 seconds getting exception "Object reference not set to an instance of an object" continuously on following API; 
    mbl_mw_metawearboard_notify_char_changed

    Any thought how to fix it.

    Specs are:
    Firmware 1.2.4
    C++API (WinRT) 0.5.22
    Windows 10 IoT Core on Raspberry Pi 3.

  • it is not working even at 25, 50, 100Hz for gyro data, Tried with new high freq api and also with old. 
    Testing with firmware 1.2.4. Same issue with latest firmware 1.2.5.

    I found the exception occur in cpp SDK 0.5.22 file metawearboard.cpp in following methods;

    static inline int32_t forward_response(const ResponseHeader& header, MblMwMetaWearBoard *board, const uint8_t *response, uint8_t len)
    or 
    int32_t response_handler_packed_data(MblMwMetaWearBoard *board, const uint8_t *response, uint8_t len) 

    common code in both methods where exception raises, line 
    signal->handler(data);

    Exception occur after few seconds some time after 100 calls or 300 calls and following is exception text;
     
    "Exception thrown at 0x76DD4A57 (KernelBase.dll) in UWP.exe: 0xC0000005: Access violation reading location 0x00000004.
    If there is a handler for this exception, the program may be safely continued."

  • The reason found was the callback function received_data handler not stay live which is passed to following api;
    mbl_mw_datasignal_subscribe(signal, received_data);

This discussion has been closed.