I did another test and it revealed something interesting!
Sounds and sound device handles looks like this after a hot-compile
and sounds work without a problem (I tested playing sound cues from within the sound-cue editor, and it worked!), but as soon as I PIE after the hot-compile the sound breaks.
I left the game without playing a sound and then returned to the sound-cue editor and when I try to play a sound from there. Nothing. Not a sound plays. Probably because the sound-cue editor checks if there’s a valid sound device before trying to play a sound.
So there’s something that breaks, not right after a hot-compile, but rather after initializing a PIE session after a hot-compile!
Are you running the editor by itself or are you running in debug mode through Visual Studio? Also are you hot reloading by compiling the VS solution with the editor open or are you using the compile button inside the editor? What code are you changing to trigger the hot reload? Does the crash happen when you first start PIE because of the background music or does it only occur after you try to fire and the guy sound plays? I’ve tried adding a variable to the Projectile.cpp file and compiling through both the editor and Visual Studio but have not crash on PIE after a hot reload.
I’m still trying to use your project to reproduce the crash on my machine. I was trying to use the editor by itself and now I’m trying through Visual Studio. Since you’re able to reproduce this easily could you reproduce the crash without running through Visual Studio debug and then send the resulting callstack and the log files from the editor session?
I started it without the VS debugger now and crashed as usual after the hot-compile. I don’t know how to get a hold on the callstack when I don’t use the debugger but I attached the log file at least.
I wanted to touch base with you and let you know that I am still investigating this crash. Using the project you sent I have tried to run it in debug mode and PIE, added a float value to Weapon.h and then hot reload through the editor, and then PIE again. Let me know if this is enough to cause the crash on your end or if there is something I’m missing.
Yup, I’m sorry to say that on my end there’s nothing more to it.
I’m in the process of creating a clone of the project to see if there’s only something wrong with the local copy. I’ll get back to you with the result.
for what it’s worth, for me I don’t even need to add a variable. If i even change something in the body of some preexisting method and compile for hot-reload, it will crash.
Let’s try another angle, what version of VS are you using to compile?
I’m currently VS Ultimate 2013. 12.0.21005.1 REL
.NET 4.5.51641
i’m downloading VS2013 patch 5 right now to just see i guess.
I re-downloaded a clean copy from our repository and got the same result as usual. So I’m guessing there’s something with the combination of how the project is built and that the engine version is 4.8.
I get the same issue even with the ShooterGame demo by itself. After a hot reload and playing in a new window, the environment sounds start playing, but then it crashes where presumably it plays the respawn sound through PlaySoundAtLocation().
So it seems very likely that this is system specific. My VS version is 12.0.31101.00 Update 4 NET Version 4.5.51641 and I’m on Windows 8.1.
Hmmmm. maybe some kind of sound driver/DirectSound(?) issue, since it’s all crashing in sound code for us?
I’m using onboard audio, Lists as “Envy24 Family Audio Controller”
driver 6.3.9600.16384
I downloaded the 4.10.0-0+UE4 version of Unreal Engine from the official git repository and I’m happy to tell you that the master branch version didn’t cause the project to crash after a hot-reload and a PIE session!
I’ll promote this comment to an answer if you all think that is a good enough of a reason, since this isn’t really a solution other than waiting for the next stable update.
Hey guys – sorry to get in on this question so late!!! Yeah, this is an issue I think we discovered a while ago and it was likely simply due to variable shadowing and I believe was fixed in CL 2532216.