urgent - game cuts off after playing for at least 15 mins

2»

Comments

  • FirstDanFirstDan Member Posts: 208
    @everyone,

    If I have actors on my scene that are unlocked so that I can use my players x and y using scene.layers.player.x etc rather than players x and y!

    If I accidentally delete the prototype, does it still keep the unlocked actor, can this be the issue?

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Hi again @FirstDan , no it wouldn't be that because if you delete a Prototype from the Library, a dialog pops up which says: "Removing this actor prototype will remove all instances and references to it."

    Are you certain you've no behaviours/rules where their attributes are showing blank?

    Just before your app crashes, do you get the spinning wheel, and if so, for how long?

    Personally, I'd spend a day putting the whole game into separate scenes, but I guess you don't want to go down that route...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • FirstDanFirstDan Member Posts: 208
    @gyroscope - HI
    Gutted, I really thought I had a fix :( with prototyping and unlocked actors.

    I am fairly certain that I don't have attributes showing blank.

    When my app crashes, my iPhone 5 seems to heat up and then it just crashes. There is no loading wheel.

    @GYRO - my game is infinite, so putting on separate scenes wont make sense....


    Arhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

    Dan - 99% Stress levels :)
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Oh yes, an infinite game, i think you mentioned that before... so frustrating for you, I can understand.... I'll think on...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    I'm beginning to wonder if it IS a RAM issue (the point you made right at the beginning...); memory caches are building up and not being cleared so it eventually bombs...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • FirstDanFirstDan Member Posts: 208
    @gyroscope - I really hope not :(, how can I dump the memory? Is it by changing the scene.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Are you spawning / destroying at all?

    You really need to show a video and go into detail of what you are doing. Everyone is just shooting in the dark here
  • FirstDanFirstDan Member Posts: 208
    @jonmulcahy - i'm trying to protect my work, i hope you can understand that...

    when you say "are you spawning/destroying at all?

    I am only spawning bonus items, enemies and obstacles.

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    How often are you spawning? What happens when items leave the screen and/or are collected?

    I understand trying to protect your work, but you gotta give us something to go on. It's like asking people online to diagnose car trouble by saying it goes 'clank'
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited December 2012
    If you're spawning stuff make sure you have them destroy after they are off screen or no longer in use.
  • FirstDanFirstDan Member Posts: 208
    How often are you spawning? What happens when items leave the screen and/or are collected?

    I understand trying to protect your work, but you gotta give us something to go on. It's like asking people online to diagnose car trouble by saying it goes 'clank'
    :) - made me laugh

    I do have a rocket powerup, that when the player collects it, i change the x, y outside the scene

    when the player touches the rocket power up i constrain the x and y of the rocket to player x and y.

    Generally I destroy all spawns once used, but for my health bars i spawn at level 5 and keep them until level 15

    dan

  • FirstDanFirstDan Member Posts: 208
    @gyroscope - it may not be memory as when I read the crash logs it gives me an error code which basically means that gamesalad is trying get hold of an pointer that's been deleted or something like that

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Ah, OK, then your best bet is to inspect any new additions of Rules/behaviours that appear just before the app crashes... as Jon @jonmulcahy said, it's a bit difficult to analyse fully without seeing what's actually happening with your rules and behaviours...

    Anyhow, best of luck tracking a missing attribute down, if that's the problem...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    how many objects are you spawning and how often?

    1 object every 10 seconds?
    10 objects every minute?
    100 objects every second?

    it all matters, and if you are spawning/destroying often, that gradually increases the memory load.

    However, on an iPhone5, i expect the memory number when using the viewer should be well over 150/200MB since it has so much memory. If it is a lot lower, something codewise is going on.
  • OniCraftOniCraft Member, BASIC Posts: 43
    I notice sometimes the values of attributes would go blank when copying actors or scenes. For example, normally it would be HP = HP+1. After copying the actor, the second actor's HP would sometimes become HP = "blank, completely nothing".
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    I notice sometimes the values of attributes would go blank when copying actors or scenes. For example, normally it would be HP = HP+1. After copying the actor, the second actor's HP would sometimes become HP = "blank, completely nothing".
    this is because you were using local attributes. when you use a global attribute (game attribute), you can copy the rule from actor to actor without any problems. When you use local attribues (actor attributes, seen as self.whatever), when you copy it outside of the actor, that rules breaks.
  • FirstDanFirstDan Member Posts: 208
    @jonmulcahy, I will compile a list of all spawns and destroys when I get home!!

    But for level 10 which is a boss level I'm spawning anything between 30-40 actors providing the player gets past a point, I then delete them all once the boss is dead

    I'll get you a list soon

    Thanks
  • FirstDanFirstDan Member Posts: 208
    @jonmulcahy - i have a screenshot- that shows the exception within Xcode

    but i dont know how to post it on this forum, care to help?
  • FirstDanFirstDan Member Posts: 208
    AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved
    OpenAL error 40964 in call to ~SGSound: alDeleteBuffersOpenAL error 40964 in call to ~SGSound: alDeleteBuffersOpenAL error 40964 in call to ~SGSound: alDeleteBuffers2012-12-10 21:51:05.726 GameSalad Viewer[2122:12803] Game paused by system. Count: 1
    OpenAL error 40964 in call to ~SGSound: alDeleteBuffersOpenAL error 40964 in call to ~SGSound: alDeleteBuffers2012-12-10 22:13:35.152 GameSalad Viewer[2122:12803] Received memory warning.
    Ran out of chunks of size 16
    (lldb)


    this is the exception i get in Xcode, anybody knows what this means?
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    little-endian

    Did you try what I suggested (it shouldn't take more than a few minutes of your time) ?

    Spending hours playing around with mysterious esoteric coding languages that I don't understand tends to get me nowhere and slowly, whereas good old common sense and a basic process of elimination (and half a bottle of red wine) tends to find the problem fairly quickly.

    I'd dump the audio and run the game, then dump the backgrounds and run the game, then get rid of the score counter (and run the game) - and the particle effects (and run the game) - and the spawning (and run the game) - and so on . . . . . . basically strip things out one at a time, eventually you will be left with nothing - but between this nothing and the complete game you started with the issue that is causing your game to crash will disappear - this process will help you pin down the culprit.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    little-endian

    Did you try what I suggested (it shouldn't take more than a few minutes of your time) ?

    Spending hours playing around with mysterious esoteric coding languages that I don't understand tends to get me nowhere and slowly, whereas good old common sense and a basic process of elimination (and half a bottle of red wine) tends to find the problem fairly quickly.

    I'd dump the audio and run the game, then dump the backgrounds and run the game, then get rid of the score counter (and run the game) - and the particle effects (and run the game) - and the spawning (and run the game) - and so on . . . . . . basically strip things out one at a time, eventually you will be left with nothing - but between this nothing and the complete game with started with the issue that is causing your game to crash will disappear - this process will help you pin down the culprit.
    follow this advice and report back!
  • FirstDanFirstDan Member Posts: 208
    @socks when you say dump, do you mean delete? Or turn off?

    Thanks
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    @socks when you say dump, do you mean delete? Or turn off?

    Thanks
    Turning something off and deleting it has much the same effect.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited December 2012
    Yes I agree! You should be debugging with a copy and making notes of the results and fixes and then go in and fix your main copy. Deleting and monkeying with your game can lead to XML file issues. It's more work but easier than having to redo the whole game.
  • FirstDanFirstDan Member Posts: 208
    @everyone- I'm going to do as you all advised!

    @socks, @jon, @fsb- great debugging advice...


    May I ask if anyone had a look at the exception error I posted in an earlier post and what you all think about it?

    Dan
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    @FirstDan

    Hi Dan, as much as I understand it, it's an audio issue, from what I can tell from the exception error, with "SGSound" and deleting buffers mentioned. I'm sure you consider the same.

    So your first "port of call" would certainly be checking out the sound/music files by turning off any Sound or Music behaviour, one by one, to see which audio file might be the corrupted file. Especially start by turning off any sounds or music which are happening for the first time in the levels where it crashes...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Yes from what I read about this error code is that it is related to audio. I start by turning off all sounds and seeing if it crashes, then I would turn them on one at a time until the crash happens. When you find the file delete it and the play sound behavior that addresses it and redo it.
Sign In or Register to comment.