[SDL] Segmentation fault, Switching to Thread
Unga
unga888 at yahoo.com
Tue Sep 20 10:16:31 PDT 2011
--- On Tue, 9/20/11, Ryan C. Gordon <icculus at icculus.org> wrote:
> From: Ryan C. Gordon <icculus at icculus.org>
> Subject: Re: [SDL] Segmentation fault, Switching to Thread
> To: "SDL Development List" <sdl at lists.libsdl.org>
> Date: Tuesday, September 20, 2011, 11:09 PM
>
> > These SDL threads are short lived, creates in probably
> hundreds in very
> > quick succession without any delay in between.
>
> I'm going to gamble that this is your bug. :)
>
> If it's not too much trouble to get it working on FreeBSD,
> you should try running your app under Valgrind. It might
> hide a race condition, but if you simply have a thread
> corrupting memory, it'll likely show you exactly where.
>
> Failing that, you should try taking note of the thread id
> at creation time:
>
> SDL_Thread *thread =
> SDL_CreateThread(blah blah blah);
> /* This Uint32 is "SDL_threadID"
> in SDL 1.3 */
> Uint32 threadid =
> SDL_GetThreadID(thread);
>
> When you crash in the debugger, the line "[Switching to
> Thread XXX (LWP YYY)]" is printed out, and XXX should match
> the threadid of the crashing thread.
>
> --ryan.
>
Hi Ryan
I think this information is good enough for me to locate where the problem is.
But next few days I have bit of traveling, as soon as I'm settle, I'll dig to the bottom of this problem. Pls give me few days.
If anyone is interested to try the latest SDL 1.3 on FreeBSD, may use the attached patch.
Best regards
Unga
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SDL_1_3-FreeBSD8.patch
Type: application/octet-stream
Size: 1108 bytes
Desc: not available
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110920/0f03e1e9/attachment.obj>
More information about the SDL
mailing list