| Summary: | SDL_DisplayYUV_SW() crashes with segment fault | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Fei Rao <rao.fei> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED WORKSFORME | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P1 | ||
| Version: | don't know | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
The following information is the back trace of core file:
(gdb) bt
#0 0x00f9f567 in SDL_DisplayYUV_SW (_this=0x8c32580, overlay=0x8c48c50, src=0xbf920d74, dst=0xbf920d6c)
at ./src/video/SDL_yuv_sw.c:1251
#1 0x00f9d944 in SDL_DisplayYUVOverlay (overlay=0x8c48c50, dstrect=0xbf920db4) at ./src/video/SDL_yuv.c:126
Can you post a link to the crashing program and the data and steps needed to reproduce the crash? The debug data might be a red herring. Are you debugging this in cygwin on Windows? The values are all wrong, which means either gdb isn't getting the right values or you have memory corruption going on. The fact that the numbers 800 and 600 do appear in the gdb output makes me think that there's some alignment problem. Do you know if that's the exact line it's crashing on? Bumping some bugs' priorities to P1 for consideration before the 1.2.12 release (though some may not be resolved for 1.2.12). --ryan. Any update on this? We're at the last minute for 1.2.12 bug fixes. This hasn't been updated in a couple years. Please reopen this if it's still active in 1.3. |
The problem is quite strange because the results differ from the way i run my program... When running on Fedora Core 5 box(local GNOME desktop), my program works well. When running it in CygWin/X session (remote GNOME desktop), the program crashes. After some debug work, finally i got the following information: Breakpoint 5, SDL_DisplayYUV_SW (_this=0x8c32580, overlay=0x8c48c50, src=0xbf920d74, dst=0xbf920d6c) at ./src/video/SDL_yuv_sw.c:1177 1177 swdata = overlay->hwdata; (gdb) n 1180 if ( src->x || src->y || src->w < overlay->w || src->h < overlay->h ) { (gdb) display *swdata->display 9: *swdata->display = {flags = 147096168, format = 0x16, w = 93, h = 0, pitch = 11544, pixels = 0x2c00002, offset = 46137346, hwdata = 0x5, clip_rect = {x = 24, y = 0, w = 600, h = 0}, unused1 = 800, locked = 0, map = 0x0, format_version = 0, refcount = 0} Please pay attention to the flags and offset members of swdata->display. The offset is almost 46 MB! i just think it's impossible. If the information is not clear enough, please contact me at rao.fei@aricent.com