Segfault with newest download from HIB4.

Nuli
Junior Line Supervisor
Junior Line Supervisor
Posts: 12
Joined: Thu Dec 15, 2011 6:41 pm

Segfault with newest download from HIB4.

Postby Nuli » Fri Dec 16, 2011 8:18 pm

On 64bit openSuSE 11.3 I get a segfault when hitting the "deploy" button.

Failed to allocate :
size : 22370304 bytes
alignment : 1024 bytes
domains : 4
Segmentation fault


#0 0x00007ffff22f9320 in radeon_bo_map () from /usr/lib64/libdrm_radeon.so.1
#1 0x00007ffff254983e in ?? () from /usr/lib64/dri/r300_dri.so
#2 0x00007ffff2549a97 in ?? () from /usr/lib64/dri/r300_dri.so
#3 0x00007ffff254a23c in ?? () from /usr/lib64/dri/r300_dri.so
#4 0x00007ffff254b095 in ?? () from /usr/lib64/dri/r300_dri.so
#5 0x00007ffff25b2773 in ?? () from /usr/lib64/dri/r300_dri.so
#6 0x000000000076635a in D3DXCreateTextureFromFileEx(IDirect3DDevice9*, char const*, unsigned int, unsigned int, unsigned int, unsigned int, _D3DFORMAT, _D3DPOOL, unsigned int, unsigned int, unsigned int, void*, void*, IDirect3DTexture9**) ()
#7 0x00000000004e719e in D3DEngine::CreateTexture(char*, char*) ()
#8 0x00000000004e769f in D3DEngine::FindTexture(char*, char*, bool) ()
#9 0x00000000004e7926 in D3DEngine::CreateTextureOnDemand(char*) ()
#10 0x00000000004e7c5b in D3DEngine::GetTexture(char*) ()
#11 0x00000000004edc64 in CTexturedSprite::SetTexture(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
#12 0x00000000006f23bb in GUI_DeploymentMap::PostInit() ()
#13 0x00000000005fb7c9 in GUI_DeploymentGUI::Activate() ()
#14 0x00000000006280d4 in Game::SetGameMode(Game::GAMEMODE) ()
#15 0x00000000005d5c42 in GUI_ScenarioDetails::Select(long) ()
#16 0x000000000066d6c9 in GUI_ButtonBase::CheckClick(float, float) ()
#17 0x0000000000604dbe in GUIButtonList::CheckClick() ()
#18 0x000000000068e65d in GUI_WindowBase::CheckClick(float, float) ()
#19 0x00000000006b56f3 in GUI_WindowManager::CheckClick() ()
#20 0x00000000005410b7 in GUI_ChooseScenario::CheckClick() ()
#21 0x00000000006b486b in WinMain(void*, void*, char*, int) ()
#22 0x00007ffff4b1ab7d in __libc_start_main () from /lib64/libc.so.6
#23 0x00000000004e16b9 in _start ()


I made a new post because this doesn't seem to be related to the segfault I was seeing on a 32bit system.
User avatar
urkle
Supreme Robot
Supreme Robot
Posts: 130
Joined: Thu Dec 15, 2011 2:27 pm
Contact:

Re: Segfault with newest download from HIB4.

Postby urkle » Fri Dec 16, 2011 9:44 pm

Wow, 22M !! How much ram do you have on your computer? How much in your video card?

I'm going to check which texture is being allocated there that needs 22MB of ram. (BTW. that crash is IN your video card driver)
Developing away on one of
Mac Pro Dual 2Ghz, 14GB RAM, Snow Leopard, nVidia 8800 512MB.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
Nuli
Junior Line Supervisor
Junior Line Supervisor
Posts: 12
Joined: Thu Dec 15, 2011 6:41 pm

Re: Segfault with newest download from HIB4.

Postby Nuli » Fri Dec 16, 2011 9:52 pm

BTW. that crash is IN your video card driver


Yup, the ATI driver has always been a flaky beast.

Wow, 22M !! How much ram do you have on your computer? How much in your video card?


I've got 2Gb of ram in the machine. Not sure how much is on the card but I routinely run games, mostly ones I've written, that consume almost all of that ram. I don't believe I've ever tried to allocate a texture 22M in size though. I think all of my textures stay under 10M and I don't think I have many over 4M. Depending on how you're allocating I know the version of OpenGL that shipped with this driver wouldn't allocate a texture much over 16M. If I remember right the max size I could get out of it was 2048x2048.
User avatar
urkle
Supreme Robot
Supreme Robot
Posts: 130
Joined: Thu Dec 15, 2011 2:27 pm
Contact:

