TVM ERROR: Circular Dependency Error Unfreed memory on exit

I'm getting the following error in the CIQ_LOG.TXT file in VivoActive on 2 different apps, but I get no error running the same Apps in the simulator or running the same apps on the Epix.

TVM ERROR:
Circular Dependency Error
Unfreed memory on exit


I have CIQ 1.1.3
VA FW 3.10
Epix FW 2.70

The apps seems to run fine otherwise. No IQ! crashes or watch crashes I haven't done a bunch of long term testing for memory leaks though.

Is this something that I should try to fix before putting the app up in the App Store?
  • I have a couple of apps also having this same output.
    All runs fine on the watches (at least on my F3)
  • As near as I can tell, it is some combination of a Confirmation Dialog followed by a Progress Bar that is being called when I discard that is causing this error message to get generated on the VivoActive.

    I created a simple app that demonstrates the problem.

    Menu Item 1 calls a timed progress bar and then exits the app.
    Menu Item 2 calls a confirmation dialog which calls a progress bar and then exits the app
    Menu Item 3 calls a confirmation dialog which exits the app without a progress bar.

    I tested the app on the Simulator, a VivoActive watch, and an Epix watch. The error message only shows up in the CIQ_LOG file on the VivoActive and only after selecting Menu Item 2. Menu items 1 and 3 do not cause the error message to get generated.

    This is just a default new IQ project with the following mods to the menus. The whole project is attached below.

    class ConfirmMenuDelegate extends Ui.MenuInputDelegate {

    function onMenuItem(item) {
    if (item == :item_1) {
    var view = new ProgressView("Saving", "Activity Saved");
    Ui.pushView(view, null, Ui.SLIDE_IMMEDIATE);
    }
    else if (item == :item_2) {
    var view = new Ui.Confirmation("Discard?");
    var delegate = new DiscardConfirmationDelegate();
    Ui.pushView(view, delegate, Ui.SLIDE_IMMEDIATE);
    }
    else if (item == :item_3) {
    var view = new Ui.Confirmation("Discard No ProgressBar");
    var delegate = new DiscardConfirmationDelegate2();
    Ui.pushView(view, delegate, Ui.SLIDE_IMMEDIATE);
    }
    }

    }


    and then here is the confimation dialogs and progress bars

    class DiscardConfirmationDelegate extends Ui.ConfirmationDelegate {
    function onResponse(response) {
    if (response == CONFIRM_YES) {
    var view = new ProgressView("Discarding", "Activity Discarded");
    Ui.pushView(view, null, Ui.SLIDE_IMMEDIATE);
    }
    return true;
    }
    }

    class DiscardConfirmationDelegate2 extends Ui.ConfirmationDelegate {
    function onResponse(response) {
    if (response == CONFIRM_YES) {
    // pop the progress bar
    Ui.popView(Ui.SLIDE_IMMEDIATE);
    // pop the save menu
    Ui.popView(Ui.SLIDE_IMMEDIATE);
    // pop the main view
    Ui.popView(Ui.SLIDE_IMMEDIATE);
    }
    return true;
    }
    }

    class ProgressView extends Ui.ProgressBar {
    hidden var mTimer;
    hidden var mTicks;
    hidden var mText;
    function initialize(startText, finishText) {
    Ui.ProgressBar.initialize(startText, null);
    mTimer = new Timer.Timer();
    mTimer.start(self.method(:onTimer), 1000, true);
    mTicks = 0;
    mText = finishText;
    }

    function onTimer() {
    mTicks += 1;
    if (mTicks == 2) {
    setDisplayString(mText);
    setProgress(100);
    }
    else if (mTicks == 3) {
    mTimer.stop();
    // pop the progress bar
    Ui.popView(Ui.SLIDE_IMMEDIATE);
    // pop the save menu
    Ui.popView(Ui.SLIDE_IMMEDIATE);
    // pop the main view
    Ui.popView(Ui.SLIDE_IMMEDIATE);
    }
    }
    }


    Here's the whole project
  • Just to note - the zip file does not look like it's the whole project.
    eg: There is not Item 3 in the menu.


    I can concur.. on an F3. 4.2 CIQ 1.1.3
    Menu Item 2 will cause CIQ_LOG to have the error message.

    BTW - This is excellent investigative work. I personally would not have known how to get to a point where I can pinpoint the issue.
  • Former Member
    Former Member over 10 years ago
    Thanks for putting together the test project Roger.

    If there is a memory leak in the VM, it is possible the Circular Dependency error could be logged when there are not actually any circular dependencies. I have logged a ticket and attached your sample project for investigation.