Complete
over 5 years ago

WERETECH-6408, WERETECH-7425, WERETECH-7514

Could not reproduce.

File not found error

On real device randomly occurs error: File Not Found Error - while trying to read from Storage

Error is already quite old. From CIQ_LOG.YML I see that it occurs roughly once a day. It is not as visible as before because Watch restart automatically Watchface.

Parents
  • @IB614 I'd be careful using setProperty/getProperty - I had even more errors that way which is why I switched to using storage! The .set file seemed to keep losing values of properties that were stored in it (for all properties that were not exposed to the user as settings).

Comment
  • @IB614 I'd be careful using setProperty/getProperty - I had even more errors that way which is why I switched to using storage! The .set file seemed to keep losing values of properties that were stored in it (for all properties that were not exposed to the user as settings).

Children

  • ---
    Error: File Not Found Error
    Details: 'Failed invoking <symbol>'
    Time: 2020-02-18T21:36:28Z
    Part-Number: 006-B2859-00
    Firmware-Version: '8.00'
    Language-Code: fre
    ConnectIQ-Version: 3.1.7
    Store-Id: cf4501b9-5acb-4ed7-aef3-6573e7474871
    Store-Version: 133
    Filename: A2GB1714
    Appname: CubeWatch
    Stack:
      - pc: 0x100097a4

    after one week without any error.
    BG just went on the same time of this:
            try {
                Storage.setValue("PSWEBREQUEST",mRequestType);
            }
            catch(e) {
                System.println(e.getErrorMessage());
            }        


    (0x100097a4 lines).

    even the try / catch does not work and stop the WF  (halted !)
    ??

  • good news for you.

    I can't do without storage reading in BG since properties are not updated.

    I changed some codes too, making all my saving stuff at the return of the backgroundData, no more in events !

    (No File error for some hours. even if pretty sure there will be some.)

    finaly, It just changed / reduced  the statistics of IO conflict possibilities !

    But that not solves what i could name an IO bug.

  • I had fallen back to setProperty/getProperty and it works fine for me.
    No issues with access to properties in the background on WF and the number of errors had reduced at least ten times. In fact, errors related to storage had been eliminated completely.

  • Hi,

    still debugging, and still having File not found errors.

    Always from events calls (Hide, Sleep ...) while at the same time IO use in Temporal Event.

    Either with properties or Storage while using storage getValue in TemporalEvent..

    Strange behavior : sometime i have another default WF running after the crash, sometime my WF is still running (automatic restart ?)

  • here are some logs,first is the CIQ_LOG.YML (file not found error on MK1), 2nd is printLn from app (from the watch too).
    (My WF halted here, but if i start it again, it may be ok for some random time, one day, one week or one minute!)
    (i guess CIQ log time is UTC/zulu time, with 1 hour less from the watch time...)

    Error: File Not Found Error
    Details: 'Failed invoking <symbol>'
    Time: 2020-02-10T12:45:30Z
    Part-Number: 006-B2859-00
    Firmware-Version: '8.00'
    Language-Code: fre
    ConnectIQ-Version: 3.1.7
    Store-Id: cf4501b9-5acb-4ed7-aef3-6573e7474871
    Store-Version: 127
    Filename: A23A2828
    Appname: CubeWatch
    Stack:
    - pc: 0x1000912e


    0x1000912e is :
    for (var i=0; i<TotalStocks; i++) {
    StocksArray[i][0]= false;
    StocksArray[i][2]= Application.getApp().getProperty("StockCode"+i.toString());
    Application.getApp().setProperty("OSSTOCKS[" + i + "]", StocksArray[i]);
    }

    (-> in userSettings (while init WF) )

    printLn LOG:
    ---------------
    in onUpdate: at 13:45:29
    ********* drawInformation ******** mRequestType =0
    in onUpdate: at 13:45:30
    Background: ***enter onStart - ..
    ********* drawInformation ******** mRequestType =0
    Background: ****onTemporalEvent **** mType = 0
    *** In onHide.. at 13:45:30
    Background: *** In saveDatatoDisk.. key : ALL at 13:45:31
    ***enter onStop - ..
    Background: ***enter onStart - ..
    Background: ****onTemporalEvent **** mType = 0
    Background: ***enter onStop - ..
    Background: ***enter onStart - ..
    Background: ****onTemporalEvent **** mType = 0
    Background: ***enter onStop - ..
    Background: ***enter onStart - ..
    Background: ****onTemporalEvent **** mType = 0
    Background: ***enter onStop - ..
    Background: ***enter onStart - ..
    Background: ****onTemporalEvent **** mType = 0
    Background: **** receiveStock3 **** **** dataFromWebRequest=[0, 200, [[4.150000, 200, false, true, ALVAL.PA],...
    Background: ***enter onStop - ..

    --------------

    onTemporalEvent =>
    function onTemporalEvent() {
    mType = Storage.getValue("webRequestType");
    ...

    what i see :
    First of all, it is quite impossible to have "saveDatatoDisk 'ALL' " function called in BG ( i use it only in onHide and onUserSettings). It may be a printLn display pb?
    2nd, i see 1 onTemporalEvent before onHide, 4 TemporalEvent called following. And each time when i have a file error.
    Why 5 calls of the BG in the same minute ???
    (printLn is accessing IO too, but i have the file not found error without the printLn log ...)

    Some may tell me i should not put disk access here, and i'm ok, but i have not the skill yet to do in other ways...
    but I do not (i should not) have to deal with IO conflicts..

    maybe i made some (concept) errors in my code, it is something i can easily guess !