Search Issue Tracker
Won't Fix
Votes
0
Found in
2022.3.17f1
2023.2.7f1
2023.3.0b4
Issue ID
UUM-61586
Regression
Yes
Crash on DispatchMessageW when recompiling scripts on a specific project
Reproduction steps:
1. Open the attached project "CrashRepro"
2. Enter the Play Mode
3. Close the “Select MIDI File...“ dialog window
4. Exit the Play mode
5. Create a new C# script
6. If it does not crash repeat from step 2
Expected result: Script is created
Actual result: Editor crashes
Reproducible with: 2022.2.0a9, 2022.3.17f1, 2023.2.7f1, 2023.3.0b4
Not reproducible with: 2021.3.34f1, 2022.1.0b1
Couldn’t test with: 2022.2.0a1-2022.2.0a8 (”error CS1703: Multiple assemblies with equivalent identity have been imported”)
Reproducible on: Windows 10
Not reproducible on: Mac
First few lines of stack trace:
{noformat}
0x00007FFAD1238241 (USER32) DispatchMessageW
0x00007FFAD1237EFC (USER32) DispatchMessageW
0x00007FFAD124302D (USER32) GetClassLongW
0x00007FFAD34933B4 (ntdll) KiUserCallbackDispatcher
0x00007FFAD07314D4 (win32u) NtUserPeekMessage
0x00007FFAD1241B4F (USER32) PeekMessageW{noformat}
Comments (1)
-
melanchall
Apr 29, 2024 18:36
Hello,
I'm the author of the DryWetMIDI and I disagree with the Resolution Note:
1. DWM is not a native package. It's a managed .NET library, you can even see its full codebase: https://github.com/melanchall/drywetmidi.
2. DWM already has checks for null/empty string for the file path on MidiFile.Read, see the code please: https://github.com/melanchall/drywetmidi/blob/develop/DryWetMidi/Core/Utilities/FileUtilities.cs#L40. In case of such a string a user just will get ArgumentException. Memory corruption is not possible here.Please provide reasons to state that the problem comes from DryWetMIDI. If it's so, I'll be glad to diagnode it and try to fix it.
Thank you,
Max
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- The tag adder functionality does not work if a space is entered instead of a name
- Errors thrown in the Console when configuring In-App Purchases package
- Longer Scaler Profile names go out of the"Scaler Profilers" section
- AI Navigation window UI elements overlap when the AI Navigation window is docked and resized
- Editor freezes after some time when using NavMeshQuery::Raycast
Resolution Note:
The issue seems to be coming from the Asset DryWetMidi. This is a native package, so it may corrupt memory when it encounters an error, in this case an empty string. We suggest adding a null/empty string check before calling MidiFile.Read()