View Issue Details

IDProjectCategoryView StatusLast Update
0001060OpenMPTUser Interfacepublic2018-03-02 19:40
Reportergeoffswift Assigned ToSaga Musix  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx64OSWindowsOS Version10
Product VersionOpenMPT 1.27.02.00 / libopenmpt 0.3.2/0.3.3 (upgrade first) 
Target VersionOpenMPT 1.27.03.00 / libopenmpt 0.3.4 (upgrade first)Fixed in VersionOpenMPT 1.27.03.00 / libopenmpt 0.3.4 (upgrade first) 
Summary0001060: Can't eject USB stick after saving a module
Description

Having saved a module file, Windows says that the USB stick is in use until you quit OpenMPT. This applies even if you've closed the module file.

Steps To Reproduce
  1. Start OpenMPT
  2. Insert a USB stick
  3. Save a module to a USB stick.
  4. Close the module file
  5. Try to safely eject the USB stick -> Windows says it's in use.
  6. Quit OpenMPT
  7. Try to safely eject the USB stick -> No problems
Additional Information

At a guess, OpenMPT is setting its current working directory when saving a module. If you look at the list of recent files (on step 5), the path to the module is not fully qualified (perhaps a smoking gun to the current working directory being the same as where the file was saved).

Just checked and a similar kind of problem applies having done an "Export as lossless". Would need to investigate further to see what else might cause similar issues.

TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Activities

Saga Musix

Saga Musix

2017-11-11 18:36

administrator   ~0003343

Your conclusion is obvious, but OpenMPT itself does not actually change the working directory. However, opening a file dialog such as the "Save As" dialog seems to inevitably do exactly that. This can be verified by saving the file on a USB drive and then calling the save as dialog again and storing the file on another drive. I am not sure if we can work around this, because as said, OpenMPT does currently not change the working directory by itself and I think it should also not do that in the future.

geoffswift

geoffswift

2017-11-11 18:46

reporter   ~0003345

Have a read of this post. You can apparently prevent the working directory being changed as a result of using a file dialogue.

https://stackoverflow.com/questions/41244561/why-the-current-directory-changes

manx

manx

2017-11-11 18:50

administrator   ~0003346

Thanks for doing the required research. I think we should be able to set this flag.

Saga Musix

Saga Musix

2017-11-11 19:06

administrator   ~0003348

Thanks indeed, that should fix the problem.

Saga Musix

Saga Musix

2017-11-11 19:19

administrator   ~0003351

Flag added in r9258, which should be available in a few hours on https://builds.openmpt.org/builds/

Issue History

Date Modified Username Field Change
2017-11-11 18:27 geoffswift New Issue
2017-11-11 18:36 Saga Musix Note Added: 0003343
2017-11-11 18:46 geoffswift Note Added: 0003345
2017-11-11 18:50 manx Note Added: 0003346
2017-11-11 19:06 Saga Musix Note Added: 0003348
2017-11-11 19:19 Saga Musix Status new => feedback
2017-11-11 19:19 Saga Musix Target Version => OpenMPT 1.27.03.00 / libopenmpt 0.3.4 (upgrade first)
2017-11-11 19:19 Saga Musix Note Added: 0003351
2017-11-12 16:25 Saga Musix Assigned To => Saga Musix
2017-11-12 16:25 Saga Musix Status feedback => assigned
2017-11-12 16:25 Saga Musix Status assigned => feedback
2017-12-10 16:27 Saga Musix Status feedback => resolved
2017-12-10 16:27 Saga Musix Resolution open => fixed
2017-12-10 16:27 Saga Musix Fixed in Version => OpenMPT 1.27.03.00 / libopenmpt 0.3.4 (upgrade first)