director 1.4 causes simulator crash(?)

Hello,
I’m experiencing a problem with corona build 591 on windows 7 ultimate using director class.
I’m developing a game made up of 4 screens:

  • a presentation one(with game name and basically a button to start); in this one some images come into the screen using transitions

  • one to choose level to start from

  • one to display a loading label with an animation

  • the real game screen: at the end of level at the moment you can choose to start again (from the same level, because there’s only one at this time) or go back to presentation screen by pushing two different buttons.

If user choose to start again, the loading screen is showed and then again game screen

Here is the problem:
the simulator crashes oddly on screen changes, but most of the times across restart and start after level choice. Sometimes it happens after button push, sometimes, but most rarely, before; sometimes the crash occours when loading screen is showed, sometimes before that.
The message of crash is that some memory location couldn’t be written or read: a memory leak substantially.

In clean function, for every screen, i freed all display objects used for that screen, all display groups and audio files, that’s for sure. I released display objects using display.remove() function and then nilled them, and all display groups with removeSelf() function.

So I ask: am I doing something wrong? Are that crashes caused by director or could it be a simulator bug? Or maybe the both?

If anyone have an idea please tell me because I’m stuck into it…
If some information is missing tell me, I’ll be glad to provide it.

Cheers,

Marcello
[import]uid: 67155 topic_id: 15755 reply_id: 315755[/import]

I’m getting something similar on OSX.
I’m not sure it’s director causing the problem though.

It just started happening after a recent OSX Lion update.

It seem whenever I make a call to director to change screen (always on the “back” action). the simulator crashes. [import]uid: 22381 topic_id: 15755 reply_id: 62572[/import]

ive been using director since 1.2 with build 591 mac and anytime i have a problem its always turned out to be my code [import]uid: 7911 topic_id: 15755 reply_id: 62573[/import]

Yup. can’t say that’s not my case as well, but in this instance the Simulator is actually crashing… and not doing it nicely, which it should *never* do even if it is a problem in my code.

In this case, I think it’s not a local-code problem because the same code *was* working at some point.

However, even it is a problem in my code, I can’t tell anything about it because the Simulator doesn’t last long enough to give me any feedback. [import]uid: 22381 topic_id: 15755 reply_id: 62581[/import]

I’ve also run into this problem, and it was a problem with my code. The only way I have found to debug a simulator crash it start commenting out parts of my code until the problem went away. I then focused on the last piece commented out to figure out what was wrong. [import]uid: 67839 topic_id: 15755 reply_id: 62585[/import]

Yah, i’m starting to do that…
but you can’t tell me a crashing simulator is a feature.

It should never crash under and circumstances… halt and complain sure… making exploding sounds of fart noises… might help i guess… but simply go away when code in its sandbox is bad is not an option :slight_smile: [import]uid: 22381 topic_id: 15755 reply_id: 62595[/import]

check the case of all images and sound files you are loading and make sure no function names match a variable name all these will cause the sim to crash

if filename is Image.png and you try to load image.png it causes problem. same with sound
[import]uid: 7911 topic_id: 15755 reply_id: 62599[/import]

also try to build for xcode sim and see what happens [import]uid: 7911 topic_id: 15755 reply_id: 62601[/import]

Thanks, those are very good debugging tips.

[import]uid: 22381 topic_id: 15755 reply_id: 62602[/import]

I forgot to tell I already did some debug, printing out a message before cleaning every graphical object in clean function. Again, its behavior is weird: sometimes the crash occurs at a certain point, sometimes at another, sometimes even before entering in clean function.

Im startin to think that’s a simulator bug indeed, or maybe also a simulator bug mixed with some director bug, or incorrect behavior: infact sometimes, quite seldom, the simulator crashes without a clear reason, for example it happened when I left it minimized in the taskbar with the game running (but doin nothing).

As you maybe understand, I’m a little confused… :slight_smile:

[import]uid: 67155 topic_id: 15755 reply_id: 62619[/import]