Warning: audio error: Already initialized in win simulator 2013.1225

I really appreciate the new auto reload feature. However after a dozens or so of reloads the following error occurs and the audio stops working (no sound at all):

Warning: audio error: Already initializedWarning: audio error: Already initializ edWarning: audio error: Already initializedWarning: audio error: Already initial izedWarning: audio error: Already initializedWarning: audio error: Already initi alizedWarning: audio error: Already initializedWarning: audio error: Already ini tializedWarning: audio error: Already initializedWarning: audio error: Already i nitializedWarning: audio error: Already initializedWarning: audio error: Already

I don’t think I use something special to play sound effects:

local handles = { } -- called at start function init() handles = { } musicStream = nil musicVolume = 0.75 soundVolume = 0.75 audio.reserveChannels(25) -- load sounds handles["bark1"] = audio.loadSound("audio/bark1.mp3") handles["bark2"] = audio.loadSound("audio/bark2.mp3") ... and so on end function playSound(name, volume, lo) local handle = get(name) -- set volume .... audio.play(handle, {channel=ch, loops=lo}) ... end

When I restart the simulator the audio works fine again.

Thanks for the succinct report … I’ll take a look.

Any progress regarding this? The bug still exists in 2013.1236. Thanks.

I noticed the warning message has changed a bit using 1236:

Warning: audio error: Cannot open sound device for OpenAL Warning: audio error: Already initializedWarning: audio.loadSound: failed to create sound (audio/bark1.mp3) Warning: audio error: Already initializedWarning: audio.loadSound: failed to create sound (audio/bark2.mp3) ...

Earth to Corona Staff… Anyone there? Please answer :angry:

Sorry about the radio silence.  Your bug is on the list but isn’t being reported by anyone else so its priority is unfortunately  low.  I’ll see if I can find some time to look at it.

I’m seeing this error, but I can’t find where it’s listed as an official bug. Do you have a link so I can up-vote?

I tried to reproduce the problem with the code in the original post but could not see an issue after over 80 relaunches so there must be some subtlety to this that the example code doesn’t contain.  Or maybe I “broke” it making the changes necessary to make it runnable.  I was using build 2013.1241 on Windows 8.1

Can you report a bug to http://developer.coronalabs.com/content/bug-submission and include a complete sample app that demonstrates the problem?  Please include as many details about your system as you can in case this is OS specific. 

Also, does the problem occur if you just hit Ctrl+R repeatedly in the Simulator to manually relaunch the Simulator?

The issue essentially resolves itself after you close and open Corona. I had left my app running in the simulator on the desktop in the morning, and when I came back to it at night (12+ hours), I encountered this error. I closed and re-opened a new Corona session, and re-opened the same project with no changes to code. The error was gone after this. 

It seems like examining my code would be useless as it doesn’t really matter the content. @Martin, are you running your code from a Dropbox/Google Drive/cloud storage service? Meaning, is your code stored in remote-synced storage medium and you run your projects from there? I think that may be where the issue arises. 

Thanks for the succinct report … I’ll take a look.

@Panx software: No, my code is local.

@Corna Staff: It still exists in CoronaSDK-2013.1259.msi. Please fix.

Does shutting down all Corona instances and then starting once more not solve your problem? I find that normally fixes it for me, and while I do see the error every blue moon, it’s more of an annoyance than a showstopper.

Yes, it does. But I see this error every 5th or 6th time when I change any project files, not only code but also level maps or any other resource (graphics, audio). This bug makes the (very comfortable) auto reload feature useless for me.

That is a sticky wicket. I’ll report if I encounter the issue more frequently.

I’ll ask again …

Also, does the problem occur if you just hit Ctrl+R repeatedly in the Simulator to manually relaunch the Simulator?

And what version of Windows are you running?

Note that the two issues reported here are different. One is about reloading an app in the Simulator causing an audio issue, the other is about an app that, if left running for 12 or more hours, causes an audio issue. The fact that the same generic error message is printed doesn’t mean they are the same issue.

Actually there is exactly one issue here:

However after a dozens or so of reloads the following error occurs and the audio stops working (no sound at all):

  • Ctrl-R without any file changes works fine.
  • Ctrl-R after a file has been changed and the error already occurs does not fix it.
  • I do not run the simulator for 12h (which is kinda wired) and then the error occurs. I’m talking about ordinary software development work here.
  • I use Windows Vista Business Service Pack 2, all Updates installed, and no, I cannot update to Windows 7 or 8 because that - of course - doesn’t work either (the usual Microsoft blames Dell / Dell blames Microsoft story).
  • I won’t report a bug issue because I did that 3 times so far without any response at all.

I have exact same issue after installing newest public release. It worked for few launches, now when it occurs (randomly) I have to restart simulator to make it work.

Any progress regarding this? The bug still exists in 2013.1236. Thanks.

Thanks for your post, delwing. Unfortunately I don’t think this issue will be fixed in near future. It seems Corona has no interest in quality, but only in quantity (in the meaning of new features) :frowning: Therefore I have decided months ago to cancel my Corona Pro membership.

I noticed the warning message has changed a bit using 1236:

Warning: audio error: Cannot open sound device for OpenAL Warning: audio error: Already initializedWarning: audio.loadSound: failed to create sound (audio/bark1.mp3) Warning: audio error: Already initializedWarning: audio.loadSound: failed to create sound (audio/bark2.mp3) ...