SDL_image on MinGW

I’m getting strange segfaults during calls to IMG_Load when using
SDL_image under MinGW on Windows XP. Are there any known problems with
using SDL_image on Windows XP?

As far as I can tell there is no explanation for the segfaults
occurring. It’s almost like SDL_image is writing to a block of memory
it shouldn’t be or something like that.

Ruben Zilibowitz

Ruben Henner Zilibowitz wrote:

I’m getting strange segfaults during calls to IMG_Load when using
SDL_image under MinGW on Windows XP. Are there any known problems with
using SDL_image on Windows XP?

Lots of people seem to be using it just fine.

As far as I can tell there is no explanation for the segfaults
occurring. It’s almost like SDL_image is writing to a block of memory
it shouldn’t be or something like that.

Unfortunately, I don’t think it is possible for anyone on the list
to diagnose or debug your problem given the amount of information
that has been put forward.–
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

As KHMan said, we need more information to help you debug this. A
backtrace and at least one of the images causing the crash would be
very helpful.
-:sigma.SBOn Dec 24, 2007 12:34 AM, Ruben Henner Zilibowitz wrote:

I’m getting strange segfaults during calls to IMG_Load when using
SDL_image under MinGW on Windows XP.

Well it turns out that now the program is segfaulting in another
place, not during a call to IMG_Load so that means this issue is not
relevant to the topic of this mailing list. It crashed during a call
to IMG_Load previously, but now it is not. Running it through gdb it
crashed here:

Program received signal SIGSEGV, Segmentation fault.
0x7c91b3fb in wcsncat () from C:\WINDOWS\system32\ntdll.dll
(gdb) backtrace
#0 0x7c91b3fb in wcsncat () from C:\WINDOWS\system32\ntdll.dll
#1 0x00000098 in ?? ()
#2 0x00240000 in ?? ()
#3 0x00000001 in ?? ()
#4 0x0a4e5c30 in ?? ()
#5 0x0a4e5c30 in ?? ()
#6 0x00000000 in ?? ()
(gdb) quit

I’m not sure what that means so if anyone else does, feel free to let
me know.

Regards,

RubenOn 25/12/2007, at 6:08 PM, Solra Bizna wrote:

On Dec 24, 2007 12:34 AM, Ruben Henner Zilibowitz <@Ruben_Henner_Zilibow> wrote:

I’m getting strange segfaults during calls to IMG_Load when using
SDL_image under MinGW on Windows XP.
As KHMan said, we need more information to help you debug this. A
backtrace and at least one of the images causing the crash would be
very helpful.
-:sigma.SB


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

most likely, you’re passing invalid strings into the wcsncat
function : either null values or unallocated string pointers. Make
sure all your char pointers are assigned null when you declare them,
then set conditional breakpoints on all wcsncat callsOn 25-dec-07, at 12:56, Ruben Henner Zilibowitz wrote:

Well it turns out that now the program is segfaulting in another
place, not during a call to IMG_Load so that means this issue is not
relevant to the topic of this mailing list. It crashed during a call
to IMG_Load previously, but now it is not. Running it through gdb it
crashed here:

Program received signal SIGSEGV, Segmentation fault.
0x7c91b3fb in wcsncat () from C:\WINDOWS\system32\ntdll.dll
(gdb) backtrace
#0 0x7c91b3fb in wcsncat () from C:\WINDOWS\system32\ntdll.dll
#1 0x00000098 in ?? ()
#2 0x00240000 in ?? ()
#3 0x00000001 in ?? ()
#4 0x0a4e5c30 in ?? ()
#5 0x0a4e5c30 in ?? ()
#6 0x00000000 in ?? ()
(gdb) quit

I’m not sure what that means so if anyone else does, feel free to let
me know.

Regards,

Ruben

On 25/12/2007, at 6:08 PM, Solra Bizna wrote:

On Dec 24, 2007 12:34 AM, Ruben Henner Zilibowitz wrote:

I’m getting strange segfaults during calls to IMG_Load when using
SDL_image under MinGW on Windows XP.
As KHMan said, we need more information to help you debug this. A
backtrace and at least one of the images causing the crash would be
very helpful.
-:sigma.SB


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org