Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when audio files played in quick succession #2549

Closed
Darkcyde13 opened this issue Jun 10, 2023 · 6 comments
Closed

Crash when audio files played in quick succession #2549

Darkcyde13 opened this issue Jun 10, 2023 · 6 comments
Assignees
Labels
6. not up to spec The expected behaviour per the spec doesn’t match the observed behaviour.

Comments

@Darkcyde13
Copy link

What's Wrong (please be as specific as possible)

Expected

EDDI operates normally when audio files played in quick succession.

Observed

EDDI crashes to desktop when running a script that plays audio files by clicking the 'Test' button.

Steps to reproduce

  1. Create a script (or edit an existing one) that incudes playing an audio file.
  2. Click the 'Test' button to run the script.
  3. Click 'Test' again quickly, so that it either ends the speech early, or runs the script again. This will depend on how long the script is in general.
  4. Keep clicking the 'Test' button to repeat the script. Usually within 5 seconds.
  5. After a few tries, EDDI will freeze then crash.

Configuration

  • Version [Please give full version numbers here, not just "latest" or "current"]
    • EDDI Version: v4.0.3-b2
    • VoiceAttack Version: v1.10.4
  • Localization [if applicable]
    • EDDI's language: English
    • Voice: Ivona Amy

My Investigation

Investigation Notes

I've been experimenting with the 'Bond awarded' script, getting it to play audio files using the Play() function. I have a few different files to be played, depending on how many kills you have within a certain time. The code works well, however, when running it in quick succession, EDDI will suddenly freeze and then crash to desktop a second or two later.

I have tried this with v4.0.2 & v4.0.3-b2, plus with and without VA. I can make it crash consistently every time, using the method above. Having the script play in-game doesn't seem to make it crash, but I'm guessing that's because it's not happening fast enough to cause it.

And, yes, I am attempting to recreate an Unreal Tournament style "multi-kill" speech, hence why I'm trying to make it go fast. 😉

EDDI Logs

Verbose log. Loaded EDDI standalone, and started clicking the 'Test' button until it crashed.
eddi.zip

Player journals

N/A

@Tkael Tkael closed this as completed in b9f35a6 Jun 11, 2023
@Darkcyde13
Copy link
Author

I just ran my tests with beta 3, and it crashed again. I only managed to click about 3-4 times before it froze and crashed to desktop.
eddi.log

@Tkael
Copy link
Member

Tkael commented Jun 11, 2023

Really? It's been rock solid in my click-tests after yesterday's changes. :-(

@Tkael Tkael reopened this Jun 11, 2023
@Darkcyde13
Copy link
Author

Maybe it's just the code, and files I'm playing then?

Here's a copy of my current test build of the 'Bond awarded' script, plus the audio files I'm playing.
Kills.zip
DC Bond awarded 4.0.3-b3.txt
Configure the file path in the script on line 19, to where ever you extract them to.

I made a change to the script last night, but didn't test it until after beta 3, and now it's a bit hit and miss in game with it playing the sounds. Although that could just be me not getting kills fast enough to trigger it. Still, it does play a couple before crashing when I use the test button.

@Darkcyde13
Copy link
Author

Some more information that may be useful. I forced the on-foot sections of code to run by changing the vehicle = "On Foot" to != while I was not in game. Then, like you, I couldn't get it to crash, no matter how many times I clicked test.

I then loaded into game, changed the != back to = and disembarked from my ship onto a station. I then started clicking test again, and it crashed after only a couple. So, for some reason, it seems like it may only happen when I'm in game? But I can't see why that would be.

@Tkael
Copy link
Member

Tkael commented Jun 12, 2023

It has to do with when objects are disposed / removed from memory.
I think I've got an even more bullet-proof approach now. Sorry it's taken so many attempts but it is tricky to get right. :-D

@Tkael Tkael added the 6. not up to spec The expected behaviour per the spec doesn’t match the observed behaviour. label Jun 12, 2023
@Tkael Tkael self-assigned this Jun 12, 2023
@Tkael Tkael closed this as completed in 3097882 Jun 12, 2023
@Darkcyde13
Copy link
Author

No worries. I appreciate your efforts with this. I'd rather you take your time to get it right. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6. not up to spec The expected behaviour per the spec doesn’t match the observed behaviour.
Projects
None yet
Development

No branches or pull requests

2 participants