GameSalad

Howdy, Stranger!

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

Game now crashes my iphone

amigoniamigoni Posts: 78Member
edited November -1 in Tech Support
My Game now crashes my iphone at random intervals it seems. Help please. It will actually force my iphone to reboot.

Comments

  • amigoniamigoni Posts: 78Member
    I think it might be the interpolate. It will make it crash even on the mac.
  • firemaplegamesfiremaplegames Posts: 3,206Member
    A Rule will crash your game if you have "dangling" attributes. Either ones that dont exist of havent been hooked up properly. They will just say game or self without an attribute following it.

    Also, a syntax error or a missing panthesis will crash the game.

    If it seems to happen randomly, it might be memory related. What are the RAM usage totals when you run the game through GS Viewer?
  • amigoniamigoni Posts: 78Member
    @firemaplegames

    It was the interpolate. I don't know why, but it was crashing during gameplay not before or after. Weird.
  • scitunesscitunes Posts: 4,047Member, Sous Chef
    Did you ever copy something from one project and paste it into your current one? When you do this rules and behaviors now copy correctly but user-created attributes do not. So game.UserAttribute just shows up as "game" and will crash your app. You'll need to create attributes and replace "game" with the newly created attribute (make sure it is of the same type as the one you copied).

    Not sure if this is the problem, but best of luck!
  • amigoniamigoni Posts: 78Member
    @scitunes although I have some of those objects in the project, none of them are being used. I am trying to use interpolate again to see if just that implementation was faulty.
  • firemaplegamesfiremaplegames Posts: 3,206Member
    You probably had a syntax error in the expression editor of the Interpolate.
    I haven't noticed any problems with Interpolate.
  • amigoniamigoni Posts: 78Member
    Ok. Just had it again. First I removed interpolate. It worked fine. Then I put it back in. Worked fine. Then I changed nothing at all and stopped working. I removed interpolate and it still crashes. I don't know what is really happening!

    The game freezes both on the mac and on the iphone.
  • Rob2Rob2 Posts: 2,402Member
    post the project
  • amigoniamigoni Posts: 78Member
    Might have found the issue. It was interpolate but it was the run to completion option that would conflict with another interpolate.
  • amigoniamigoni Posts: 78Member
    Ok Guys, take a look at this if you could.

    Game is crashing but I think it's a memory issue. I posted this before in the forum about other memory

    Images: 7.4 MB
    Sounds: 6.3 MB
    Game Engine 14.5 MB
    Other: 34.9 MB

    Total 63.1

    This is on the startup screen. While I play Images and sounds stay about the same but the strange thing is that the game engine slowly creeps up and mainly the other memory is over 45 MB and creeps up slowly. When it reaches 68 MB or so it crashes on the iphone.

    I have a jailbroken iphone 3G and this might be part of the issue, according to what utopiangames was saying lots of people with jailbroken phones were having crashes. I know I couldn't play his game anymore, it wouldn't even start. So there seems to be a memory leak or something with GS and Jailbroken phones. Not sure if there is anything we can do about it, but all the other games I have don't crash. That is the issue that I see we are going to have with our customers.

    Weather jailbroken or not a customer will leave a review which will hurt our performance on the app store. So I am asking for help about this from Gendai Games. Is there any fix for this? Maybe something with the new version?

    Or am I just making the wrong assumptions? What do you think?
  • ChaserChaser Posts: 1,453Member
    Leave a disclaimer in your app description about jailbroken devices
  • firemaplegamesfiremaplegames Posts: 3,206Member
    As a test, make a duplicate project and remove all sounds from it.
    Does it still creep?

    I noticed a memory leak related to sounds in my current game that will apparently be fixed in the
    next build. Hopefully that is the case!

    Having a jailbroken phone should not matter. It's just the total RAM available for the app. Jailbreaking gives you more freedom and allows you to run more things at once in the background. All those things take away the available RAM for your current app.
  • ricardorauberricardorauber Posts: 26Member
    I have a problem like this but I don't have any interpolate behavior! GS simply crash and close! The game that I'm working for now have just one scene, four actors and only one actor have behaviors.

    The actor have these attributes:

    - X_INI: 0 : integer
    - X_END: 0 : integer
    - Y_INI: 0 : integer
    - Y_END: 0 : integer
    - Tempo: 0 : integer
    - Tempo Max: 5 : integer
    - Multiplicador: 2 : integer

    These are the behaviors:

    When touched
    Change attribute self.X_INI to self.Position.X
    Change attribute self.Y_INI to self.Position.Y
    Timer every 0.1 second - don't run to completion
    Change Attribute self.Tempo to self.Tempo+1
    Otherwise
    When attribute self.Tempo <= self.Tempo Max
    Change attribute X_END to game.Touches.Touch 1.X
    Change attribute Y_END to game.Touches.Touch 1.Y
    When attribute self.X_INI > self.X_END
    Change attribute self.Motion.Linear Velocity.X to -1*ceil((abs(self.X_INI - self.X_END)* self.Multiplicador)/self.Tempo)
    When attribute self.X_INI < self.X_END
    Change attribute self.Motion.Linear Velocity.X to ceil((abs(self.X_INI - self.X_END)* self.Multiplicador)/self.Tempo)
    When attribute self.Y_INI > self.Y_END
    Change attribute self.Motion.Linear Velocity.Y to -1*ceil((abs(self.Y_INI - self.Y_END)* self.Multiplicador)/self.Tempo)
    When attribute self.Y_INI < self.Y_END
    Change attribute self.Motion.Linear Velocity.Y to ceil((abs(self.Y_INI - self.Y_END)* self.Multiplicador)/self.Tempo)
    Change attribute Tempo to 0
    Otherwise
    Change attribute Tempo to 0
  • ricardorauberricardorauber Posts: 26Member
    This is the crash log, I've sent at least 5 times to Gendai Games:

    Thread 5 Crashed:
    0 libSystem.B.dylib 0x00007fff807d7b6e __semwait_signal_nocancel + 10
    1 libSystem.B.dylib 0x00007fff807d7a70 nanosleep$NOCANCEL + 129
    2 libSystem.B.dylib 0x00007fff808343c6 usleep$NOCANCEL + 57
    3 libSystem.B.dylib 0x00007fff8085397c abort + 93
    4 libstdc++.6.dylib 0x00007fff881b75d2 __tcf_0 + 0
    5 libobjc.A.dylib 0x00007fff8863ad3d _objc_terminate + 120
    6 libstdc++.6.dylib 0x00007fff881b5ae1 __cxxabiv1::__terminate(void (*)()) + 11
    7 libstdc++.6.dylib 0x00007fff881b4e9c __cxa_call_terminate + 46
    8 libstdc++.6.dylib 0x00007fff881b59fc __gxx_personality_v0 + 1011
    9 libSystem.B.dylib 0x00007fff807ca061 unwind_phase2 + 145
    10 libSystem.B.dylib 0x00007fff807c9f55 _Unwind_RaiseException + 213
    11 libstdc++.6.dylib 0x00007fff881b5bef __cxa_throw + 91
    12 com.gendaigames.GameSalad 0x00000001000cd22d b2StackAllocator::Free(void*) + 151
    13 com.gendaigames.GameSalad 0x00000001000cf826 b2Island::~b2Island() + 24
    14 com.gendaigames.GameSalad 0x00000001000d0dca b2World::Solve(b2TimeStep const&) + 1024
    15 com.gendaigames.GameSalad 0x00000001000d1ad2 b2World::Step(float, int, int) + 178
    16 com.gendaigames.GameSalad 0x000000010008b321 world_step(lua_State*) + 98
    17 com.gendaigames.GameSalad 0x0000000100041128 luaD_precall + 752
    18 com.gendaigames.GameSalad 0x000000010004ffcb luaV_execute + 3378
    19 com.gendaigames.GameSalad 0x000000010004125b luaD_call + 114
    20 com.gendaigames.GameSalad 0x0000000100040b22 luaD_rawrunprotected + 103
    21 com.gendaigames.GameSalad 0x0000000100040b8c luaD_pcall + 80
    22 com.gendaigames.GameSalad 0x0000000100037cae lua_pcall + 277
    23 com.gendaigames.GameSalad 0x0000000100099791 -[LuaState callFunction:args:] + 239
    24 com.apple.Foundation 0x00007fff887a2a2d __NSFireTimer + 114
    25 com.apple.CoreFoundation 0x00007fff847f5678 __CFRunLoopRun + 6488
    26 com.apple.CoreFoundation 0x00007fff847f384f CFRunLoopRunSpecific + 575
    27 com.apple.Foundation 0x00007fff88787a18 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 270
    28 com.apple.Foundation 0x00007fff887d348e -[NSRunLoop(NSRunLoop) runUntilDate:] + 78
    29 com.gendaigames.GameSalad 0x0000000100098105 -[LuaState runLoop:] + 277
    30 com.apple.Foundation 0x00007fff8874ce8d __NSThread__main__ + 1429
    31 libSystem.B.dylib 0x00007fff8079e456 _pthread_start + 331
    32 libSystem.B.dylib 0x00007fff8079e309 thread_start + 13
  • ricardorauberricardorauber Posts: 26Member
    I made it again from zero and now works fine.. very strange...
  • amigoniamigoni Posts: 78Member
    That happened to me before. The files might get corrupt. I don't know what to do since I don't want to redo my project from scratch. I have been working on it for over a month. I have it saved on dropbox but I wouldn't even know which version to go back to. Guess I am learning software development practices. I am learning Corona in the meantime. I love GS, but I am afraid I can't deal with possible crashes like these. Look at what happened to utopiangames. There is too much at stake when you work hard on a game and then it is ruined because of crashes that are really out of your control.
  • ricardorauberricardorauber Posts: 26Member
    I made some tests and got crash again with these situations:

    - Division per zero (ex: self.attribute / 0)
    - Save a behavior of one actor with new attributes and use it in another actor that doesn't have that attributes

    When I run the game, the "others" size goes from 8mb to 39mb and then crash.
  • amigoniamigoni Posts: 78Member
    I still have the issue with the other ram. I thought it was because of my jailbroken iphone but i tried it on the ipod touch 1st gen and the other memory is still above 45 MB. This makes it crash. Unfortunately it even crashes on the mac. So I think I have multiple issues going on here.
This discussion has been closed.