Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 04-17-2024, 03:02 PM   #1
myrrc
Human being with feelings
 
Join Date: Dec 2022
Posts: 14
Default LV2 atom:path field is not always set correctly after reload

Steps to reproduce: insert an LV2 plugin with atom:Path field, fill it, restart Reaper. Chances are that field's value won't be show in UI drawn by
Reaper.

E.g. in https://github.com/swesterfeld/liquidsfz it's propagated correctly all
the time, but in https://github.com/x42/zconvo.lv2 or https://github.com/x42/convoLV2 it is not. Path is saved in file but not shown.

Plugins' sources (zconvo.lv and liquidsfz) are same in terms of saving presets and loading them (and also, informing UI), and they both show files in other DAWs (Ardour e.g.) so I believe it's a Reaper issue.

Reaper: v7.14 on Debian 13.
Attached Files
File Type: rpp 0-testing-zeroconvolver.RPP (6.1 KB, 150 views)
myrrc is offline   Reply With Quote
Old 04-17-2024, 07:08 PM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,806
Default

Hmm works fine here, on ubuntu and REAPER 7.15, using the latest from https://github.com/x42/zconvo.lv2 e.g


what version are you using?
Justin is online now   Reply With Quote
Old 04-18-2024, 03:16 PM   #3
myrrc
Human being with feelings
 
Join Date: Dec 2022
Posts: 14
Default

Hi Justin.

Latest master.
I've played with this issue, and strangely it does not "always" reproduce.
For some files it displays the name after restart, for some -- it doesn't
(e.g.
P http://gareus.org/oss/lv2/convoLV2#impulse /home/myrrc/music/lib/samples/_nes/AKWF_nes_triangle.wav 3
)
I believe it's purely a display issue.
Saving the project or enabling/disabling the plugin sometimes makes the plugin display the name.

For convo.lv2 the response is _sometimes_ displayed after saving the project.
But, for example, for (
P http://gareus.org/oss/lv2/convoLV2#impulse "/home/myrrc/music/lib/ir/samplicity-m7/Chambers - Deep Chamber.flac" 3


) the name is not displayed even after saving/re-enabling the plugin, leaving the field blank.

For zconvolv, the "Impulse response" field isn't filled after restart, unfortunately

I've checked on all Reaper versions for 6.0-7.15, the issue persists.

I've checked Ardour and jalv and all of these issues don't apply.

Here's an example video of what's happening when you load a plugin and then save the project, and it appears: https://disk.yandex.ru/i/CYI91uZH7_xtmQ

Last edited by myrrc; 04-18-2024 at 04:21 PM.
myrrc is offline   Reply With Quote
Old 04-20-2024, 10:23 AM   #4
myrrc
Human being with feelings
 
Join Date: Dec 2022
Posts: 14
Default

I had a theory it's related to spaces in name, but with files without any spaces it also happens. I've checked default, default 6. and default 7. themes as well, so it's not theme-related.
myrrc is offline   Reply With Quote
Old 04-26-2024, 03:06 PM   #5
myrrc
Human being with feelings
 
Join Date: Dec 2022
Posts: 14
Default

The worst part is that you can't browse the file when name is not displayed, so you can't see where was the initial selected file located. I can work around it with a Lua script, but this doesn't seem right
myrrc is offline   Reply With Quote
Old 04-26-2024, 03:11 PM   #6
myrrc
Human being with feelings
 
Join Date: Dec 2022
Posts: 14
Default

I can confirm that e.g. sfizz's UI drawn by Reaper doesn't show selected file, unfortunately
myrrc is offline   Reply With Quote
Old 04-28-2024, 05:31 AM   #7
myrrc
Human being with feelings
 
Join Date: Dec 2022
Posts: 14
Default

If you need some extra details/videos, please let me know
myrrc is offline   Reply With Quote
Old 05-01-2024, 03:41 PM   #8
myrrc
Human being with feelings
 
Join Date: Dec 2022
Posts: 14
Default

For problematic plugins e.g. file picker dialog is supplied wrong directories
(it should be the directory of selected file e.g. for for convo.lv2)

#0 BrowseForFiles (text=0x5f1eee0 "Import file for parameter impulse", initialdir=0x0, initialfile=0x7fffffffb9e0 "", allowmul=false,

(this is from swell).

I suppose the issue is somewhere in Reaper proprietary code and not in Swell
myrrc is offline   Reply With Quote
Old 05-01-2024, 03:48 PM   #9
myrrc
Human being with feelings
 
Join Date: Dec 2022
Posts: 14
Default

An example of correct file propagation to initialfile (liquidsfz)

Thread 1 "reaper" hit Breakpoint 6, BrowseForFiles (text=0x5ee2e20 "Import file for parameter SFZ File", initialdir=0x0,
initialfile=0x7fffffffb9e0 "/home/myrrc/music/lib/sfz/jlearman.jRhodes3d/jRhodes3d-sv.sfz", allowmul=false, extlist=0x7fffffffcf60 "All files (*.*)")
at swell-miscdlg-generic.cpp:1106
1106 allowmul ? BrowseFile_State::OPENMULTI : BrowseFile_State::OPEN, NULL, 0 );
myrrc is offline   Reply With Quote
Old 05-02-2024, 06:16 AM   #10
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,806
Default

