Acknowledged

Peak memory tracing crashes simulator

The peak memory usage feature in the simulator "Active Memory" cannot be enabled consistently. I've only managed to do it a few times. Clicking the checkbox does not enable the buttons except in rare circumstances, which I cannot reproduce except by luck. The few times I have been able to click the peak stack trace button, a dialog box appears and flashes for a little while, then the simulator crashes and just disappears. Has this "feature" ever worked, and if so, how to get it working properly?

Parents
  • As a test, I used "Moneyc: New project", to create a simple WF without settings.  You can't get much simpler than this.

    Then to make it interesting, I commented out both onLayout and onUpdate.

    You still see the peak at startup. 

    It's using 5.8K with a peak of 8.0k with an instinct2 in the sim.

    It's using 5.5k with a peak of 7.6k with a fr265.

    You really can't do anything in the code to reduce this.  Turning on 

    project.optimization = 2
    did nothing 
Comment
  • As a test, I used "Moneyc: New project", to create a simple WF without settings.  You can't get much simpler than this.

    Then to make it interesting, I commented out both onLayout and onUpdate.

    You still see the peak at startup. 

    It's using 5.8K with a peak of 8.0k with an instinct2 in the sim.

    It's using 5.5k with a peak of 7.6k with a fr265.

    You really can't do anything in the code to reduce this.  Turning on 

    project.optimization = 2
    did nothing 
Children
  • I can set breakpoints and get snapshots of memory usage but I could do that anyway with getsystemstats and println. Still, I get things like this:

    Hit breakpoint 1, onUpdate () at AnnulusWatch.mc:38
    Hit breakpoint 2, onUpdate () at AnnulusWatch.mc:39
    Hit breakpoint 3, onUpdate () at AnnulusWatch.mc:40
    Hit breakpoint 1, onUpdate () at AnnulusWatch.mc:38
    Hit breakpoint 2, onUpdate () at AnnulusWatch.mc:39
    Kill app for resume the app
    Failed to terminate app: Timeout
    Hit breakpoint 3, onUpdate () at AnnulusWatch.mc:40
    Kill app for get stack backtrace
    Failed to terminate app: Timeout
    [Ljava.lang.StackTraceElement;@19dad439
    

    And the peak stack trace never shows anything other than this:

    If peak memory usage is anything other than broken, I can't tell.