The seg fault is the bmp variable file size. You need to change it to a larger number. I can't remember which line it was. I'll take a look again
Take a look at this thread I made a while back. The icons I believe are still BMP format. This thread was about creating custom icons
https://www.mobileread.com/forums/sh...d.php?t=355521