Re: [HELP] SDL Segmentation |
Re: [HELP] SDL Segmentation |
John Popplewell
Guest
|
On Sun, Jan 08, 2006 at 10:24:27PM +0000, Ivan wrote:
Hi Ivan, You're overriding the C-Library function read() with an incompatible one of your own! Try changing it to read_model() or something, Good Luck! John Popplewell. |
|||||||||||||||||
|
Re: [HELP] SDL Segmentation |
David Olofson
Guest
|
On Sunday 08 January 2006 23:24, Ivan wrote:
Coincidence. Two things happen when you init SDL: 1) Code changes and moves around, so things that slips through otherwise doesn't, and vice versa. 2) SDL catches the segmentation fault, so it has a chance of closing the display and stuff. (Certain platforms will sometimes kill the display, or worse, if an application dies without closing it's fullscreen display...) That is, when not initializing SDL, your code somehow manages to get away with illegal memory accesses (ie they hit some unused memory area, as opposed to hitting unmapped addresses) - or it would have crashed anyway; it would just have been handled by the operating system instead of SDL. Try adding SDL_INIT_NOPARACHUTE to SDL_Init() to have a normal crasch instead, or more interestingly, allow a debugger to trap the segfault. //David Olofson - Programmer, Composer, Open Source Advocate .------- http://olofson.net - Games, SDL examples -------. | http://zeespace.net - 2.5D rendering engine | | http://audiality.org - Music/audio engine | | http://eel.olofson.net - Real time scripting | '-- http://www.reologica.se - Rheology instrumentation --' |
|||||||||||||||||||||
|
Re: [HELP] SDL Segmentation |
Ivan
Guest
|
Thanks to all of you ^_^,
Ryan,John,David. I'm sorry for the stupid questions that i've asked ^_^, I'm only a little n00b... hghghghgh, anyway now i know where i was wrong, really really thanks ^_^ (i'm really really sorry for my english .... again) Bye, Ivan |
|||||||||||
|
Re: [HELP] SDL Segmentation |
Ivan
Guest
|
Justin Coleman <jmcoleman <at> gmail.com> writes:
anyway, i was looking around for tutorial to read obj files and i've seen that *, NeHe in a tutorial use something like my function, maybe (as someone has advised) the problem is the overriding of the function read(). *The link: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=25 i'll try and i'll let you know thanks again, Ivan |
|||||||||||||||||||
|