Hi there, there is an bug in the method:
IGUIFont* CGUIEnvironment::getFont(const c8* filename);
It converts the font's filename to lower case, but it causes an error when loading fonts in linux systems.
Linux is case sensitive, so the filename cannot be converted to lower case.
this problem was already related for the irrlicht 1.3 (thread can be found at http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=20164) and still happening.
CGUIEnvironment::getFont() bug when using linux
-
- Competition winner
- Posts: 78
- Joined: Tue Jul 08, 2008 5:18 pm
- Location: Guarapuava/Brazil
- Contact:
CGUIEnvironment::getFont() bug when using linux
Prof. Andres Jessé Porfirio
Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net
Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net
My favourite bug (the same happens in CGUIEnvironment::getSpriteBank, in CSceneManager::getMesh and in the ITexture constructor).
I had some patch (which I'm using myself since years now), but it wasn't really liked by others (because it does cause other problems): http://www.michaelzeilfelder.de/irrlich ... ower.patch
Thinking about it once more... maybe it would be fine to patch by #ifndef'ing those lines for linux (which will still mess them up on serialization on Windows, but well - it would at least be a little better)? The correct solution is probably not ever changing filenames to_lower but instead only use a case-independent comparison where it's needed. I would do either of those - first improves situation a little - second solves it imho (unless I miss something) except it makes it marginally slower (which shouldn't really matter there. I just don't dare changing it without OK from others, because I did lean myself already a few times too far out of the window when it came to that bug...
I had some patch (which I'm using myself since years now), but it wasn't really liked by others (because it does cause other problems): http://www.michaelzeilfelder.de/irrlich ... ower.patch
Thinking about it once more... maybe it would be fine to patch by #ifndef'ing those lines for linux (which will still mess them up on serialization on Windows, but well - it would at least be a little better)? The correct solution is probably not ever changing filenames to_lower but instead only use a case-independent comparison where it's needed. I would do either of those - first improves situation a little - second solves it imho (unless I miss something) except it makes it marginally slower (which shouldn't really matter there. I just don't dare changing it without OK from others, because I did lean myself already a few times too far out of the window when it came to that bug...
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Yes, the final solution would be to use the proper comparisons to make the path traversal and lookup the same on each system. This needs some clarification on search order and priorities, though. If you think that the ifdef should go in sooner just mark it as being temporary by a comment and a TODO hint.