project-navigation
Personal tools

Author Topic: Gentoo SDL_image error notes  (Read 6351 times)

Offline gravy21

  • Cannon Fodder
  • **
  • Posts: 6
    • View Profile
Gentoo SDL_image error notes
« on: November 29, 2010, 04:01:43 pm »
After installing the ufo-ai-2.3 from portage, I kept getting signal 11 with the following stacktrace:

SDL_image version 1.2.8
Could not load environment map 0
FS_RemoveFile: remove /home/xxxxx/.ufoai/2.3/base/keys.cfg
/usr/share/games/ufoai/ufo(Sys_Backtrace+0x15)[0x56cf95]
/usr/share/games/ufoai/ufo(Sys_Error+0x77)[0x56d767]
/usr/share/games/ufoai/ufo(Com_Error+0x129)[0x507609]
/usr/share/games/ufoai/ufo(R_InitImages+0x18d)[0x53fc8d]
/usr/share/games/ufoai/ufo(R_Init+0x11cf)[0x54458f]
/usr/share/games/ufoai/ufo(CL_Init+0x134)[0x4388c4]
/usr/share/games/ufoai/ufo(Qcommon_Init+0x38e)[0x507eee]
/usr/share/games/ufoai/ufo(main+0x1e)[0x56ccde]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7ffff55aad2d]
/usr/share/games/ufoai/ufo[0x429b49]
Error: Shutdown

My first thought that my SDL config was hosed when I saw SDL_image version 1.2.8, which is not installed (I had 1.2.10). I ran a revdep-rebuild on my SDL packages to make sure none were compiled against an old version of SDL_image. Once that was done, I restarted ufo-ai and got the same error.

I noticed that there was an update in portage for sdl-image (to version 1.2.10-r1). After updating, I re-ran and the game loaded up perfectly. As a test, I downgraded to sdl-image-1.2.10 and received the same stacktrace as before.

After downgrading, I reinstalled my SDL packages and ran a revdep-rebuild to make sure I didn't miss any mismatches. I ran some other SDL games to verify they worked, but I still got the stacktrace. After upgrading SDL_image to 1.2.10-r1, it started working again.

After a lot of back and forth trying to proved the solution, I just keep coming back to the same point. For now I am going enjoy the game (since I found what works for me), and hopefully if someone has a similar problem this will help them out.

Notes:
- I did not file a bug because I have not really put this through the ringer, and never for sure determined it was a problem specific to me.
- I received a warning that I had a libPNG mismatch (1.2 vs 1.4). Anyone who has been using Gentoo lately has probably run into this with other packages. Still get the error while the game is working though.
- I suppose it's possible that SDL_image 1.2.10 is not linking to libPNG 1.4 properly, but the reinstall should have fixed that, and other games that I think are using libSDL-image.so seem to be ok...
- If it comes down to an SDL_image requirement for sdl-image-1.2.10-r12, then the ebuild needs to be updated to reflect (current dependency is just sdl-image version unspecified)
- It is entirely possible this is a SDL configuration problem, a version mismatch, or even a compile vs runtime mismatch. revdep-rebuild should have solved that, but it is possible.
- Searching this forum for my error I noticed stacktraces here and there that looked like they cascaded from game startup through InitImages.  The InitImages is what led me to check libSDL installation. Maybe checking the SDL installation if the #1 video card drivers, and #2 xorg.conf suggestions don't pan out is a good suggestion, maybe it's Gentoo specific, or maybe it was just my box. Who knows...

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Gentoo SDL_image error notes
« Reply #1 on: November 29, 2010, 05:48:38 pm »
you don't have all the needed data files:

Quote
Could not load environment map 0

this should should be in the base/pics/envmaps directory named envmap_0.png

but i suppose that if this file is missing, there are more files missing. so i would say this is a bug in the gentoo package

Offline gravy21

  • Cannon Fodder
  • **
  • Posts: 6
    • View Profile