Re: Segfault with newest download from HIB4.

Postby urkle » Fri Dec 16, 2011 10:14 pm

Nuli wrote:I've got 2Gb of ram in the machine. Not sure how much is on the card but I routinely run games, mostly ones I've written, that consume almost all of that ram. I don't believe I've ever tried to allocate a texture 22M in size though. I think all of my textures stay under 10M and I don't think I have many over 4M. Depending on how you're allocating I know the version of OpenGL that shipped with this driver wouldn't allocate a texture much over 16M. If I remember right the max size I could get out of it was 2048x2048.


What resolution are you running the game at? (check your ~/.positech/GSB/prefs.ini ) And which scenario were you trying to deploy on when that happened?

From tracing through backtrace you gave me, it looks like it's crashing when loading the backdrops.. (see data/bitmaps/backdrops/) and those are all 2048x2048.
Developing away on one of
Mac Pro Dual 2Ghz, 14GB RAM, Snow Leopard, nVidia 8800 512MB.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
Nuli
Junior Line Supervisor
Junior Line Supervisor
Posts: 12
Joined: Thu Dec 15, 2011 6:41 pm

Re: Segfault with newest download from HIB4.

Postby Nuli » Fri Dec 16, 2011 10:18 pm

urkle wrote:What resolution are you running the game at? (check your ~/.positech/GSB/prefs.ini ) And which scenario were you trying to deploy on when that happened?


The resolution was 1024x768 and windowed. The actual monitor resolution is only 1280x1024 though I am running two monitors. This was the first time I installed the game on this machine so it was just the tutorial scenario.
User avatar
urkle
Supreme Robot
Supreme Robot
Posts: 130
Joined: Thu Dec 15, 2011 2:27 pm
Contact:

Re: Segfault with newest download from HIB4.

Postby urkle » Fri Dec 16, 2011 10:40 pm

Nuli wrote:
urkle wrote:What resolution are you running the game at? (check your ~/.positech/GSB/prefs.ini ) And which scenario were you trying to deploy on when that happened?


The resolution was 1024x768 and windowed. The actual monitor resolution is only 1280x1024 though I am running two monitors. This was the first time I installed the game on this machine so it was just the tutorial scenario.


Oh, so, when the game first started what resolution did it start at?? (I added a fix in the last build to not try and span BOTH monitors).

And since you are savvy with OpenGL this is the EXACT code being run there.

glTexImage2D(texID, 0, img->BytesPerPixel, img->w, img->h, 0, format, GL_UNSIGNED_BYTE, img->pixels);
BytesPerPixel would be 3 for the JPG that is being loaded, and format would be GL_RGB.
Developing away on one of
Mac Pro Dual 2Ghz, 14GB RAM, Snow Leopard, nVidia 8800 512MB.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
Nuli
Junior Line Supervisor
Junior Line Supervisor
Posts: 12
Joined: Thu Dec 15, 2011 6:41 pm

Re: Segfault with newest download from HIB4.

Postby Nuli » Fri Dec 16, 2011 10:43 pm

urkle wrote:Oh, so, when the game first started what resolution did it start at?? (I added a fix in the last build to not try and span BOTH monitors)


When it first started it came up with 1024x768 but it did whack my second monitor. I had to restart X to get it back. Subsequent runs kept the resolution but I placed it in windowed mode so it didn't damage X again. It had the same segfault in either case but I didn't have gdb attached until I put it in windowed mode.
Nuli
Junior Line Supervisor
Junior Line Supervisor
Posts: 12
Joined: Thu Dec 15, 2011 6:41 pm

Re: Segfault with newest download from HIB4.

Postby Nuli » Fri Dec 16, 2011 10:50 pm

urkle wrote:And since you are savvy with OpenGL this is the EXACT code being run there.

glTexImage2D(texID, 0, img->BytesPerPixel, img->w, img->h, 0, format, GL_UNSIGNED_BYTE, img->pixels);
BytesPerPixel would be 3 for the JPG that is being loaded, and format would be GL_RGB.


I just had a chance to look at that and it seems like 22M would be a very large size image in this case. Where is it getting the width and height information? And is there any chance I can poke at those values with gdb and let you know what they are in my case?

Return to “Linux Support”

Who is online

Users browsing this forum: No registered users and 1 guest