Simulation crashes with custom fonts

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

  • Simulation crashes with custom fonts

    Dear friends,

    I am trying to set up an emWin simulation (under Visual Studio 2010) for a firmware of mine that works fine on the real hardware.
    Unfortunately, every time I try to display some text strings using some custom fonts the program crashes with the message:

    An unhandled exception of type 'System.AccessViolationException' occurred in Startup.exe
    Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    The problem disappears when using one of the standard fonts included in emWin. But of course I need to use my own fonts. These are simple non unicode fonts, made up of 256 symbols, generated through the Font Converter.

    It's worth repeating that such fonts work fine with the embedded version of emWin (version 5.24H for NXP ARM microcontrollers). What then could be wrong with the simulated version? ?(

    Thank you for your attention and for any help you may provide.

    The post was edited 2 times, last by giuseppe ().

  • Hello,

    It's hard to say what might cause the problem. In case you use GUIDRV_Lin, please make sure that the emWin memory (GUIConf.c) is not the same as the frame buffer memory (LCDConf.c). I know it works on the hardware, so it should also work in the simulation, but maybe there is still too few memory in the simulation. In case you read the font from external memory, please check your _GetData() function.

    I hope this is a help for you. If you still experience the problem, please request support at your emWin provider.

    Best regards,
  • The font was generated by Font Converter for emWin version 5.18, whereas the simulation library (emWin_x86.lib) was taken from an updated emWin fox NXP, version 5.24H.
    Could this be the reason :?:


  • Dear Adrian.

    I tried on the LPCware forum. This is the reply I got:

    Suggest you report this to Segger:
    - NXP has no knowledge of, or access to the simulator
    - the Segger guys do not hang out here, so won't know of your problems

    as you can see at this page:…tom-fonts#comment-1143067

    So, I guess I'm stuck here. Please, can you let me know how much will it cost me to get the "direct support from SEGGER" that you talk about?

    Thank you.