XAudio doesn't work, at all. Bug?

For questions about using Classic.

Post » Thu Dec 18, 2008 8:49 pm

Can you try this? Save it to your Plugins\Runtime directory, and let me know if it fixes it.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Thu Dec 18, 2008 8:51 pm

[quote="Ashley":wtr0kem4]Can you try this? Save it to your Plugins\Runtime directory, and let me know if it fixes it.[/quote:wtr0kem4]

Hmm...

It gives me this when I open Construct:
Error loading C:\Program Files\Scirra\Construct\Plugins\XAudio2.csx (127) - this plugin may not be available!

EDIT: My mistake maybe it was the wrong directory wait a second

Edit: Nope, still no go. Disregard that last edit.
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Thu Dec 18, 2008 9:08 pm

Does it still do that on startup? If it does, you pasted the file to the wrong directory and need to reinstall Construct to get the original back, that file can ONLY go in the Plugins\Runtime directory. Then I still need to know if it fixes the original crash when you press run.

Same goes for anyone else who had this file crash!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Thu Dec 18, 2008 9:20 pm

I just tested it out and the file doesn't crash for me anymore.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Thu Dec 18, 2008 9:24 pm

[quote="Ashley":rk7o83t8]Does it still do that on startup? If it does, you pasted the file to the wrong directory and need to reinstall Construct to get the original back, that file can ONLY go in the Plugins\Runtime directory. Then I still need to know if it fixes the original crash when you press run.

Same goes for anyone else who had this file crash![/quote:rk7o83t8]

Sorry, that was my mistake. Whoops... :oops:

Reinstalled Construct and tried again.

Okay, it doesn't crash now. I guess it works. I'm going to try to play an audio file and see what happens.

Alright, everything is working as it should. But I can't load sounds from a resource for some reason (I can only load wavs from a file path). But XAudio is working for me now. I finally have sound. :D

EDIT: For some reason, loading a blank wave file, THEN putting my other wave file as a resource causes loading sounds from resource to work for some reason.

Construct refuses to load the first wav file you load, but loads every other resource besides that. Weird.

Other than that, everything is working great now.
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Thu Dec 18, 2008 9:54 pm

Hold on, now I'm getting a whole new kind of crash.

It tells me to go to the debugger for more info. Then when I do, it tells me to report it here.

http://machriderx.googlepages.com/shooterbugged.cap

Just try running that. I don't even know what's going on now.
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Fri Dec 19, 2008 1:24 am

I talked about how it suddenly managed to work in the chat, but now I'm getting the same crash out of nowhere again.

XAudio was working fine. Then after running my layout a few times, it eventually went from not starting up but only starting up when I use the debugger, to suddenly not starting up at all even with the debugger enabled.

I deleted everything except the XAudio object itself to isolate it this time.

Try this .cap out

http://machriderx.googlepages.com/xaudio.zip

Tell me if it crashes when you try to use it.

As for reproducing it, I can't even tell why it's happening or what's causing it. All that I know is that it was running fine, then suddenly after running it a few times, it started refusing to run at all. I know that's not very helpful, but I don't know what else I can do about this.

Edit: Hmm... it only seems to crash when I use a .wav file that has been loaded as a resource. However, when I use a file from a file path, it works fine. It seems like something is seriously bugged with how Construct handles resources along with XAudio (and possibly Vista?), but then again I dunno.

Edit: God damn it! Now the crash is happening with wav files I'm loading externally. I don't know what the hell is going on. The damn thing is completely broken, and the worst part of it all is that I can't even explain why.
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Fri Dec 19, 2008 2:36 pm

Does the same thing happen with only loading from files and not using any resources at all? i.e. if in the example you sent, you change Load Resource to Load File, and delete all the resources? Does it only crash after separately running and closing the preview a few times? (that would suggest a memory leak)

It works fine for me, loading from files (resources aren't set up right when you move the .cap to another computer)
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Fri Dec 19, 2008 8:09 pm

[quote="Ashley":26q1iwbk]Does the same thing happen with only loading from files and not using any resources at all? i.e. if in the example you sent, you change Load Resource to Load File, and delete all the resources? Does it only crash after separately running and closing the preview a few times? (that would suggest a memory leak)

It works fine for me, loading from files (resources aren't set up right when you move the .cap to another computer)[/quote:26q1iwbk]

Yes, same thing happens when just loading a file with no resources.

Even after turning off my computer yesterday and turning it on right now, the problem is still there. I used to be able to load from an external file, but it will no longer let me no matter what. Now I can't load any wavs without it crashing on me.

"Does it only crash after separately running and closing the preview a few times?"

Well, I guess. I mean, it worked a few times with each thing after previewing it. I mean, first I had it set up so that it loads the second file from the resource. After previewing the game a few times, that stopped working (instant crash on preview, message saying to report the bug to Scirra). I then thought I could possibly load a third file into the resources to avoid that crash message, but that didn't work.

Then I just decided to load the file externally, and eventually after previewing a few times, that crashed as well and now I can't load a wav from inside or outside Construct at all. It's just crashing no matter what.


Edit: Strangely enough, if I set it up so that it loads an external wav file into a channel when I press a button rather than at the start of the layout, it doesn't crash.

I've somewhat averted this crash like that, for things that require playing a sound effect. For example, I made it so that the "shoot" button both loads the file into a channel then plays it, all in the same event.

Before I had it so that it only loads the file into a channel at the start of the layout, and plays when the button is pressed.

I also tried the way deadeye had it set up in his cap file, where he loaded a wav into a channel when the channel isn't playing.That gives me the "this may be a bug. report it to Scirra" error message.

In fact, here. Here are the error messages depending on how I load the wav into the channel.





Again, these messages are both the first thing that pops up as soon as I click the debug layout button.

Clicking the preview button just gives me an error message saying that an unexpected error occurred and that I should go to the debugger to find more info. Of coarse, when I do that, I get the above messages.
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 9 guests