Showing results 1 to 1 of 1

Thread: Shift Management: Unexpected crash on IShifts.GetItem

  1. #1

    Frage Shift Management: Unexpected crash on IShifts.GetItem

    Hi guys,

    I'm having big troubles with shift management.

    In my app I have these few lines that reads informations from the Calendar in order to keep track of "today" shifts.

    _shiftsToday = shiftFilter.GetShifts();
    if (_shiftsToday != null)
        IShift theShift;
        int howManyShifts = _shiftsToday.Count;
        SortedDictionary sortedShifts = new SortedDictionary();
        for (int y = 0; y < howManyShifts; y++)
                // this line sometimes cause a CRASH
                theShift = _shiftsToday.GetItem(y);               
                if (theShift != null)
                    sortedShifts.Add(theShift.StartTime, theShift);
            catch (Exception e) // on Crash this execption is never catched, RT crashes immediatelly :-(
                Logger.LogError(e, null);

    Inside the screen, where is shown the calendar, I have a Save Button (only dev users can see it) which executes the code above.

    zenon runtime crashes on line :

    theShift = _shiftsToday.GetItem(y);

    without entering the catch clause.

    I did a test putting the execution of the same code on the end function of the screen. In this case it always work.

    So I think that is better to leave the screen before start using ShiftManagement APIs.

    What do you think? Is there a solution?

    PS: zenon 7.60 b46501 (32bit)
    Last edited by carlo.chiari : 6th August 2018 at 08:52 Reason: formatting

Similar Threads

  1. Per Shift Energy
    By tanveerali in forum zenon Energy Edition
    Replies: 4
    Last Post: 22nd May 2018, 12:40
  2. SICAM 230 IEC-61850 Driver Crash
    By bhavin_bvm in forum zenon Energy Edition
    Replies: 1
    Last Post: 28th March 2017, 11:51
  3. Power management system
    By arashsamavati in forum zenon Energy Edition
    Replies: 1
    Last Post: 22nd January 2016, 09:26
  4. Runtime crash
    By kizicsanjin in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 1
    Last Post: 27th December 2010, 00:46

Tags for this Thread

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts