Comment 7 for bug 1296684

Revision history for this message
Balassa Máté (balassa-mm) wrote :

I have separated the bug (in the most recent source, not that of the package):
It is caused by the native libgdiplus, which (as confirmed by http://stackoverflow.com/questions/7915646/isolating-unmanaged-crashes-under-mono) causes crashes if it encounters an image it can't load.
All images are in the package openbve-data.
I was able to run openBVE with the function LoadImage always returning null. There were no pictures in the menu, but it wored fine.

Then, I replaced the function, so it would print the name of the image before loading it. This way, I was able to narrow down the crash to these two image files:
Data/Menu/icon_parent.png
Data/Menu/icon_folder.png

Upon loading them in GIMP, I realized the source of the error: the images are in indexed color. So, I converted the image to RGB color, exported it, and magically, the game worked.

Therefore, I conclude that this is not an error with openBVE, but rather a bug in GDIPlus. I am attaching the fixed images below, for someone to patch the openbve-data project.