Limitation of size or number of Lines?

I added a new feature to my App, works well on Simulator but crashes immediately on start on Hardware. After some debugging I found no error in the new code, but found it was working if i removed some other functions. So i think something got to big :confused:
I moved the new function to a new file and own class but with same results. Are there some Limitations on the watch that are not on the Simulator?
The Simulator counts 47.1 of 64kb. There are no entrys in error.log or CIQ_LOG :confused:
  • One thing to note is that today, the memory usage you see on the bottom line of the simulator is the memory used when the app is idle.

    It can peak higher than that. What you can do is add a couple Sys.println() calls in your code and display Sys.getSystemStart().usedMemory to see what it says.

    And there are things like when you display a standard menu, that will take 1.5-2k memory right there.
  • I had something similar some time ago, one view got to big and crashed on loading. After splitting the view into three views the whole app was bigger, tootk about 10kb more memory, but worked again. So I think there is some limitation on size of a class or view or function or something.
  • There are two limits. Memory and #of objects (you can have available memory, but run out of objects) There's actually an "out of objects" message you'll see in the simulator).

    As I said, with the Sys.println() calls you can see what's going on in the sim, and if you create a <your app name>.txt file in the LOGS directory on the watch, see what's happening on the real watch too.

    I don't know of a way to get a count of objects used, but I think it's something like a max of 256.
  • Thank you!

    i get this worst output
    with new class:
    16672 free, 48864 used, 65536 total
    and without:
    19088 free, 46448 used, 65536 total

    seems te be enought free memory.
    I dont get a "out of objects" message in the simulator.
    <your app name>.txt logging dont work. With and without the new function, the file is empty. Have I to enable some debugging mode?
  • <your app name> has to match the part before .prg for your app

    so <your app name>.prg (in APPS) uses <your app name>.txt (in APPS/LOGS)
  • <your app name> has to match the part before .prg for your app

    yes, so I did. SMT.prg is my App, and I created SMT.txt in APPS/LOGS.
    I tried the prg from /bin, and from the "create for device dialog" with and without the release option. (think it will be without release option ,right?), none of these prgs wrote to the txt file...
  • I'm sorry, it was my mistake, or an buggy behaviour of the windows explorer...
    the file was named Smt.txt.txt. I usualy dont use windows..

    the app on the watch says without the new class:
    16668 free, 48868 used, 65536 total. Like the simulator...
  • With the new function (App crashes), the Logfile is empty. Even my printings from the Apps initialize() are not printed to my SMT.txt file.
  • Former Member
    Former Member over 8 years ago
    I think the best way to get help may be to post the offending function for us to look at
  • There is no offending function, the Problem is that the App does not start if there are too many functions. The new function works well if I remove enough of older parts from the App.
    Now I removed one of the three Views my App had and the new function works well.

    This Problem only occurs on the Watch, not in the Simulator. Perhaps its a matter of memory, see my posts above, perhaps 16k free is not enough. with 19k free it runs.