Can you provide exact steps to reproduce (e.g. including cloning the exact git repository so I can be sure I'm using the same version)? thanks!
Justin is online now   Reply With Quote
Old 05-02-2024, 01:26 PM   #11
myrrc
Human being with feelings
 
Join Date: Dec 2022
Posts: 14
Default

Here's the complete log for reproducing the error.
Note: the issue persists with Reaper's default libSwell, I build my own version for attaching breakpoints.

~/src git clone https://github.com/x42/convoLV2; cd convoLV2
~/src/convoLV2 git log --oneline | head -n 1
30b8eba Add LV2 header location compatibility

~/src/convoLV2 make
~/src/convoLV2 cp build/* ~/.lv2/convo.lv2/


~/src/WDL cd WDL/swell/

~/src/WDL/WDL/swell git log --oneline | head -n 1
66786a5 virtwnd-access: improve macOS VoiceOver keyboard behavior for standalone sliders -- from 10fb845c

~/src/WDL/WDL/swell git diff swell-gdi-lice.cpp
diff --git a/WDL/swell/swell-gdi-lice.cpp b/WDL/swell/swell-gdi-lice.cpp
index e162e20..1e4e7e3 100644
--- a/WDL/swell/swell-gdi-lice.cpp
+++ b/WDL/swell/swell-gdi-lice.cpp
@@ -1777,7 +1777,7 @@ void ImageList_Destroy(HIMAGELIST list)

int ImageList_ReplaceIcon(HIMAGELIST list, int offset, HICON image)
{
- if (WDL_NOT_NORMALLY(!image || !list)) return -1;
+ //if (WDL_NOT_NORMALLY(!image || !list)) return -1;
WDL_PtrList<HGDIOBJ__> *l=(WDL_PtrList<HGDIOBJ__> *)list;

HGDIOBJ__ *imgsrc = (HGDIOBJ__*)image;


~/src/WDL/WDL/swell make ALLOW_WARNINGS=1 PRELOAD_GDK=1 DEBUG=1 libSwell.so
~/src/WDL/WDL/swell cp libSwell.so /opt/reaper/

~ <music/testing/swell.RPP grep impulse
P http://gareus.org/oss/lv2/convoLV2#impulse /home/myrrc/music/lib/ir/airwindows/AirportTerminal.flac 3


~ gdb --args /opt/reaper/reaper ~/music/testing/swell.RPP
(gdb) b BrowseForFiles

** Open project, see that convoLV2 plugin instance's window doesn't have file selected. Press Browse **

Thread 1 "reaper" hit Breakpoint 1, BrowseForFiles (text=0x4f1fde0 "Import file for parameter impulse", initialdir=0x0, initialfile=0x7fffffffb9c0 "",
allowmul=false, extlist=0x7fffffffcf40 "All files (*.*)") at swell-miscdlg-generic.cpp:1106
1106 allowmul ? BrowseFile_State::OPENMULTI : BrowseFile_State::OPEN, NULL, 0 );

initialfile should be populated



Reason for patching swell:

reaper: swell-gdi-lice.cpp:1780: int ImageList_ReplaceIcon(HIMAGELIST, int, HICON): Assertion `0 && !(!image || !list)' failed.

Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.


swell.rpp attached
Attached Files
File Type: rpp swell.RPP (4.3 KB, 40 views)
myrrc is offline   Reply With Quote
Old 05-03-2024, 07:23 AM   #12
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,806
Default

ah, what's interesting is that it shows the path correctly if the file does not exist, but if the file exists it fails. looking into why this is now.
Justin is online now   Reply With Quote
Old 05-03-2024, 09:46 AM   #13
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,806
Default

Aha, ok I think this is a bug in convo.lv2, I'll send a patch to Robin. Try this patch:


Code:
diff --git a/lv2.c b/lv2.c
index 3211cc3..5816edd 100644
--- a/lv2.c
+++ b/lv2.c
@@ -307,7 +307,7 @@ work_response(LV2_Handle  instance,
   self->clv_online  = self->clv_offline;
   self->clv_offline = old;
 
-  inform_ui(instance);
+  self->flag_notify_ui = 1;
 
   int d = CMD_FREE;
   self->schedule->schedule_work(self->schedule->handle, sizeof(int), &d);
Justin is online now   Reply With Quote
Old 05-03-2024, 10:00 AM   #14
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,806
Default

Considering this type of bug seems to be somewhat common (and probably surfaces because of REAPER's dynamic worker scheduling), perhaps we can workaround it on our end too.

Edit: workaround complete, next builds should fix this.

Last edited by Justin; 05-03-2024 at 10:47 AM.
Justin is online now   Reply With Quote
Old 05-04-2024, 02:51 PM   #15
myrrc
Human being with feelings
 
Join Date: Dec 2022
Posts: 14
Default

Thanks, Justin, with this patch the convolver works
myrrc is offline   Reply With Quote
Old 05-05-2024, 05:10 PM   #16
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,806
Default

Next build should fix this class of bug -- Robin pointed out a difference in the way our worker API was implemented.
Justin is online now   Reply With Quote
Old 06-03-2024, 11:06 AM   #17
myrrc
Human being with feelings
 
Join Date: Dec 2022
Posts: 14
Default

Hi! I've loaded Reaper 7.16, and unfortunately, this bug still reproduces on plugins like sfizz (headless version without UI).
Do I need to provide another reference project?
myrrc is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.