Re: Gentoo SDL_image error notes
« Reply #2 on: November 29, 2010, 07:39:28 pm »
you don't have all the needed data files:

this should should be in the base/pics/envmaps directory named envmap_0.png

but i suppose that if this file is missing, there are more files missing. so i would say this is a bug in the gentoo package


Yup, envmap_0.png is not on the disk. I guess gentoo uses a /usr prefix for install, which gives me a /usr/share/games/ufoai/base directory. The only items in this folder are .pk3s, a game.so and what looks like a language folder. I am going to check the tarball that portage downloaded and see if it has everything. What screen would be loading envmap_0.png? At the moment (without the file) I am loading the game and, other than the train screenshot, what I'm seeing looks like the otherscreenshots. I haven't played with it enough to see if everything is working correctly, though.

Offline gravy21

  • Cannon Fodder
  • **
  • Posts: 6
    • View Profile
Re: Gentoo SDL_image error notes
« Reply #3 on: November 29, 2010, 07:43:32 pm »
portage is grabbing a ufoai-2.3-data.tar and a ufoai-2.3-source.tar.bz2. Looks like the data tarball is what is going into that base directory. No file / folder with envmap in either tarball.

I'll look at the 2.3 source when I get a chance later. Maybe the ebuild is hosed.
 

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Gentoo SDL_image error notes
« Reply #4 on: November 29, 2010, 07:52:55 pm »
the pk3 files are zip files - they might also contain the file - but the qeustion is, are they loaded? see ufoconsole.log

Offline gravy21

  • Cannon Fodder
  • **
  • Posts: 6
    • View Profile
Re: Gentoo SDL_image error notes
« Reply #5 on: November 29, 2010, 08:08:41 pm »
K. after work I will check it out.

Offline gravy21

  • Cannon Fodder
  • **
  • Posts: 6
    • View Profile
Re: Gentoo SDL_image error notes
« Reply #6 on: November 30, 2010, 01:56:17 pm »
The 0pic.pk3 has the pics tree with envmaps/envmap_0.png in it. I assumed these were unpacked at runtime, but since I may have had an libSDL_image problem it wasn't loading it. Should they have been unpacked during install (maybe an ebuild problem)?

After the libSDL_image upgrade I don't get the envmap_0.png message. The only thing I see in the ufoconsole.log that stands out is:
- Every time it tries to load a sound it can't find xxx/yyy and then the next line is "S_LoadSound: there are 0 joysticks available"
- A couple times it says "SDL ttf version 2.0.9 - we need at least 2.0.7"

Sound isn't working yet (I'll look into it), but everything else seems ok.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Gentoo SDL_image error notes
« Reply #7 on: November 30, 2010, 01:59:12 pm »
Should they have been unpacked during install (maybe an ebuild problem)?

No.

-geever

Offline gravy21

  • Cannon Fodder
  • **
  • Posts: 6
    • View Profile
Re: Gentoo SDL_image error notes
« Reply #8 on: November 30, 2010, 02:34:19 pm »
I didn't think so. I have a barebones gentoo snapshot that doesn't have hardly anything on it. I will do a targeted install with the version of libSDL that I had a problem with before and see if it works. That should nail that down to a SDL mismatch or library version problem. That will probably be later tonight.

BTW - Thanks for the support. I hope you guys realize I am not trying to pin this on the game (hence no bug report). From the start I was more leaning towards this being a library or package management problem. The only reason I posted it here is that with every Gentoo versioning problem I have, there are tons of other people who end up in the same situation. Continuous upgrades, libraries going obsolete, and compiling from source tends to lend itself to these situations.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Gentoo SDL_image error notes
« Reply #9 on: November 30, 2010, 11:00:42 pm »
please post the whole ufoconsole.log - the pk3 loading should be printed at the start - if not, there should be search paths printed - check that your pk3 files are really in those paths at the top of the console output (resp. ufoconsole.log)