Hi Kelvin, I patched the code as you indicated, and the segfaults are gone.
This problem was indeed happening with multiple .cdg files, though I can't say if it applied to them all. Because pykaraoke worked with the same files on x86 without incident, however, I doubt that corrupted/rogue data is the issue. I'll send you a private e-mail re: obtaining the OGG+CDG files in question for testing purposes. --Daniel (Please Cc: any replies to me) On Thu, 2007 Feb 01 00:15:25 +0000, Kelvin Lawson wrote: > Hi Daniel, > > I've been moving house the last couple of weeks so have just got round > to looking into this. > > I originally thought this looked like a sizeof(int) discrepancy > somewhere. I thought perhaps one component (pygame, SDL or _pycdgAux.c) > had been built as 32-bit, or perhaps one of the underlying libraries is > not 64-bit safe in some places. > > Anyway, on looking into it further I see that the row_index value is 378 > (thanks for all the excellent debug info by the way). This is an invalid > index into the array, as the CDG screen width and hence cdgSurfarray[][] > is only max 300. For some reason this line in cdgTileBlockCommon() is > reading an attempt to set pixel offset 378: > > row_index = ((packd->data[3] & 0x3f) * 6); > > CDG rips occasionally contain corrupted bytes, so I could well imagine > that this could happen on the odd CDG file but it sounds like this > probably happens on all files (please correct me if I'm wrong there). > > Whether it's corrupted data or not, we really should be range-checking > the row and column index here anyway. Could you try adding the following > lines in cdgTileBlockCommon() please: > > // 2 lines of current code below > column_index = ((packd->data[2] & 0x1f) * 12); > row_index = ((packd->data[3] & 0x3f) * 6); > > // Enter the following 4 lines > if (column_index > (CDG_FULL_HEIGHT - 12)) > column_index = (CDG_FULL_HEIGHT - 12); > if (row_index > (CDG_FULL_WIDTH - 6)) > row_index = (CDG_FULL_WIDTH - 6); > > If it's rogue data, then hopefully this will fix the seg fault. If it's > not rogue data and somehow we're reading the CDG data out incorrectly, > well we'll find that out. I hope you don't mind trying this out - I do > actually have an AMD64 machine here but unfortunately I can't reproduce > the problem. Perhaps if you could send the offending cdg+ogg files I > could reproduce it. > > Many thanks, > Kelvin. > -- NAME = Daniel Richard G. ## Remember, skunks _\|/_ meef? EMAIL1 = [EMAIL PROTECTED] ## don't smell bad--- (/o|o\) / EMAIL2 = [EMAIL PROTECTED] ## it's the people who < (^),> WWW = http://www.******.org/ ## annoy them that do! / \ -- (****** = site not yet online) ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Pykaraoke-discuss mailing list Pykaraoke-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pykaraoke-discuss