Deleting LISTBOX gets an error message from emWin ErrorOut

  • Today I set GUI_DEBUG_LEVEL as 3, and implement the function GUI_X_ErrorOut().

    And I found calling WM_DeleteWindow(_hListbox) causes an error message:

    GUI_Alloc.c:Block to be deleted is already locked in _Free().

    Why this came out? Any ideas?
    By the way, I used LISTBOX_SetOwnerDraw().

  • Update: the error message is gone if not calling LISTBOX_EnableWrapMode().

    But actually it is needed.
    So, what should I do to eliminate this error?
    My emWin version is: v5.44b, using FreeRTOS.

  • Hi,

    I was able to reproduce this with version 5.44b. With the current version 5.48 it is solved.

    Since you got the source code of emWin you can simply add the line below into the function body of LISTBOX_EnableWrapMode() right before the call of GUI_UNLOCK().

    Add this:
    GUI_UNLOCK_H(pObj);

    Regards,
    Sven

    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!