Program hang at GUI_Exec1()

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

    • Program hang at GUI_Exec1()

      Hi,

      We are testing a GUI application created using emWin(v6.26c)/Appwizard on a Renesas RX65N-based board .
      The program freezes at GUI_Exec1() and we don't know the reason why.

      The GUI application itself has no problem using the windows simulation environment (compiled using Visual Studio 2022).
      The MaxUsedBytes for this application shows around 25KB for the simulation environment.
      The Renesas RX65N-based board configuration is set to use(EMWIN_GUI_NUM_BYTES) 40KB for emWin and the MaxUsedBytes was around 24KB just before the hang.

      Can someone give me any idea how to investigate this problem?

      Thanks.

      Best Regards,
      Rowel
    • Hi.

      I received the following backtrace information from an engineer working with the project.

      ---
      _$_RemoveHoles()
      _$s_a_memory$1() /* function pointer? */
      _$s_a_memory$1() /* function pointer? */
      0x01
      GUI_ALLOC_GetFixedBlock()
      GUI_LANG_GetTextEx()
      <application function>
      APPW_ProcessActions()
      WM_OBJECT_WINDOW_cb()
      ---

      Anyone have any idea?

      Best Regards,
      Rowel
    • Hi.

      We implemented the Bus Error Interrupt routine to handle invalid memory access.

      From a different screen (so maybe this is from a different cause), we had the following backtrace.
      ---
      bus_error_isr()
      GUI_ALLOC_LockH()
      GUI_MEMDev_Delete()
      WM_InvalidateDrawAndDescs()
      WM_invalidateRect()
      ---


      As with the previous backtrace, the issue cannot be reproduced 100%. Sometimes it works, sometimes it doesn't.
      I hope someone can give me a hint. Thank you very much.

      Best Regards,
      Rowel
    • Hi.

      It looks like this memory related program crash (hard fault) has finally been fixed.
      For the sake of those that may encounter the same problem, we now have a stable system by changing the GUI_LANG_GetText() calls into GUI_LANG_GetTextBuffered() calls.
      We have a limited (640K internal) memory but a lot of text resources, and GUI_LANG_GetText() seems to be eating the remaining memory.

      Best Regards,

      Rowel