locked
iPhoneOSGameView and memory RRS feed

  • Question

  • User25531 posted

    Hi all

    we've been having some problems with memory warnings in our app in iPhone 4 and 4S. We do a lot of background operations, that "seem" to be stable. After activating and deactivating these tasks, memory seems ok. However, when we create an instance of iPhoneOSGameView for OpenGl rendering and call CreateFrameBuffer there is no turn back with memory warnings. If we create other "heavy" views we don't have problems. If we try Apple's Instruments to profile memory it crashes the app when CreateFrameBuffer is called in both simulater and device

    Any clever ideas?

    cheers

    Thursday, April 17, 2014 2:32 PM

All replies

  • User2589 posted

    The crash is surprising. Can you create a test case and file a bug report for this ?

    Thursday, April 17, 2014 7:05 PM
  • User25531 posted

    Hi Sebastien

    Despite having a very complex code, we'll try to create a simple example. We had some issues like CGImages computed in background left to GC, but now that seems to be quite stable.

    cheers

    Friday, April 18, 2014 12:04 AM
  • User25531 posted

    Hi Sebastien and All

    some more information that you should have in mind with memory management. Memory warnings happened as a consequence of something happening with iOS itself. The device that we use for testing (4S) was throwing a lot o memory warnings after iPhoneOSGameView was added as a sub-view. Today, iOS crashed when i was using Facebook app and after that we were not able to reproduce memory warning scenario anymore. We thought this was happening with all iPhones 4 and 4S, but, in fact, it was only happening on a single device.

    However, something is happening with iPhoneOSGameView. Instruments continues to crash the application. We'll try to file a simple demonstration showing it happening.

    Lesson learned: if you have memory warnings and you are reasonably sure that memory is being well managed, old win 95 reboot strategy seems to work! :)

    cheers and a nice Easter to you all

    Friday, April 18, 2014 11:48 PM