Deleting Icon from an Icon Widget causes the Simulator to crash

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Deleting Icon from an Icon Widget causes the Simulator to crash

    Hi

    I am trying to delete an icon from an Icon Widget. But can't seem to achieve it. I am using the Simulator for my testing.

    1. I have created an icon widget and stored the handle as a ICONVIEW_Handle.
    2. I use the function ICONVIEW_GetNumItems() and pass my handle.
    3. If the function returns with 1. I call ICONVIEW_DeleteItem() and pass my handle and index (0).

    The simulator crashes the moment ICONVIEW_DeleteItem() is called and the display is updated.

    Any help on resolving this issue will be great

    Cheers
    Aquib
  • Hi Lutz,

    Thanks for responding. The following snippet of code causes the crash

    C Source Code

    1. struct{ ICONVIEW_Handle Widget_Sleep; WM_HWIN Wiget_EnergyOvrd;}gui_scheduler;
    2. if(ICONVIEW_GetNumItems(gui_scheduler.Widget_Sleep)){ ICONVIEW_DeleteItem(gui_scheduler.Widget_Sleep,0);}



    Thanks
    Aquib
  • I get the following message from Windows 7 when the application crashes


    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: GUISimulation.exe
    Application Version: 0.0.0.0
    Application Timestamp: 00000000
    Fault Module Name: GUISimulation.exe
    Fault Module Version: 0.0.0.0
    Fault Module Timestamp: 00000000
    Exception Code: c0000005
    Exception Offset: 00008346
    OS Version: 6.1.7601.2.1.0.256.48
    Locale ID: 1033
    Additional Information 1: 0a9e
    Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
    Additional Information 3: 0a9e
    Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
  • Hi,

    sorry, but with that I'm not able to help you. When I use your part of code in a small example everthing works fine.

    Please have a look at "contacting support" in the manual:

    .... send the following....

    An example source file which can be compiled in the simulation without any additional files as described in the following.

    Regards,
    Lutz
  • Hi Lutz,

    Thanks for your reply.

    I have attached a source file called Display.c (compressed in Display.zip) which exhibits the icon delete problem I have described. I have use the emwin simulator with CodeBlocks IDE running gcc 4.9.2 on a windows 7 64 bit machine.

    Hope this helps you in helping me.

    Cheers
    Aquib
    Files
    • Display.zip

      (3.98 kB, downloaded 342 times, last: )
  • Hi Lutz,

    Thanks for your response.

    Can you please tell me if it is a problem in the Simulator or in the Emwin library. Will the use of ICONVIEW_DeleteItem() cause problems when used in an embedded system?




    Cheers
    Aquib