0

Running Cocos2d, I will occasionally see a random texture appear at (0,0), scaled way up. Like this:

enter image description here

It is blurry because it is scaled up. It's not supposed to be there at all. Often it is accompanied by "swapBuffers" errors:

com.apple.main-thread Crashed
0    libGPUSupportMercury.dylib  gpus_ReturnNotPermittedKillClient
1    libGPUSupportMercury.dylib  gpusSubmitDataBuffers
2    IMGSGX543GLDriver   SubmitPackets
3    GLEngine    gliPresentViewES
4    OpenGLES    -[EAGLContext presentRenderbuffer:] + 64
5    MyApp  CCGLView.m line 275
-[CCGLView swapBuffers]
6    MyApp  CCDirectorIOS.m line 174
-[CCDirectorIOS drawScene]
7    MyApp  CCDirectorIOS.m line 532
-[CCDirectorDisplayLink mainLoop:]
8    QuartzCore  CA::Display::DisplayLinkItem::dispatch() + 98
9    QuartzCore  CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 344
10   IOMobileFramebuffer     IOMobileFramebufferVsyncNotifyFunc + 104
11   IOKit   IODispatchCalloutFromCFMessage + 248

I am not using any custom shaders or anything. Just regular CCSprites created by CCSprite spriteWithTexture. Sometimes textures will just appear on the screen and get stuck there.

I know this is difficult to debug, as I can't point to any part of the code that causes this because it happens at random. But I'm hoping someone has seen this weird texture issue before and might be able to offer some advice on some things to check.

genpfault
  • 51,148
  • 11
  • 85
  • 139
soleil
  • 12,133
  • 33
  • 112
  • 183
  • hmmm ... actually this is the third time today that that swapBuffers CCGLView method is involved in a question here today. I'm guessing cocos2d 2.+ with iOS7 ? – YvesLeBorg Oct 08 '13 at 18:31
  • device or simulator? which device? – CodeSmile Oct 08 '13 at 18:52
  • Device. I've seen it happen on iPad4, iPad mini, iPhone5, iPod4. It's not constrained to iOS7. Cocos2d v2.1-rc0a – soleil Oct 08 '13 at 19:09
  • Arghhh ... are you saying this also happens on devices with iOS 6 and less ? What version of xcode are you using please. – YvesLeBorg Oct 08 '13 at 19:52
  • Yes, this has happened for many months as I've built the app. It's the last bug preventing me from shipping. Currently using Xcode 5, but happened on 4 as well. – soleil Oct 08 '13 at 20:16
  • I'm having trouble with the same line. After all it indeed does not seem to be related only to iOS7 http://stackoverflow.com/questions/19285704/crash-if-backgrounding-cocos2d-2-1-app-in-ios7-while-watching-game-center-screen Still I can reproduce my crash everytime with iOS7 and game center screens. – Jonny Oct 10 '13 at 03:27
  • "gpus_ReturnNotPermittedKillClient" kind of sounds like something made a bad move to the GPU and the app is killed. The reasons might be varied and not interrelated but it all halts at CCGLView.m line 275. – Jonny Oct 10 '13 at 06:12
  • did you found the answer to this one ? – franck Mar 31 '14 at 10:08

0 Answers0