lpcware

emWin simulation crashes with custom fonts

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by SeleneSW on Thu Jan 22 09:19:15 MST 2015
Dear friends,

I am trying to set up an emWin simulation (under Visual Studio 2010) for a firmware that works fine on the real hardware, based on the LPC1788.
As to the simulated version, no problem in changing colour to the screen, or drawing rectangles, but unfortunately, as soon as I try to display some text strings using some custom fonts the program (named Startup.exe) 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 prebuilt standard fonts, embedded 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 for emWin 5.18.

It's worth repeating that my 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.

Outcomes