hydrogen icon indicating copy to clipboard operation
hydrogen copied to clipboard

UI Periodically freezes for around 5 seconds then resumes.

Open coalvilledave opened this issue 3 years ago • 15 comments

Hydrogen version * : 1.0.2 Operating system + version : Windows 10 Pro N, 10.0.19043 build 19043 Audio driver + version : Realtek onboard sound card


This issue also happens on my HP laptop which also has Windows 10 installed. The UI hangs periodically (roughly every couple of minutes), which sometimes shows the "Not Responding" message. If I'm playing a drum song, the timeline stops and I'm unable to click anything but the song continues to play and the app is operating fully as far as I can see.

When the ui resumes, any buttons I clicked are actioned and the timeline etc continues normally.


  • H2 version : see 'Info - About', or in case you build Hydrogen from source use 'git rev-parse HEAD' ** if you are reporting a bug, please describe how the bug can be reproduced

coalvilledave avatar Sep 01 '21 10:09 coalvilledave

Interesting. Can you enable debug logging (Debug -> Log level -> Debug from the main menu) and then open the debug log shortly after one of these hangs? (Debug -> Open Log File)

cme avatar Sep 01 '21 17:09 cme

Thanks for replying but the main menu only has "show audio engine info" under the Debug menu item?

coalvilledave avatar Sep 01 '21 21:09 coalvilledave

Sorry, I forgot how recently those menu options were added, I thought they'd been around longer, they're not in 1.0.2.

Instead, start Hydrogen with logging using:

"c:\Program Files\Hydrogen\hydrogen.exe" -V Debug

cme avatar Sep 01 '21 21:09 cme

I've done this, but where are the log files saved?

coalvilledave avatar Sep 03 '21 15:09 coalvilledave

Here's the log output - it froze once about 20 seconds in to the track I was playing:

