GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Hotfix: 0.10.2 - Binary update 1 - Memory improvements

2»

Comments

  • ChirpinGamesChirpinGames Posts: 214Member, PRO
    Great news! Any before and after stats you can share with us?
    Thanks team!
  • natzuurnatzuur Posts: 304Member
    Xcode instruments "Activity Monitor" shows maybe a 2-5% reduction in mem usage from 10.2 base to 10.2b for me, and still roughly double 10.1. I am still getting memory low warnings after changing scenes a few time (compounds each scenes consumption upon itself for each change scene) at which point it dumps half the memory lag spikes and then works fine for 10-15 minutes at a lower memory consumption (roughly half) and then crashes randomly (my guess is the null pointers). So still waiting for 10.2c. Keep in mind this is only my personal experience on a single large project. It could be more significant of an improvement for some project/people obviously.
  • slinky1988slinky1988 Posts: 89Member, PRO
    Hey guys, here are some problems I've encountered so far -

    -After updating, some of my sound files are giving out echoes
    -My app has become noticeably unstable with random 2-3 second pauses before continuing its tasks after spawning an actor. I've also managed to crash my file twice.

    My last file was created with version 10.1 and everything was fine - these problems were non existant.

    On a positive note, loading times have been reduced from 8 secs to 4/5 secs. Nice.






    Bom Chicka Wah Wah

  • SaladStraightShooterSaladStraightShooter Austin, TxPosts: 3,081Member, Chef Emeritus
    @Natzuur - we're introducing some changes in the next binary update that should address the issues you're having - hopefully including the crash you're experiencing. See the @Codewizard update for more information!

    Why do you keep using that word? I do not think it means what you think it means.

  • HymloeHymloe Posts: 1,651Member
    Sounds like still worth waiting for the next major update. Looking forward to it. Keep up the good work, Team Salad.
  • zoopezoope Posts: 210Member
  • ORBZORBZ Posts: 1,303Member, PRO
    thank you, i will try this out shortly :)
  • ORBZORBZ Posts: 1,303Member, PRO
    @CodeWizard

    @SaladStraightShooter

    Tried it out. While it's an improvement it still uses about 20MB more memory than the previous v10.1 and still eventually crashes when above 100MB total usage (or about 5 minutes of gameplay).

    I appreciate all the hard work you guys have done. The frame rate is definitely better. I guess I'll have to see if I can use less memory -- or publish w/ v10.1 and slower frame rate. :(

    It seems that spawning objects never deallocate memory after they are destroyed? Well, obviously that can't be the case or it would crash really fast. But it seems like they get cached or something? I'm just grasping at straws based on observed behavior. I really have no idea what's happening behind the scenes.

    But it's almost like the memory usage creeps up slowly and never goes back down - There are parts of my game where the player is idle and in those situations i would expect the memory usage to drop back down... but it doesn't. It fluctuates a little bit, it will drop about 0.5MB but then go back up 1.5MB shortly after and keep climbing.

    From Xcode - Instruments:

    v10.1: Usage: Aprox 80MB MAX - never crashes

    v10.2: Usage: Aprox 102MB MAX - crashes after about 5 minutes of gameplay

    Instruments reports no memory leaks. So it's something perhaps in the behavior of spawning actors? Just a guess... any clues would be appreciated.
  • CodeWizardCodeWizard Posts: 1,143Key Master, Head Chef, Executive Chef, Member, PRO GameSalad Employee
    @ORBZ
    We have a known issue in 0.10.2 where the game will crash improperly with certain memory use patterns. The next build should resolve these issues.
  • ORBZORBZ Posts: 1,303Member, PRO
    @CodeWizard

    What's the usage pattern?
  • ORBZORBZ Posts: 1,303Member, PRO
    edited April 2013
    @CodeWizard

    If it helps here is the crash report:

    Incident Identifier: 2BF84AC6-B9A5-451B-8438-BA2C36B5EFE0
    CrashReporter Key: ebe54ce9539136ad8282850862bc1285c9a96541
    Hardware Model: iPhone3,1
    Process: AlienInvasion [1165]
    Path: /var/mobile/Applications/7B77A062-9E19-4028-A9E6-631228194CCB/Alien Invasion.app/AlienInvasion
    Identifier: AlienInvasion
    Version: ??? (???)
    Code Type: ARM (Native)
    Parent Process: launchd [1]

    Date/Time: 2013-04-29 15:45:04.900 -0400
    OS Version: iOS 6.1.3 (10B329)
    Report Version: 104

    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x00000079
    Crashed Thread: 0

    Thread 0 name: Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0 AlienInvasion 0x001cc61e 0xd7000 + 1005086
    1 AlienInvasion 0x001cdd7c 0xd7000 + 1011068
    2 AlienInvasion 0x001cdd18 0xd7000 + 1010968
    3 AlienInvasion 0x001d3618 0xd7000 + 1033752
    4 AlienInvasion 0x0010a93c 0xd7000 + 211260

    Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
    Thread 1:
    0 libsystem_kernel.dylib 0x39e6c648 kevent64 + 24
    1 libdispatch.dylib 0x39da54ec _dispatch_mgr_invoke + 792
    2 libdispatch.dylib 0x39d97df4 _dispatch_mgr_thread$VARIANT$up + 32

    Thread 2 name: WebThread
    Thread 2:
    0 libsystem_kernel.dylib 0x39e6beb4 mach_msg_trap + 20
    1 libsystem_kernel.dylib 0x39e6c048 mach_msg + 36
    2 CoreFoundation 0x31cae040 __CFRunLoopServiceMachPort + 124
    3 CoreFoundation 0x31cacd9e __CFRunLoopRun + 878
    4 CoreFoundation 0x31c1feb8 CFRunLoopRunSpecific + 352
    5 CoreFoundation 0x31c1fd44 CFRunLoopRunInMode + 100
    6 WebCore 0x37c1e500 _ZL12RunWebThreadPv + 440
    7 libsystem_c.dylib 0x39dd530e _pthread_start + 306
    8 libsystem_c.dylib 0x39dd51d4 thread_start + 4

    Thread 3 name: com.apple.NSURLConnectionLoader
    Thread 3:
    0 libsystem_kernel.dylib 0x39e6beb4 mach_msg_trap + 20
    1 libsystem_kernel.dylib 0x39e6c048 mach_msg + 36
    2 CoreFoundation 0x31cae040 __CFRunLoopServiceMachPort + 124
    3 CoreFoundation 0x31cacd9e __CFRunLoopRun + 878
    4 CoreFoundation 0x31c1feb8 CFRunLoopRunSpecific + 352
    5 CoreFoundation 0x31c1fd44 CFRunLoopRunInMode + 100
    6 Foundation 0x3256c3d0 +[NSURLConnection(Loader) _resourceLoadLoop:] + 304
    7 Foundation 0x325efe80 __NSThread__main__ + 968
    8 libsystem_c.dylib 0x39dd530e _pthread_start + 306
    9 libsystem_c.dylib 0x39dd51d4 thread_start + 4

    Thread 4 name: com.apple.CFSocket.private
    Thread 4:
    0 libsystem_kernel.dylib 0x39e7c594 __select + 20
    1 CoreFoundation 0x31cb21f2 __CFSocketManager + 674
    2 libsystem_c.dylib 0x39dd530e _pthread_start + 306
    3 libsystem_c.dylib 0x39dd51d4 thread_start + 4

    Thread 5:
    0 AlienInvasion 0x0011884c 0xd7000 + 268364
    1 AlienInvasion 0x0011bdba 0xd7000 + 282042
    2 libsystem_c.dylib 0x39dd530e _pthread_start + 306
    3 libsystem_c.dylib 0x39dd51d4 thread_start + 4

    Thread 6 name: AURemoteIO::IOThread
    Thread 6:
    0 libsystem_kernel.dylib 0x39e6beb4 mach_msg_trap + 20
    1 libsystem_kernel.dylib 0x39e6c048 mach_msg + 36
    2 AudioToolbox 0x317a291c AURemoteIO::IOThread::Run() + 104
    3 AudioToolbox 0x317a4c84 AURemoteIO::IOThread::Entry(void*) + 4
    4 AudioToolbox 0x316e2882 CAPThread::Entry(CAPThread*) + 294
    5 libsystem_c.dylib 0x39dd530e _pthread_start + 306
    6 libsystem_c.dylib 0x39dd51d4 thread_start + 4

    Thread 7 name: JavaScriptCore::BlockFree
    Thread 7:
    0 libsystem_kernel.dylib 0x39e7c08c __psynch_cvwait + 24
    1 libsystem_c.dylib 0x39dcdd2a _pthread_cond_wait + 642
    2 libsystem_c.dylib 0x39dcdaa0 pthread_cond_timedwait + 40
    3 JavaScriptCore 0x35bd9c70 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 104
    4 JavaScriptCore 0x35ceb552 JSC::BlockAllocator::blockFreeingThreadMain() + 78
    5 JavaScriptCore 0x35cfdfa8 _ZN3WTFL19wtfThreadEntryPointEPv + 12
    6 libsystem_c.dylib 0x39dd530e _pthread_start + 306
    7 libsystem_c.dylib 0x39dd51d4 thread_start + 4

    Thread 0 crashed with ARM Thread State (32-bit):
    r0: 0x00000079 r1: 0x0b532380 r2: 0x00000005 r3: 0x1d976c00
    r4: 0x00000038 r5: 0x1d96da00 r6: 0x1d96da30 r7: 0x2fd28c30
    r8: 0x000f0a81 r9: 0x1d976c00 r10: 0x1dc5ea70 r11: 0x1dc5e9e0
    ip: 0x00000065 sp: 0x2fd28c20 lr: 0x001cc611 pc: 0x001cc61e
    cpsr: 0x26001c30

    Binary Images: [truncated by ORBZ]
  • CodeWizardCodeWizard Posts: 1,143Key Master, Head Chef, Executive Chef, Member, PRO GameSalad Employee
    edited April 2013
    @ORBZ
    Dear God, it's a crash dump! :) The crash dump info that's relevant to me is this:

    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x00000079

    That tells me it's a NULL pointer reference (0 + 0x79). This can be caused by several issues, but the one I'm talking about is very specific.

    Let me dig in on the "usage pattern" I'm talking about and what the bug is.

    The current version of the engine replaces Lua's memory allocator with a fancy pool allocator. This allocator was supposed to help memory allocation performance by preallocating blocks of memory of various sizes. The problem is that the pool allocator doesn't gracefully handle when one of those preallocated blocks is exhausted. When that happens the allocator just returns NULL and keeps on running.

    This causes the code that called the allocator to process a NULL pointer and crash. There's no real workaround for you, sadly. It's a bug in the allocator that we've recently fixed. I'm really really looking forward to nightly builds so we can get these kinds of fixes in your hands sooner... we've been sitting on this fix for over a week now.

    If you like, send me a PM and we can work out the details of checking out your game and verifying that our pending fixes work for your project.
  • SnapFireStudiosSnapFireStudios Posts: 1,603Member
    @CodeWizard - Sounds good! Keep it coming :)
    - Thomas

    Ignore females. Acquire currency.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,906Member
    @Orbiz 10.1 also has this issue. My game was made using 10.1 and it had the same crash issues even when published throug the 10.1 system. @codewizard looked at my game and found this issue and as he has stated the issue will be fixed this week in 10.2c. I had to rebuild my game over the last 6 days in 10.2 to get it ready for the 10.2c fix. just hold on the fix is in ; )
  • uptimistikuptimistik VenezuelaPosts: 3,602Member, Sous Chef, PRO
    @CodeWizard does this mean we'll just get back to 10.1 loading times? or would this decrease load times to even lower than previous

    New Templates Daily At The Official GameSalad Marketplace GSHelper.com

  • CodeWizardCodeWizard Posts: 1,143Key Master, Head Chef, Executive Chef, Member, PRO GameSalad Employee
    @uptimistik
    That crash fix is unrelated to loading times.
  • uptimistikuptimistik VenezuelaPosts: 3,602Member, Sous Chef, PRO
    @CodeWizard oh, so we should see better memory management than we've experienced before then.

    New Templates Daily At The Official GameSalad Marketplace GSHelper.com

  • CodeWizardCodeWizard Posts: 1,143Key Master, Head Chef, Executive Chef, Member, PRO GameSalad Employee
    @uptimistik
    Better in the sense that it shouldn't crash as much, sure. :D
  • uptimistikuptimistik VenezuelaPosts: 3,602Member, Sous Chef, PRO
    LOL good one. well at least hopefully this will bring things back to 10.1 status, then going forward we'll have updates that improve stuff ;)

    New Templates Daily At The Official GameSalad Marketplace GSHelper.com

  • CodeWizardCodeWizard Posts: 1,143Key Master, Head Chef, Executive Chef, Member, PRO GameSalad Employee
    @uptimistik
    Here's hoping! We're finding new stuff daily. That's good. I really can't wait for the nightly builds so we can get stuff to you faster. My god, that'll turbocharge our work!
  • Braydon_SFXBraydon_SFX Posts: 9,121Member, Sous Chef, PRO, Bowlboy Sidekick GameSalad Employee
    Nightly Builds... That means no sleep for me, right? ;)
  • ORBZORBZ Posts: 1,303Member, PRO
    @CodeWizard

    Yay! This is exactly the problem I'm facing. I've seen that this problem even manifests in 10.1 it just takes a lot longer to show up so I never noticed it (I'm guessing because the memory usage was smaller). I'm really happy that you've fixed it in 10.2c! I was pulling my hair out trying to figure out what could have been causing it on my end.

    If this is in fact the cause of the crashes I was experiencing on 10.2a and 10.2b then the fix in 10.2c should solve the problem that I thought was because of too much memory allocation in 10.2. If it turns out that this was the cause of the crashes for me then this NULL ptr problem fix should mean, for me, that the extra memory usage won't matter so long as it doesn't crash! Yay! (lack of sleep, please excuse poor grammar)
  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,906Member
    edited May 2013
    @codewizard will the 10.2c update be out this week?
  • AcidSlugAcidSlug Posts: 9Member
    Nice to hear this update is out. I guess I finally have to fully go adhoc. If everything woks fine I will definitely upgrade to PRO. Gamesalad has been awesome so far and as a graphic artist I can finally build my games all alone! ( and with the help of GS community of course)
  • CodeWizardCodeWizard Posts: 1,143Key Master, Head Chef, Executive Chef, Member, PRO GameSalad Employee
    edited May 2013
    I do believe 0.10.3 is ready this afternoon. I'll be adjusting version numbers in my ongoing weekly statement to avoid any future confusion.
  • AxygamesAxygames Posts: 203Member, PRO
    @CodeWizard :x :x :x :x :x :x :x :x :x :x
  • RPRP Posts: 1,990Member
    Thank You!!! :-bd
This discussion has been closed.