Skip to main content
GameDev.net gamedev.net
🔒 Locked

SDL in Windows

Started by athos_musketeer Dec 12, 2002 at 11:01 PM 4 replies 400+ views
Original Post
athos_musketeer
athos_musketeer
i''m making a game in SDL. it compiles ok. abd it runs ok in my pc. but when i ran it on others pc.. it hangs.. and a segmentation fault problem appears.. if the code its exaclty the same. why it happens?? thanks a lot for asking.
venomous3d
venomous3d
Send me your exe, Id like to give it a test. I havent had any problems so far, that is with other peoples computer and consistancy. Are you liking SDL so far? Im finding it a easy alternative to get into graphics programming, and eventually to DirectX.

Regards,

Tyler
necromancer_df
necromancer_df
perhaps you are trying to load data files (such as textures and the like) that aren''t on their machines or are in the wrong directory (perhaps you used absolute paths) and didn''t check to see if they were loaded properly or not? there really are many things that could cause a segmentation fault but that''s all that springs to mind based on what you describe. i doubt that it is a problem to do with sdl though.
SabreMan
SabreMan
quote:
Original post by athos_musketeer
why it happens??

Which way was the wind blowing when it crashed?
keethrus
keethrus
i doubt its a problem with SDL, its been around for a while and i feel its very reliable. the problem described is probably a pointer problem, like trying to access memory outside the bounds of allocated memory or something. (its happened to me) make sure you have adequate error checking in your code. to be paranoid (but yet catch errors easier), i usually do "printf"s after a lot of happenings in my code, especially when im still making sure it all works. (and flush stdout right after, for if you dont the error could prevent all output to be placed into the "stdout.txt" file which would cause stdout.txt to not be much helping realize what exactly the error is coming after)

when it crashes, just check the "stdout.txt" file and see what the last thing your program tried to do...

- jeremiah

inlovewithGod.com
athos_musketeer
athos_musketeer
thanks guys...
keetrus.. you are right it''s not a problem with SDL.. SDL is great.. the problem is the speed with the others computers..

i think i fixed the problem..

the mistake was to first write in the screen and second check if it was off the screen.. jajajaj!!

because i''m using a time_scale variable to run even in all computers.. in some slow computers it crash ...

pd: sorry my english.
pd2: thanks a lot to all

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.