Hydrogen 1.0.2 [Apr 11 2021] [http://www.hydrogen-music.org] Copyright 2002-2008 Alessandro Cominu Copyright 2008-2020 The hydrogen development team Hydrogen comes with ABSOLUTELY NO WARRANTY This is free software, and you are welcome to redistribute it under certain conditions. See the file COPYING for details. (I) Filesystem::check_sys_paths system wide data path c:/Program Files/Hydrogen/data/ is usable.[0m (I) Filesystem::path_usable create user directory : C:/Users/coalv/AppData/Local/Temp/hydrogen/[0m (I) Filesystem::check_usr_paths user path C:/Users/coalv/.hydrogen/data/ is usable.[0m (I) Filesystem::info Tmp dir : C:/Users/coalv/AppData/Local/Temp/hydrogen/[0m (I) Filesystem::info Click file : c:/Program Files/Hydrogen/data/click.wav[0m (I) Filesystem::info Empty song : c:/Program Files/Hydrogen/data/DefaultSong.h2song[0m (I) Filesystem::info Demos dir : c:/Program Files/Hydrogen/data/demo_songs/[0m (I) Filesystem::info Documentation dir : c:/Program Files/Hydrogen/data/doc/[0m (I) Filesystem::info System drumkit dir : c:/Program Files/Hydrogen/data/drumkits/[0m (I) Filesystem::info Empty sample : c:/Program Files/Hydrogen/data/emptySample.wav[0m (I) Filesystem::info Default config : c:/Program Files/Hydrogen/data/hydrogen.default.conf[0m (I) Filesystem::info Internationalization dir : c:/Program Files/Hydrogen/data/i18n/[0m (I) Filesystem::info Images dir : c:/Program Files/Hydrogen/data/img/[0m (I) Filesystem::info XSD dir : c:/Program Files/Hydrogen/data/xsd/[0m (I) Filesystem::info drumkit pattern XSD : c:/Program Files/Hydrogen/data/xsd/drumkit_pattern.xsd[0m (I) Filesystem::info drumkit XSD : c:/Program Files/Hydrogen/data/xsd/drumkit.xsd[0m (I) Filesystem::info drumkit XSD : c:/Program Files/Hydrogen/data/xsd/playlist.xsd[0m (I) Filesystem::info User config : C:/Users/coalv/.hydrogen/hydrogen.conf[0m (I) Filesystem::info User Click file : c:/Program Files/Hydrogen/data/click.wav[0m (I) Filesystem::info Cache dir : C:/Users/coalv/.hydrogen/data/cache/[0m (I) Filesystem::info Reporitories Cache dir : C:/Users/coalv/.hydrogen/data/cache/repositories/[0m (I) Filesystem::info User drumkit dir : C:/Users/coalv/.hydrogen/data/drumkits/[0m (I) Filesystem::info Patterns dir : C:/Users/coalv/.hydrogen/data/patterns/[0m (I) Filesystem::info Playlist dir : C:/Users/coalv/.hydrogen/data/playlists/[0m (I) Filesystem::info Plugins dir : C:/Users/coalv/.hydrogen/data/plugins/[0m (I) Filesystem::info Scripts dir : C:/Users/coalv/.hydrogen/data/scripts/[0m (I) Filesystem::info Songs dir : C:/Users/coalv/.hydrogen/data/songs/[0m (I) Preferences::Preferences INIT[0m (I) Preferences::loadPreferences Loading preferences file (SYS) [c:/Program Files/Hydrogen/data/hydrogen.default.conf][0m (W) LocalFileMng::checkTinyXMLCompatMode File 'c:/Program Files/Hydrogen/data/hydrogen.default.conf' is being read in TinyXML compatibility mode[0m (W) LocalFileMng::processNode node 'preferredLanguage' is not found[0m (W) LocalFileMng::readXmlString using default value : '' for node 'preferredLanguage'[0m (W) LocalFileMng::processNode node 'uiScalingPolicy' is not found[0m (W) LocalFileMng::readXmlInt using default value : '0' for node 'uiScalingPolicy'[0m (W) LocalFileMng::processNode node 'showPlaybackTrack' is not found[0m (W) LocalFileMng::readXmlBool using default value : 'false' for node 'showPlaybackTrack'[0m (W) LocalFileMng::processNode node 'exportDialogMode' is not found[0m (W) LocalFileMng::readXmlInt using default value : '0' for node 'exportDialogMode'[0m (W) LocalFileMng::readXmlString using default value : 'C:/Users/coalv' for node 'exportDialogDirectory'[0m (W) LocalFileMng::processNode node 'midiExportDialogMode' is not found[0m (W) LocalFileMng::readXmlInt using default value : '0' for node 'midiExportDialogMode'[0m (W) LocalFileMng::processNode node 'midiExportDialogDirectory' is not found[0m (W) LocalFileMng::readXmlString using default value : 'C:/Users/coalv' for node 'midiExportDialogDirectory'[0m (W) LocalFileMng::readXmlString using default value : '' for node 'lastSongFilename'[0m (W) LocalFileMng::readXmlString using default value : '' for node 'lastPlaylistFilename'[0m (W) LocalFileMng::readXmlString using default value : '' for node 'defaulteditor'[0m (I) Preferences::loadPreferences Loading preferences file (USER) [C:/Users/coalv/.hydrogen/hydrogen.conf][0m (W) LocalFileMng::processNode node 'preferredLanguage' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'preferredLanguage'[0m (W) LocalFileMng::readXmlString using default value : '' for node 'lastPlaylistFilename'[0m (W) LocalFileMng::readXmlString using default value : '' for node 'defaulteditor'[0m (I) ::int main(int, char**) Using QT version 5.15.2[0m (I) ::int main(int, char**) Using data path: c:/Program Files/Hydrogen/data/[0m (I) ::int main(int, char**) Warning: No Qt translation for locale en_GB found.[0m (I) ::int main(int, char**) Using locale: c:/Program Files/Hydrogen/data/i18n/[0m (I) Hydrogen::Hydrogen [Hydrogen][0m (I) ::void H2Core::audioEngine_init() *** Hydrogen audio engine init **[0m (I) AudioEngine::AudioEngine INIT[0m (I) Sampler::Sampler INIT[0m (I) Synth::Synth INIT[0m (I) ::void H2Core::audioEngine_startAudioDrivers() [audioEngine_startAudioDrivers][0m (I) ::H2Core::AudioOutput H2Core::createDriver(const QString&) Driver: 'PortAudio'[0m (I) PortAudioDriver::PortAudioDriver INIT[0m (I) PortAudioDriver::connect [connect][0m (W) ::void NsmClient::createInitialClient() No NSM URL available: no NSM management [0m (I) SongReader::readSong Reading Z:/Dave/Backing tracks/Tracks of my tears/drums.h2song[0m (W) LocalFileMng::processNode node 'playbackTrackFilename' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'playbackTrackFilename'[0m (I) Song::Song INIT 'Untitled Song'[0m (W) LocalFileMng::processNode node 'drumkit' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'drumkit'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using default value : '' for node 'info'[0m (W) LocalFileMng::processNode node 'info' is empty[0m (W) LocalFileMng::readXmlString using def

coalvilledave avatar Sep 04 '21 09:09 coalvilledave

May I should just download the 1.1.0 beta release?

coalvilledave avatar Sep 04 '21 09:09 coalvilledave

Hi! Sorry, I didn't get round to checking here until now. Piping the output to a file with ....\hydrogen.exe -V Debug > output.txt is almost certainly the most convenient way to get the output.

But, yes please, do try 1.1 beta! It would be good to discover if there's an issue that affects it before actually releasing 1.1. Thank you!

cme avatar Sep 04 '21 17:09 cme

Hi, I've tried 32 bit version and the new beta and this issue occurs on both.

coalvilledave avatar Sep 04 '21 20:09 coalvilledave

Hmm, that's unfortunate. If you have 1.1.0-beta1, could you get the complete debug log using the menus, and post here, please?

Also, which audio system are you using, PortAudio, or JACK?

I've been unable to replicate anything like this using my windows vm.

cme avatar Sep 04 '21 20:09 cme

Also, is this demonstrable with just one particular song, or can it be any song?

Thanks!

cme avatar Sep 04 '21 20:09 cme

I notice that the song you're working with is stored on Z:. Is this a network share that takes time to access? Hydrogen will auto-save the song if there have been any modifications every couple of minutes. If it takes any noticable amount of time to save to your network server, this might be the cause of the issue. You could confirm this by checking for the presence of *.autosave.h2song and seeing if the modification times line up with when you experienced the pause.

cme avatar Sep 04 '21 21:09 cme

Hi,

Bingo! when I move the song file to my desktop the issue doesn't occur (although watching the time arrow I can see a tiny pause every 20 seconds or so, presumably when it reading from the now local file). I'll copy the files onto my laptop's local drive for now. You may want to ticket this issue for fixing at some later date though. Many thanks for your help. I've been using the software to record drum and guitar tracks that our bass player can use to rehearse to and it's been spot on apart from this minor issue.

coalvilledave avatar Sep 05 '21 10:09 coalvilledave

Btw if you could point me to a donation link I would be happy to donate towards this project.

coalvilledave avatar Sep 05 '21 10:09 coalvilledave

Bingo! when I move the song file to my desktop the issue doesn't occur (although watching the time arrow I can see a tiny pause every 20 seconds or so, presumably when it reading from the now local file).

Excellent! How large is the the .h2song file, in this case? It's surprising that it takes 5 seconds for the network activity but I guess that depends on a lot of factors, and Windows is probably holding the thread up until it's flushed.

It would probably be better to do the auto save as a background worker process, I think that should be viable with only a small amount of code change :)

cme avatar Sep 05 '21 12:09 cme

The file is 143k. I'd give you a hand but I'm a C# developer by trade. Good work with this though.

coalvilledave avatar Sep 05 '21 20:09 coalvilledave