[solved] Nuklear "nk_begin" method causing random SIGBUS after a while.

I’m using the nuklear wrapper provided by lwjgl to create a simple GUI. When I start the program, everything works fine (the GUI is completely usable). But after a while the program crashes (SIGBUS) with this log: http://pastebin.java-gaming.org/556732e205310. The relevant code can be found here http://pastebin.java-gaming.org/673e043205818.

Any idea what could cause this?

Change the Font class to hold a reference to the font data buffer (the one loaded with ioResourceToByteBuffer and passed to stbtt_InitFont). The documentation for stb_truetype briefly mentions this:

[quote]The system uses the raw data found in the .ttf file without changing it and without building auxiliary data structures. This is a bit inefficient on little-endian systems (the data is big-endian), but assuming you’re caching the bitmaps or glyph shapes this shouldn’t be a big deal.
[/quote]

Thank you! That seems to have fixed it! ;D