shawwn / noh

An open source implementation of Icefrog's DotA, with a pretty amazing engine. Builds in 3 minutes flat; cross-platform.
200 stars 32 forks source link

Game does not render text #5

Closed veigaribo closed 1 year ago

veigaribo commented 1 year ago

I thought I'd try this project to see what it is about but in my main menu there is no text:

image

Also, if I click in the area where one is supposed to put their username, the game crashes with a segmentation fault.

I can see that the call to CResourceManager::LookUpName here https://github.com/shawwn/noh/blob/66c8c407ef9df07704d551c5c2e6b4f007610e06/src/k2/c_textbox.cpp#L49

is returning 0xffffffff, i.e. INVALID_RESOURCE. And then m_pFontMap gets set to null. This happens when trying to load "dyn_12". I'm not sure where that is supposed to live.

That causes the call to CFontMap::GetCharMapInfo here https://github.com/shawwn/noh/blob/66c8c407ef9df07704d551c5c2e6b4f007610e06/src/k2/c_textbox.cpp#L421

to be called on a null pointer. The attempt to access m_uiCharacterRanges then causes the segmentation fault.

I can send the crash log if that would be useful. I'm on Ubuntu 22.04.3 and I built the project following the steps in the README.

veigaribo commented 1 year ago

That was happening because I had a ~/.Heroes of Newerth/game/startup.cfg setting host_language to "en 0" that I probably got from Kongor.

I removed the directory and this seems fine now.