Creo crash and Player Runtime Error

  1. 5 years ago

    Joel_Eisenstat

    2 Jan 2019 User since 2016

    Good morning ,

    This particular code causes an immediate runtime error in CreoPlayer and a crash in the simulator after a few cycles .

    Runtime Error
    An error occurred while calling selectRowInComponent(***-{NSMutableInndexSetaddIndexesInRange:]:
    Range{18446744073709551613,1} exceeds maximum index value of NSNotFound - 1).onSuccess (Image_Input)

    Methods

    Did Show
    identifier = 1003; // remove for production
    loadrecord();

    load record()
    func onSuccess(db,rs) {
    TableView1.dataSet = rs;
    TableView1.reload(true, true);
    PickerView1.selectRowInComponent(0, 0, true);
    }

    func onError(db){
    var alert = Alert("Error", PostgreSQL1.errorMessage);
    alert.show();
    }

    PostgreSQL1.connect();
    var sql = 'SELECT * FROM public."Chart_Document" WHERE "patid" = \(identifier) ORDER BY "date" DESC ';
    PostgreSQL1.select(sql, onSuccess, onError)

    DidSelectCell(cell, section,index) // Fails at this point , crashes Creo , runtime error Player
    Image_Input.identifier = cell.identifier;
    Image_Input.mode = "edit";
    Image_Input.patid = identifier;
    Image_Input.open();

    Thanks
    Joel

  2. Joel_Eisenstat

    2 Jan 2019 User since 2016

    Of course I think I found the issue 10 seconds after sending the messag. :(
    A missing index in the loadrecord method -> pats = rs.patid ;
    Seems to have solved the Simulator but still have the runtime error.

  3. Joel_Eisenstat

    2 Jan 2019 User since 2016

    Got it - negative values crept into data file
    Apologies for waste of bandwidth ....

or Sign Up to reply!