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

AFP gets wrong path for .ds files #2412

Closed
softrabbit opened this issue Oct 13, 2015 · 14 comments
Closed

AFP gets wrong path for .ds files #2412

softrabbit opened this issue Oct 13, 2015 · 14 comments

Comments

@softrabbit
Copy link
Member

Noticed a project I loaded was missing samples in master. And then I noticed previewing .ds files and loading them from the file browser bar didn't work. Using the file browser in AFP works. A printf at the top of DrumSynth::GetDSFileSamples showed different paths being passed for a test file:

data:/samples/drumsynth/acoustic/Brush1.ds, the one that fails
/home/raine/src/lmms/target/share/lmms/samples/drumsynth/acoustic/Brush1.ds, install directory prepended, the one that works

@tresf
Copy link
Member

tresf commented Oct 16, 2015

Hmm... This may be duplicate of the LADSPA bugs we're getting reports of (#2403) and we've had a few changes since 1.1 that impact the search paths, namely: #1908, #1719.

@tresf
Copy link
Member

tresf commented Oct 16, 2015

I'm 99% sure this is introduced with #1719 as it replaces the data directory with data: in the string (e.g. dc1f8dc) Tagging @lukas-w as there seems to have been a few use-cases that were missed.

@tresf
Copy link
Member

tresf commented Oct 16, 2015

Initial investigation shows QDir is what is used to resolve plugins:, data:, etc. AFP isn't calling QDir, which means the selection dialog was fixed, but the AFP plugin was not.

Some plugins seem to call QDir whereas other don't, so I'm not sure if the fix needs to be in AFP source or in FileBrowser source...

@lukas-w
Copy link
Member

lukas-w commented Oct 17, 2015

Thanks for reporting @softrabbit and for investigating @tresf.

I guess this is what @zonkmachine tried to describe in his comment back in July in #1719. I wonder why he didn't explain the problem any further or opened an issue for it.

@zonkmachine
Copy link
Member

@lukas-w

I wonder why he didn't explain the problem any further or opened an issue for it.

Because I thought the bug was on my side.

@softrabbit
Copy link
Member Author

@lukas-w, are you sure you fixed this? I still see this behavior in master.

@softrabbit softrabbit reopened this Feb 9, 2016
@lukas-w
Copy link
Member

lukas-w commented Feb 9, 2016

Still works for me on 1290e33.

@softrabbit
Copy link
Member Author

OK, will dig deeper into this. To be sure, I blew away and recreated my target and build directories before pulling the latest souce and building, configured with cmake .. -DWANT_QT5=false -DCMAKE_INSTALL_PREFIX=../target -DCMAKE_BUILD_TYPE=DEBUG. Running from build directory, like this:

$ ../target/bin/lmms --version
LMMS 1.1.3-g1290e33
(Linux i386, Qt 4.8.6, GCC 4.8.4)
$ lsb_release -a |grep Description
Description:    Ubuntu 14.04.3 LTS
$ uname -or
3.13.0-58-generic GNU/Linux
$ ../target/bin/lmms ../target/share/lmms/projects/Demos/Skiessi/Skiessi-Onion.mmpz

Open the instrument for one of the .ds tracks, e.g. the fifth track, old_kik.ds. I have a flatline in AFP and it displays the filename drumsynth/r_n_b/old_kik.ds. Clicking the folder icon, the correct file is preselected and when I choose Open the file loads fine.

So I reinstated the printf I mentioned in the original message (printf("GetDSFileSamples: %s\n",dsfile); in DrumSynth::GetDSFileSamples), and it outputs this:

GetDSFileSamples: data:/samples/drumsynth/r_n_b/old_kik.ds
GetDSFileSamples: data:/samples/drumsynth/misc/electro_snare_layer.ds
GetDSFileSamples: data:/samples/drumsynth/misc/electronic_rim.ds
GetDSFileSamples: data:/samples/drumsynth/misc/it's_like_that_snare.ds
GetDSFileSamples: data:/samples/drumsynth/misc/it's_like_that_snare.ds
GetDSFileSamples: data:/samples/drumsynth/misc_hats/lighthat.ds
GetDSFileSamples: data:/samples/drumsynth/misc_hats/live_sound_hh.ds
GetDSFileSamples: data:/samples/drumsynth/electro/S_8bit.ds
GetDSFileSamples: data:/samples/drumsynth/electro/S_8bit.ds
GetDSFileSamples: data:/samples/drumsynth/electro/K_8bit.ds
GetDSFileSamples: data:/samples/drumsynth/electro/K_8bit.ds

@lukas-w
Copy link
Member

lukas-w commented Feb 10, 2016

Ah, that's a different issue. Your original report was about preview and opening from the sample browser bar. This is about loading a project that has the file saved as a relative path. Looking into it,

@softrabbit
Copy link
Member Author

@lukas-w, maybe a bit on the terse side, but the original report does mention loading a project...

@lukas-w
Copy link
Member

lukas-w commented Feb 10, 2016

Yeah, fair enough

@lukas-w lukas-w changed the title AFP gets wrong path for .ds files AFP gets wrong path for .ds files Feb 10, 2016
@lukas-w
Copy link
Member

lukas-w commented Feb 10, 2016

@softrabbit Can you confirm ca8f80d fixes it?

@softrabbit
Copy link
Member Author

Yes, it works now. Looks to me like this took care of #2468 as well 👍

@lukas-w
Copy link
Member

lukas-w commented Feb 11, 2016

Thanks for testing!

zonkmachine pushed a commit to zonkmachine/lmms that referenced this issue Feb 13, 2016
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

4 participants