Build 759+ Particle emitter causes screen to flicker/flash

Sorry the bug submission link doesn’t work.

I’d like to submit the following issue for bug review. Please see the original thread here:

http://developer.anscamobile.com/forum/2012/03/23/particle-emitter-build-759-causes-screen-flickering

All code necessary to replicate is there. Please let me know if you need further info. Thanks. [import]uid: 31262 topic_id: 24093 reply_id: 324093[/import]

Thanks aaaron, will pass this along to the team :slight_smile: [import]uid: 52491 topic_id: 24093 reply_id: 97260[/import]

Is the team able to witness the “blinking” effect? [import]uid: 21331 topic_id: 24093 reply_id: 98651[/import]

Hey Tony, this isn’t assigned to me so I can’t tell you off hand.

Aaron, if you have a bug/case # I can check the status for you and report back :slight_smile: [import]uid: 52491 topic_id: 24093 reply_id: 98702[/import]

Hi Peach,

I don’t have a bug number. How do I get that?

You can test it very simply by hitting that link in the first post and creating those 2 files emitter.lua and main.lua. Then just run main.lua in the simulator. [import]uid: 31262 topic_id: 24093 reply_id: 98713[/import]

Did you file a bug for this? If so, you should have gotten an email with a number in it.

If you didn’t actually file a bug for whatever reason, would you be so kind as to do that now, please? :slight_smile: (Using link in top right.) [import]uid: 52491 topic_id: 24093 reply_id: 98722[/import]

Doh! Sorry I went into the stickied thread and tried to use that submission link but it was a dead link so I just created a thread instead.

It’s case #13415 [import]uid: 31262 topic_id: 24093 reply_id: 98788[/import]

Im having same issue also. Whenever I start an emitter the screen flashes. [import]uid: 118379 topic_id: 24093 reply_id: 103104[/import]

This looks like the same issue in 13428. The flickering was due to NaN values in emitter.lua. See my follow up here:

http://developer.anscamobile.com/forum/2012/03/10/slow-image-particle-generation-mac-simulator-fine-device#comment-108417 [import]uid: 26 topic_id: 24093 reply_id: 108420[/import]

Hi Walter, thanks for the reply. Sorry for my ignorance here but does this mean this a bug in the emitter.lua code or is this a bug in Corona? [import]uid: 31262 topic_id: 24093 reply_id: 108484[/import]

It was a bug in the project and in the lua code (emitter.lua) that was part of the project. [import]uid: 26 topic_id: 24093 reply_id: 108514[/import]

Funny that this thread got active. I have been fighting this issue again on my second game, not using emitter.lua, (blaming Corona, of course! lol) and just before jumping off a building, I believe I’ve figured out how the NaN was being produced… again…

I was attempting to normalize a zero length vector… again…
watch out for the sqrt’s !
[import]uid: 21331 topic_id: 24093 reply_id: 108523[/import]

Walter did you get a working version of that emitter.lua? If so could you supply it? Also, if it is a bug in the code how come it works in older versions? Did the graphical changes just make the bugs come to light? Thanks for looking into this. [import]uid: 31262 topic_id: 24093 reply_id: 108591[/import]

Sorry, I don’t have a working version handy anymore.

We introduced offscreen culling as an optimization recently. However, emitter.lua was intermittently setting object x,y positions to bogus values (sqrt of a negative number if I recall correctly). Those bogus values caused Corona to think the object was offscreen, hence the flickering.

Previously, we were much more lax about bogus values coming in. We’ll be much more stringent about that moving forward, so it’s very important not to pass in NaN values into Corona! [import]uid: 26 topic_id: 24093 reply_id: 108707[/import]

@Walter Thanks for the explanation. I have recently purchased particle candy anyways so I will test with particle candy. I’m sure it won’t happen with particle candy or else it would have been reported already. [import]uid: 31262 topic_id: 24093 reply_id: 108748[/import]