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

Upgrade causes lmms.exe to hang indeffinitely #3417

Closed
tresf opened this issue Mar 11, 2017 · 9 comments
Closed

Upgrade causes lmms.exe to hang indeffinitely #3417

tresf opened this issue Mar 11, 2017 · 9 comments

Comments

@tresf
Copy link
Member

tresf commented Mar 11, 2017

This was a simple uninstall/reinstall from LMMS 1.1.3 to LMMS 1.2.0-RC2. I've had this on multiple systems, but this is a fresh Windows XP VM I was testing on, so the config is pretty clean.

Deleting ~\.lmmsrc.xml allowed it to launch again. If not, Task Manager was required to kill lmms.exe.

1.1.3

<?xml version="1.0"?>
<!DOCTYPE lmms-config-file>
<lmms version="1.1.3">
  <MidiAlsaRaw device=""/>
  <app nomsgaftersetup="0" displaydbv="0" nommpz="0" configured="1"/>
  <audioportaudio backend="MME" device="Microsoft Sound Mapper - Input"/>
  <audiosdl device=""/>
  <mixer framesperaudiobuffer="256" hqaudio="0" audiodev="SDL (Simple DirectMedia Layer)" mididev="WinMM MIDI"/>
  <paths fldir="C:/Documents and Settings/Owner\/\" workingdir="C:/Documents and Settings/Owner\lmms\/\" stkdir="C:/Program Files/LMMS\data\stk/rawwaves/\/\" vstdir="C:\Program Files/VstPlugins/\" gigdir="C:/Documents and Settings/Owner/lmms/samples/gig/" artwork="\" defaultsf2="" sf2dir="C:/Documents and Settings/Owner/lmms/samples/sf2/" backgroundartwork="" laddir="C:/Program Files/LMMS\plugins\ladspa\"/>
  <tooltips disabled="0"/>
  <ui smoothscroll="0" compacttrackbuttons="0" enableautosave="0" animateafp="0" displaywaveform="0" oneinstrumenttrackwindow="0" printnotelabels="0" syncvstplugins="0"/>
  <recentfiles/>
</lmms>

After deleting ~\.lmmsrc.xml this is the file that was re-generated and did NOT cause it to crash...

1.2.0-rc2

<?xml version="1.0"?>
<!DOCTYPE lmms-config-file>
<lmms version="1.2.0-rc2">
  <app nomsgaftersetup="0" configured="1" disablebackup="0" displaydbfs="0" nommpz="0" openlastproject="0" language="en"/>
  <audioportaudio device="Microsoft Sound Mapper - Input" backend="MME"/>
  <audiosdl device=""/>
  <mixer framesperaudiobuffer="256" mididev="WinMM MIDI" audiodev="SDL (Simple DirectMedia Layer)" hqaudio="0"/>
  <paths backgroundartwork="" laddir="C:/Documents and Settings/Owner/lmms/plugins/ladspa/" vstdir="C:/Program Files/VstPlugins/" artwork="data:/themes/default/" gigdir="C:/Documents and Settings/Owner/lmms/samples/gig/" sf2dir="C:/Documents and Settings/Owner/lmms/samples/sf2/" workingdir="C:/Documents and Settings/Owner/lmms/" defaultsf2="" stkdir="data:/stk/rawwaves/"/>
  <tooltips disabled="0"/>
  <ui syncvstplugins="0" smoothscroll="0" enableautosave="0" displaywaveform="0" disableautoquit="0" saveinterval="2" animateafp="0" oneinstrumenttrackwindow="0" compacttrackbuttons="0" printnotelabels="0"/>
  <recentfiles/>
</lmms>
@musikBear
Copy link

but this is a fresh Windows XP VM I was testing on

Interesting. Several (win7 & 10) has had the need to delete the dot-file, but so far, i have never had any issue with the dot-file on XP(sp3-interprizeED)
I have up and down-graded many times, i wish i had made a log, but sorry i havent.
Could VM influence this? I only ask, because i really know nothing about VMs

@tresf
Copy link
Member Author

tresf commented Mar 12, 2017

Could VM influence

Not directly, although it could influence the name of the sound driver as well as the behavior trying to obtain a handle on the device but the unit test works when the xml has been deleted, suggesting it is likely not (virtual) hardware related.

The important part is that the above xml deadlocks, so it should be reproducible.

@DeRobyJ
Copy link
Contributor

DeRobyJ commented Mar 12, 2017

I do remember having lmms hang when deleting that file.
It would take a long time to recover, but it would eventually start, if I remember correctly.
Is testing needed? Win7 and Win8 here
Also is this windows only?

@musikBear
Copy link

musikBear commented Mar 13, 2017

I do remember having lmms hang when deleting that file.

@DeRobyJ -That is different and surprises me a lot. It is actually a fix for a hanging LMMS to remove the dot file, i have not heard that removing the dot-file would cause a hang?

@DeRobyJ
Copy link
Contributor

DeRobyJ commented Mar 13, 2017

Well now in 1.2 it works correctly on that matter

@tresf
Copy link
Member Author

tresf commented Mar 13, 2017

This turned out to be an interesting bug...

  • Bug is not reproducible on fresh install, upgrade from 1.1.3 - 1.2.0-RC2.

After examining the settings file, I noticed the offending config file had an invalid value artworkdir="\".

  • LMMS 1.1.3 loads properly but very slowly with this value, about 30 seconds.
  • LMMS 1.2.0-RC2 hangs at the splash screen (I gave up waiting after 8 minutes)

So I think we need an method to look for a proper theme before loading as something strange happens when there's no theme present.

tresf added a commit to tresf/lmms that referenced this issue Mar 16, 2017
Looks for style.css in theme path to help avoid invalid theme directories.
Closes LMMS#3417
@tresf
Copy link
Member Author

tresf commented Mar 16, 2017

Further testing... this bug does not seem to negatively impact Mac.

The software starts up immediately; successfully correcting the value \ to data:/themes/default/ and leaves the value / intact, but neither unit-test actually break the loading of the software.

Since there's room for base improvement, I'm patching the functionality anyway -- even if only to clean up the dialog & help out the Windows folks. Done via 7723d65.

@tresf
Copy link
Member Author

tresf commented Mar 16, 2017

7723d65 didn't fix it. I suspectQDir/QFile have a performance problem on Windows when \ or / are provided at the path. Testing the theory now with f153496.

@tresf tresf closed this as completed in 4708fe6 Mar 16, 2017
@tresf
Copy link
Member Author

tresf commented Mar 16, 2017

There's definitely something fishy with the way QDir/QFile work on Windows when a path of \ or / is provided. Interestingly enough, // and \\ don't cause the hang. Anyway, patched and tested via 4708fe6. Checking for the single slashes certainly fixes it, LMMS loads up immediately. I've also left a note about this bug in the source code since it's a non-obvious fix.

sdasda7777 pushed a commit to sdasda7777/lmms that referenced this issue Jun 28, 2022
Looks for style.css in theme path to help avoid invalid theme directories.
Explicitely avoid use of "/" on Windows to prevent hang.
Closes LMMS#3417
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants