hydrogen-music / hydrogen

The advanced drum machine for Linux, macOS, and Windows
http://www.hydrogen-music.org
GNU General Public License v2.0
1.05k stars 173 forks source link

Deleting the first instrument results in a NULL instrument, which crashes Hydrogen if you try and load a sample #1140

Closed camtarn closed 3 years ago

camtarn commented 3 years ago

Hydrogen version * : 1.0.1 Operating system + version : Windows 10 Home v2004 build 19041.746 Audio driver + version : Microsoft generic USB audio v10.0.19041.388, via PortAudio


Steps to reproduce:

Faulting application name: hydrogen.exe, version: 0.0.0.0, time stamp: 0x5f593567
Faulting module name: libhydrogen-core-1.0.1.dll, version: 0.0.0.0, time stamp: 0x5f5934c2
Exception code: 0xc0000005
Fault offset: 0x0000000000015c80
Faulting process ID: 0x7f0
Faulting application start time: 0x01d6f740284078b8
Faulting application path: C:\Program Files\Hydrogen\hydrogen.exe
Faulting module path: C:\Program Files\Hydrogen\libhydrogen-core-1.0.1.dll
Report ID: 99cfa8d5-dda6-46bc-8ead-f3c6e0f5d6f0
Faulting package full name: 
Faulting package-relative application ID: 

Extra XML crash info: NULL-instrument-crash.txt

theGreatWhiteShark commented 3 years ago

Thanks for reporting!

You seem to be the first one deleting the first instrument in years :smile:

I fixed it

cme commented 3 years ago

I have a bunch of other small changes (which stop the crash in this case) resulting from reviewing instrumenteditor looking for potential null dereferences etc.

I fixed it

theGreatWhiteShark commented 3 years ago

I have a bunch of other small changes (which stop the crash in this case) resulting from reviewing instrumenteditor looking for potential null dereferences etc.

Awesome! We might should start using the assign function in Github in order to not do things twice.