Аpp from PRG file works, but from IQ they are not.

Former Member
Former Member
Hello!

My "Yachtsman" application (https://apps.garmin.com/en-US/apps/ee6389b1-df4a-45be-b045-b912be91e256) works fine in simulator and my Fenix3 if install from PRG file. But from Connect IQ "store" crash:

ERROR: Not Enough Arguments Error
DETAILS: Failed invoking <symbol>
STORE_ID: ee6389b1df4a45beb045b912be91e256
CALLSTACK:
@PC = 0x00000000
@PC = 0x00000000


Build by Makefile:

PRG = bin/Yachtsman.prg
PACK = bin/Yachtsman.iq

KEY = developer_key.der
MANIFEST = manifest.xml

FLAGS = -w

all: $(PRG)

pack: $(PACK)

$(PRG) : $(SRC) $(KEY) $(MANIFEST) resources/resources.xml
$(SDK)/monkeyc -o $(PRG) $(FLAGS) -d $(DEV) -y $(KEY) -z resources/resources.xml -m $(MANIFEST) $(SRC)

$(PACK) : $(SRC) $(KEY) $(MANIFEST) resources/resources.xml
$(SDK)/monkeyc -o $(PACK) $(FLAGS) -e -r -y $(KEY) -z resources/resources.xml -m $(MANIFEST) $(SRC)
  • Former Member
    Former Member over 8 years ago
    Ok, it was very strange, but I figured out. I have this class:

    class Point {
    const INFO = 0;
    const LAT = 1;
    const LON = 2;

    var lon = 0.0;
    var lat = 0.0;
    var info = "";

    function initialize(prop) {
    if (prop != null && prop[INFO] != null && prop[LAT] != null && prop[LON] != null) {
    info = prop[INFO];
    lat = prop[LAT];
    lon = prop[LON];
    }
    }
    }


    When manifest have "minSdkVersion=1.2.1" this code works fine:

    var p = new Point();

    When manifest have "minSdkVersion=1.3.1" this code crash!

    Failed invoking <symbol>
    Not Enough Arguments Error
    in initialize (source/Point.mc:14)


    Where such differences are described?!
  • Start with is sticky: https://forums.garmin.com/showthread.php?358985-Too-Many-Arguments-Error

    There are also a number of threads about arg count checking in 1.3.x and 2.1.x within the forum.
  • Former Member
    Former Member over 8 years ago
    Thank's! There are other sdk "jokes"?
  • @Strijar: Apologies for the confusion about this. We added an argument count check, as detailed in the post jim_m_58 linked to. It was intended to fix something that should have been in place since the beginning, and it had some unintended consequences that have caused problems like this for some folks.