Opened 16 years ago

Closed 16 years ago

#2667 closed bug (invalid)

Loading graphic files in SDL games

Reported by: Begasus Owned by: axeld
Priority: normal Milestone: R1
Component: - General Version: R1/pre-alpha1
Keywords: Cc: haiku@…
Blocked By: Blocking:
Platform: x86

Description

With the latest Haiku builds I'm not able to play games like TuxPaint, blobwars freeciv etc. Problem I get is that it can't open/load a graphic file.

This is been done with freshly compiled Haiku from svn, SDL libs etc compiled myself in Haiku, the ones from haikuports etc .. all with no luck loading the graphic file (or in case of xrick a zip container). Games are compiled in Haiku itself also (and used zips that worked before).

I'll add a file with the crash info over Terminal and a debug output from tuxpaint.

Attachments (4)

Haiku_game_crashes (67.6 KB ) - added by Begasus 16 years ago.
Terminal output + objdump from tuxpaint
objdump.txt (221.4 KB ) - added by begasus 16 years ago.
ld.txt (29.4 KB ) - added by begasus 16 years ago.
SDL_image-1.2.6_haiku.zip (252.9 KB ) - added by begasus 16 years ago.
freshly compiled sdl_image that works (haiku rev29072)

Download all attachments as: .zip

Change History (13)

by Begasus, 16 years ago

Attachment: Haiku_game_crashes added

Terminal output + objdump from tuxpaint

comment:1 by scottmc, 16 years ago

I was able to compile and run pipepanic a few days ago and didn't have any issues with it. Looking at the output for the can't locate file errors, you'll see the path has a in it, that would be your problem right there. Trick is figuring out why it's coming out like that.

/boot/apps/Games/TuxMath//share/tuxmath/images/status/standby.png
121	The Simple DirectMedia error that occured was:
122	No such file or directory

comment:2 by scottmc, 16 years ago

Cc: haiku@… added

comment:3 by bga, 16 years ago

Actually, that works in terminal at least:

mkdir -p xxx/yyy/zzz touch xxx/yyy/zzz/file echo "Test" >> xxx/yyy/zzz/file cat xxx/yyyzzz/file Test

comment:4 by begasus, 16 years ago

I was able to compile the new fillets game in Haiku but still running into the problem of the app not being able to load graphics, see below:

~> /boot/apps/Games/FishFillets/bin/fillets main.cpp:117: ERROR Load; file='/boot/apps/Games/FishFillets/share/games/fillets-ng/images/icon.png'; IMG='No such file or directory'

all small info could lead to where it fails maybe ;)

comment:5 by scottmc, 16 years ago

check and see if there is actually a file in that folder? "/boot/apps/Games/FishFillets/share/games/fillets-ng/images/icon.png" it might be that it's generating the path name wrong? Is this using just SDL or SDL+SDL_image?

in reply to:  5 comment:6 by begasus, 16 years ago

Replying to scottmc:

check and see if there is actually a file in that folder? "/boot/apps/Games/FishFillets/share/games/fillets-ng/images/icon.png" it might be that it's generating the path name wrong? Is this using just SDL or SDL+SDL_image?


The file icon.png is in it's place (as it has been with the other apps), I'm attaching the output of an objdump and an ld ... especialy ld tells me that it can't find the SDL libraries (multiple so not just SDL).

by begasus, 16 years ago

Attachment: objdump.txt added

by begasus, 16 years ago

Attachment: ld.txt added

comment:7 by begasus, 16 years ago

Okay ... seems I've tracked it down to SDL_image library. After a new compilation I managed to get FishFillets running, TuxType, TuxPaint ... all apps that were crashing before with the problem of not being able to load a graphic file. Haven't yet checked xrick but I suspect it being in the same region.

by begasus, 16 years ago

Attachment: SDL_image-1.2.6_haiku.zip added

freshly compiled sdl_image that works (haiku rev29072)

comment:8 by scottmc, 16 years ago

Nice work Begasus. This ticket can be closed as the problem isn't with Haiku. We'll continue the fix for this to get any needed changes fixed upstream in SDL_image.

comment:9 by mmlr, 16 years ago

Resolution: invalid
Status: newclosed

Closing as per feedback.

Note: See TracTickets for help on using tickets.