Strange Error, now the app crashes on iPhone

Hi all.
Everything was working really fine with Unity iPhone untill 2 day ago, when a strange error message appeared:

" owner->m_VisibleObjects.find (slot) != owner->m_VisibleObjects.end ()" .

Since this has happened, every time i try running my game on the iPhone the application crashes a few seconds after starting, and the few secoonds it does play, are very very slow…

I didnt notice exactly when it begun but i’ve tried reimporting all my assets, 3d models etc… nothing…
I have about 2K tris and 5 mb of textures in my scene if this may help…
Anybody knows nothing about this?
Thanks for the attention and bye!

i have the same error, i tried to nail it down to report a bug report, but couldn’t. what i found out is, it diappears, if i remove specific objects, but you have to restart the whole application to see if it is gone, and as my scene contains quite a few objects, i’m currently not in the mood to investigate further.

i too have problems with stability, but i was using Application.LoadLevel quite often, i tried to reduce this, as Application.LoadLevel has a current known bug which leads to crashes… since then it runs quite stable, but still crashes, as i cant remove Application.LoadLevel completely.

my guess though is, that your error has nothing to do with crashes, there are a few errors currently known in unity, that lead to crashes. unity technology has promised a hotfix, and for that i am waiting for weeks (with a finished product :frowning: ) - unfortunately they are making a secret out of when it will be released (again: :frowning: - this is really frustrating)

i’m not using loadLevel() at all…

My application crashes with “status 101” wich seems to be due to the application wanting to much memory.

I’ve resized all my textures, and now the application seems not to crash too oftenly, I passed from 5-7 mb of vRam usage to 3-5 mb; very very far from the 24 mb i should be able to use, now the game sort of works but i’m very scared it wont last long since I still have to add some textures and objects…

What is strange is that a few days ago, before the appearing of the ERROR message, I had 70 draw calls, 22-24 mb of Vram usage and 7-9 k tris, and except for a quite low FPS, the game didn’t crash…

Did you add any non-streaming sounds or large TextAsset objects? What are you using for getting your VRAM usage?

for the vRam usage I use the unity stats window, i have added some sound files but all less than 2 seconds long, mono and not compressed. (i’ve tried removing them but nothing changed…)

I’d recommend learning about Instruments. It’s in Developer/Applications and will give you a much better idea of what is going on.

taio84: when you get a crash, could you do following:

  1. open XCode console (by pressing Cmd-Shift-R)
  2. type: bt
  3. type: thread 1
  4. type: bt

copy paste output here. I want to take a look at it.

The following is what i get from the xCode consolle when starting my application, it launches stays open for a second or 2 than it quits… BUT, now, if I unplug my iPhone from the computer and run the program it works fine!!! so…
I’ve tried writing “bt… etc…” when the program crashed, but nothing happened.
ReJ thaks a lot for the help, for the second time!!!

End Load File completely 9350.022000

→ force accelerometer registration
stats: calls=67 tris=4631 verts=16337 draw=228382
stats: calls=69 tris=5273 verts=17083 draw=143194
stats: calls=66 tris=5051 verts=16706 draw=66431
iPhone internal renderer profiler stats:
plr> min: 81.155333 max: 2651.714833 avg: 317.086000
drw> min: 0.000000 max: 362.450000 avg: 31.510167
fls> min: 0.000000 max: 0.001500 avg: 0.001000
swp> min: 0.000000 max: 21.706667 avg: 4.064667
frm> min: 0.000000 max: 1940.980000 avg: 292.424167
mono> used: 524288 heap: 643072

stats: calls=61 tris=4866 verts=16116 draw=99053
stats: calls=62 tris=5160 verts=16550 draw=370283

Debugger stopped.
Program exited with status value:101.

I’ve made a new test, now it worked ofr almost a minute and the consolle printed the following before the game crashed : (i’ve noticed that " plr> min: 76.502833 max: 255.394167 avg: 109.132500" has been under “avg: 100” untill it crashed and it was : “avg: 109.132500”, so maybe wathever “plr>” stays for could be my problem…)

"stats: calls=62 tris=4412 verts=15678 draw=78514
stats: calls=63 tris=4442 verts=15721 draw=66958
stats: calls=62 tris=4412 verts=15678 draw=59426
iPhone internal renderer profiler stats:
plr> min: 76.502833 max: 255.394167 avg: 109.132500
drw> min: 8.907167 max: 22.570167 avg: 10.905833
fls> min: 0.000000 max: 0.001500 avg: 0.001000
swp> min: 1.783167 max: 33.078333 avg: 3.309000
frm> min: 99.042167 max: 1497.430500 avg: 177.657000
mono> used: 1798144 heap: 3657728

stats: calls=63 tris=4442 verts=15721 draw=428761
stats: calls=63 tris=4442 verts=15721 draw=137179
stats: calls=63 tris=4442 verts=15721 draw=57874

Debugger stopped.
Program exited with status value:101."

IIRC that error 101 is an out of memory condition. Have you tried running the game with Instruments, showing total allocations?

I usually aim for my apps to use under 25 to 35 MB of RAM.

I’ve spent all the day (yesterday) tryng to make instruments work, but, if i run the instruments my application crashes almost immediatly and most of times if i tell Xcode to go (with one of the instruments) the application directly doesn’t launch…
My game now seems to work if I install it, unplug my iPhone from the computer and run the game…