ERROR: Too Many Arguments Error

Hi,

I released yesterday a new version of my data field which was compiled with 2.1.2 and worked very well in the simulator. After downloading/updating the data field on my watch via the official Garmin store the data field is not shown any more. Instead the 235 shows the IQ! icon. I studied this forum and found that there is a log file on the watch. This log file says:
ERROR: Too Many Arguments Error
DETAILS:
STORE_ID: 460161941fdf4f9bae8b16ceba51a548
CALLSTACK:
@PC = 0x00000000


I searched further in the forum and found that the onStart and the onHide method now needs an argument. Nevertheless, I have not defined both of that methods. The methods I use are:

function onLayout(dc) {
}

function compute(info) {
}

function onUpdate(dc) {
}

function onTimerLap() {
storeLapInfos = true;
}




I really have no glue how I can debug this since the simulator works pretty well. Any hints?

The data field in the store is now in a broken state and my user are surely not happy. Can I revert back the latest compile?
  • Check your App class and onStart() and onStop(). They need to be onStart(state) and onStop(state) now...

    (state is just a dummy parameter right now, but parameter counts are strongly enforced in 1.3.x and 2.1.x.)
  • This worked. Thanks for your help.
  • Former Member
    Former Member over 8 years ago
    Set minimum supportted CIQ to 2.1.x, will make simulator crash when arguments mismatch. That is much easier to identify the actual problems.
  • Set minimum supportted CIQ to 2.1.x, will make simulator crash when arguments mismatch. That is much easier to identify the actual problems.


    Hi, how do I set the "minimum supported CIQ to 2.1.x"? I couldn't find it anywhere in Eclipse. Thanks.
  • Make sure the ConnectIQ eclipse plugin is up-to-date. You can do so by clicking Help > Installation Details. You should be able to look at the plugin version (Connect IQ IDE) there. If you want to update it, click Update....

    Of course this assumes that you've setup eclipse to get the plugin as described in the Programmer's Guide. Instructions for doing that can be found here.

    Travis
  • Make sure the ConnectIQ eclipse plugin is up-to-date. You can do so by clicking Help > Installation Details. You should be able to look at the plugin version (Connect IQ IDE) there. If you want to update it, click Update....

    Of course this assumes that you've setup eclipse to get the plugin as described in the Programmer's Guide. Instructions for doing that can be found here.

    Travis


    Thanks Travis. This did the trick! :)