Ticket #336 (defect)

Opened 2 years ago

Last modified 2 years ago

PSP crash on images bigger than 512 pixel

Status: closed (wontfix)

Reported by: pspuser Assigned to: fraca7
Priority: major Component: psp2d
Version: current Keywords: image size 512 crash
Cc:

I played around with the blit parameters and found a weird behaviour. If you work with aimage (surface) bigger than 512 pixel the PSP will crash. You even dont need to blit that big image directly to the screen. It also will crash if you cut a part out that image and try to blit it on the screen:

screen = psp2d.Screen() python = psp2d.Image('python.png') # Lets say the image has a size of 50*50 pixel big_img = psp2d.Image(520,272) # Create surface bigger than 512 pixel big_img.blit(python,0,0,-1,-1,0,0,True) # Copy the small image (python.png) into the big image screen.blit(big_img,0,0,50,50,-1,-1,True) # PSP2D doesnt like that -> crash screen.swap()

Altough only 50 pixel are copied out of the big image for blitting them onto the screen it still crashes. What I expected, based on the code, the image python should be displayed at pos 0,0 on the screen. If you change the widh of big_img to 512 pixel it works fine (no crash on PSP). Together with this I found out that any image bigger than 512 pixel blitted on the PSP screen or any image positioned in a way that 512 pixel are exceeded the PSP will crash. (No idea yet what the y-range or negative x/y limit range is to make PSP crash that way). You need to try this example out of the PSP because it works fine on the PC PSP2 Dev kits. Regards Tyger

Change History

01/27/07 11:22:42: Modified by fraca7

  • status changed from new to closed.
  • resolution set to wontfix.

This isn't exactly a bug. For performance reasons, images are actually textures; on the PSP, textures can't be bigger than 512px. I don't know if it's worth the work needed to hack around this limitation.

01/27/07 12:02:33: Modified by fraca7

  • status changed from closed to reopened.
  • resolution deleted.

Actually, this shouldn't happen, or the fonts wouldn't work.

01/27/07 12:46:41: Modified by fraca7

  • status changed from reopened to closed.
  • resolution set to wontfix.

Okay, the crash should only happen when you're blitting to the screen, from an image with some dimension > 512px, with alpha blending enabled. This is because in this case, libpsp2d uses the GU to do the blit, and textures cannot be bigger than 512px.