Something's craching on iOS


I have a problem with URLoader crashing after several calls, usually after 4-7 times.
I’m reusing the same URLLoader instance with new URLRequest each time.
It’s only happening in iOS, Android and Flash versions work fine.
It looks like a memory leak, cause I see this memory warnings from time to time in logs.
When crash happens, Xcode just lose connection, so I see nothing in logs.
Any help @singmajesty? This is kind of urgent, cause game is released already. :frowning:

Would you mind trying to create a bit of code I could use to reproduce this? Is it any kind of request?

Could you try using a new URLLoader temporarily for each request, and see if it works better as a workaround?

Yep, I’ll try to test on a basic project and tell you the results, just to be sure it’s not something in my code.
Thank you!

Ok, I was wrong, it’s not an URLoader problem, but it’s some kind of memory leak, maybe connected to Bitmaps.
Are there any ways to figure out what is happening? Cause XCode simply disconnects.

And I was wrong again. :slight_smile:
I’ve found a leak in sound, but there is something strange here:

  1. If I turn off sound in my game, it stops crashing.
  2. When I check test app with sound, I see leaks, but it doesn’t crash.

Screenshot of the leak, happening on;

Another problem is with TextField, I believe, it has thousands of these 16b calls, and it keeps going and going non stop:

One more thing, that keeps eating memory:

I think this change might help with the TextField memory at the moment:

OpenAL is different on iOS and macOS than it is on all other platforms, so it could be that we give it a value it doesn’t like. For example, I saw it crash on an old version if we accidentally tried to seek to a negative value. OpenAL-Soft, which we use elsewhere, didn’t mind and handled it properly without a crash.

I wonder if there’s some better way to make it crash (or could it have been a user with an older build that had that issue?)

At the moment it crashes on me in a very weird way. :slight_smile:
Thanks for helping, I’ll try new fix.

UPD: Still crashing… :frowning:

Do you get a stack trace? Does it crash anywhere other than iOS?

No stack trace, as I told before, Xcode simply disconnects on crash providing zero information.
I have placed numerous traces, trying to find where it crashes in the code, but it seems that crash happens outside of my code.
Didn’t experience this on Android, Windows or Flash.

My first guess would be that it is with OpenAL. You could try and see if it crashes this way with macOS.

Most of the OpenAL calls will be made in this file, in Lime:

Perhaps it would be possible to add trace messages, to get a better idea of where the code is executing when it crashes?

If you have a way to reproduce, I could also try and take a look