You are reading a single comment by @tev and its replies. Click here to read the full conversation.
  • I encountered a couple of slightly annoying things working with the IDE today and was wondering if these were known issues. I wasn't sure if I should post here on the forum first or open issues on GitHub, but here's a brief description of each:

    The first is that viewing the Bangle.js debug log (which seems to be written to storage file log.txt, if I'm not mistaken) is quite fiddly because the IDE insists that it's a binary file when it should be text. The hex dump is not helpful (nor does it help that the window appears too narrow in my browser to display properly even though there would be plenty of space), so I'm forced to save the file and then open it manually in a text editor. Further complicating matters is the fact that the default filename lacks the correct extension (it's log.txt (Storage file) instead of something ending in .txt), and renaming it adds an additional unnecessary step to the process. Ideally, a file ending in .txt should be just that, and it should open as text in one step without a hassle.

    The other one is a bit weird, and I'm not sure how to debug it. Occasionally (I haven't been able to discern any particular pattern) when my watch is connected to the IDE and I click the Storage button, the list of storage files fails to appear. Instead, I only get a Send to RAM button and then a dump of strings representing the names of my storage files on the debug pane an instant after the dialog window pops up. Another possible clue is that when this happens there is usually a delay of a couple of seconds, which is longer than it normally takes. If I cancel and try again, it usually works fine, but before long the glitch crops up again.

  • the IDE insists that it's a binary file when it should be text

    Quite likely it is binary (or maybe even UTF-8 now?) = there is some non-ASCII byte there. Often there is a button there to switch to text mode, maybe it should be there always (currently it is not).

    . Further complicating matters is the fact that the default filename lacks the correct extension (it's log.txt (Storage file) instead of something ending in .txt)

    Which OS or browser it is? On Windows in Chrome it definitely adds just .txt

    Instead, I only get a Send to RAM button and then a dump of strings representing the names of my storage files on the debug pane an instant after the dialog window pops up. Another possible clue is that when this happens there is usually a delay of a couple of seconds, which is longer than it normally takes.

    It may be out of memory (or low stack?) situation. Maybe some app that use lot of memory/stack is running? Do you see some error or exception message in the 'dump of strings' or series of dots inside of (json) output?

    I've seen this on low memory devices (nrf51822 with 16kb ram), the code sent by IDE that does the listing was the most complex thing to run there. While other simple code was running fine (there is not really much RAM available there) listing the storage failed a lot until I reduced total variables for the build => increased space for stack. I think it needs to build a relatively big JSON object (which depends on total number of files there) which needs a lot of stack space.

About

Avatar for tev @tev started