Search Unity

ghashtable.c:294: assertion 'hash != NULL' failed - when exiting game on iPhone/iPod

Discussion in 'iOS and tvOS' started by RichTufty, Jul 12, 2012.

  1. RichTufty

    RichTufty

    Joined:
    Jul 12, 2012
    Posts:
    23
    Hi, I'm really hoping someone can help or point in the right direction.

    Had to update our game recently with some feature updates, at the same time updated the project to Unity 3.5.2f2 and updated to xcode 4.3.3.

    When the game exits (by hitting the Home button - 'Exit on Suspend' ticked in the iOS Player Settings), in the debug log I get the following....

    -> applicationDidEnterBackground()
    -> applicationWillTerminate()
    debugger-agent: Unable to listen on 8
    ghashtable.c:294: assertion 'hash != NULL' failed
    ghashtable.c:294: assertion 'hash != NULL' failed
    ghashtable.c:294: assertion 'hash != NULL' failed
    ghashtable.c:294: assertion 'hash != NULL' failed
    ghashtable.c:294: assertion 'hash != NULL' failed
    ghashtable.c:294: assertion 'hash != NULL' failed
    ghashtable.c:294: assertion 'hash != NULL' failed
    ghashtable.c:294: assertion 'hash != NULL' failed
    ghashtable.c:294: assertion 'hash != NULL' failed
    ghashtable.c:294: assertion 'hash != NULL' failed
    ghashtable.c:294: assertion 'hash != NULL' failed
    ghashtable.c:294: assertion 'hash != NULL' failed

    .... this goes on for 687 lines!!

    These lines are a recent thing, and I just can't find out how I can track down what is causing it, has anyone else experienced anything similar?


    ALSO, I'm experiencing my game crashing when I exit the app when I include the Flurry iOS Plugin from prime31, seems to have a bad exception to do with the app rotation? When I remove the plugin it doesn't crash, so I know something is related to the plugin is causing it to crash, but I don't know if the 2 issues I'm having are related and it's actually something else causing me to have these 2 issues?

    Any ideas?

    Cheers, Rich :confused:
     
  2. RichTufty

    RichTufty

    Joined:
    Jul 12, 2012
    Posts:
    23
    Hi, I'm really surprised that no one else is experiencing this, or they are just not noticing / talking about it...

    I created a new empty Unity project and added a spinning cube, generated xcode source and ran it on my iPhone device, when I exit the app I get the message 'ghashtable.c:294: assertion 'hash != NULL' failed' many many times. This looks like it's coming from Mono, and looks like it's just a debug message rather than an actual error/crash ? With this be stopped by App Store QA?

    My next problem was with the Unity Flurry iOS Plugin from prime31. Again using my clean Unity project with a spinning cube, adding the latest Flurry Plugin, the app crashes when exiting the app. The solution seems to be setting setSessionReportsOnCloseEnabled(false); , not ideal, looks like Flurry is trying to send a load of data to it's servers when the App closes.

    Anyone else been experiencing these issues?
    Thanks Rich
     
  3. Ale-Farinella

    Ale-Farinella

    Joined:
    Jul 7, 2012
    Posts:
    7
    I have the same problem. Anybody any idea ?

    Thks
    Alessandro
     
  4. marjan

    marjan

    Joined:
    Jun 6, 2009
    Posts:
    563
    Also experiencing this. Solutions so far?
    Edit: I also use Prime31 extensions but not flurry. StoreKit.
     
  5. rmgalante

    rmgalante

    Joined:
    Nov 21, 2009
    Posts:
    59
    Yes, I've just upgraded to version 3.5.4f1 and now I have this problem. I'm not sure if it's related to the new version or something else.
     
  6. Steven-Walker

    Steven-Walker

    Joined:
    Oct 27, 2010
    Posts:
    38
    I've been having this problem for months now, but have been ignoring it since it doesn't appear to affect performance at all. However, it is concerning. Anybody have any ideas how to fix this?
     
  7. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    I also seem to be getting this on Exit/Suspend, has anyone else figured out what is causing this?
     
  8. Tomo-Games

    Tomo-Games

    Joined:
    Sep 20, 2010
    Posts:
    223
    I recently updated to Unity 3.5.5f3 running the latest xcode and I get this error message over and over. Exit on Suspend is not check boxed.
     
  9. SmilingRob

    SmilingRob

    Joined:
    Jul 5, 2012
    Posts:
    5
    Me too, I'm using the following settings:

    [x] Symlink Unity
    [ ] Development
    [ ] Autoconnect
    [ ] script debugging

    Target: iphone+ipad
    Platform: universal armv6+armv7 (OpenGL ES1.1 + 2.0)
    Resolution: native
    Accelerometer Frequency: 60hz
    Override ipod: [ ]
    Requires Wifi: [ ]
    Exit on Suspend: [x]
    Api Compatibility: .NET 2.0 subset
    AOT Comp options:
    SDK Version: latest
    Target iOS: 3.1.3
    Stripping Level: Disabled
    Optimize Mesh Data: [ ]
    Debug Unload Mode: Disabled
     
  10. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    I was wondering if anyone found any updates or reasons for this problem?
     
  11. megan_l_fox

    megan_l_fox

    Joined:
    Jul 10, 2010
    Posts:
    35
    I don't have a solution to the problem, but it's certainly still present as of 3.5.6f4

    I'm just ignoring it too. It's a bit obnoxious to see in my debug spew, but otherwise seems harmless.
     
  12. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
    also have this issue. using sphero plugin
     
  13. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Does it happen with symlink disabled?
     
  14. Astronoid

    Astronoid

    Joined:
    Nov 8, 2012
    Posts:
    2
    Got the same error on iOS 6 when exiting app. Hopefully there´s a sollution somewhere.
     
  15. Deleted User

    Deleted User

    Guest

    I'm also seeing this (with iOS 6)
     
  16. alexszilagyi

    alexszilagyi

    Joined:
    Jul 19, 2012
    Posts:
    10
    Did anyone managed to find something which can solve this? I'm getting this error when I pop the unity view controller. Can't wait to hear your thoughts :)
     
  17. Karsnen_2

    Karsnen_2

    Joined:
    Nov 28, 2011
    Posts:
    89
    Looks like many of us are experiencing the same issue. Just like me, I think the rest of you guys are avoiding it as it does not affect the performance. I have the same issues I am also avoiding it.

    If you guys have or had a solution, declare your solution to be a global and not private please. I am curious to know, what is the problem.
     
  18. alexszilagyi

    alexszilagyi

    Joined:
    Jul 19, 2012
    Posts:
    10
    @Karsnen: May I know how you avoid this issue?

    Last results on my side is to use UIViewController Containment and I'm notifying the container (partent controller) with notifications but nothing happens (meaning that I can only pause the unity by:
    Code (csharp):
    1. UnityPause(TRUE)
    )

    Looking forward ;)
     
    Last edited: Dec 20, 2012
  19. Karsnen_2

    Karsnen_2

    Joined:
    Nov 28, 2011
    Posts:
    89
    @alexszilagyi : I am avoiding the issue as it does not affect the game in any manner. Is that what you were asking me?
     
  20. tonybadguy

    tonybadguy

    Joined:
    Jul 17, 2009
    Posts:
    1
    Hey everyone. Just ran into this while working on my game. It is happening because "Exit on suspend" is enabled in the player settings. Just uncheck that setting and you're good to go.

    In my case, my app was switching to background for facebook authentication. My app was expecting to go into background and come back when facebook authentication is complete. However, with "exit on suspend" enabled, my app terminated as expected when it went into the background and I saw the assertion message in the console. Hope this helps.
     
  21. Karsnen_2

    Karsnen_2

    Joined:
    Nov 28, 2011
    Posts:
    89
    Awesome!!

    I did try to exit on suspend I did not get that error.
     
    Last edited: Jan 24, 2013