Device registration broken with certain actions present in profiles
Moving discussion from #OpenDeck on Arch Linux
70 Replies
So this is what I've understood @Percy_Ikana:
- 2.whatever you were on before works
- 2.2.1 from AUR is working fine
- 2.3.0 AppImage is blank (could you try the steps in #25?)
- 2.3.1/-git device does not register
That means 13860cd (a commit you said worked https://discord.com/channels/1143819637897834571/1143819638732505130/1306023316959789117) and below are safe, bug introduced somewhere later than that
I think that seeing whether 2.3.0 works or not would be the next most productive step, and if you can't get the AppImage working in a couple of minutes then building from source will be helpful anyway so that we can go back commit by commit very easily (
git reset --hard HEAD~1
)
Commands to run from source:
- git clone --recurse-submodules https://github.com/ninjadev64/OpenDeck.git
- cd OpenDeck
- deno install
- deno task tauri build
@Terrorwolf as well sorry@Percy_Ikana Is it all Materialdeck actions or just certain? And with what configuration of the button does it happen?
While terrorwolf's suggestion is not unhelpful I do request that we first try determining the opendeck commit in which this started occurring because it will be much easier for me to resolve the issue that way - ultimately, this is an opendeck bug and not a material deck one, whether certain MD actions work or not may simply be coincidence, as well as the fact that this issue almost certainly concerns other plugins
I am just asking, because with my pc its not yet reproducible and I had hoped that maybe with a specific setting I can force the problem. Maybe we can also find a helpful information when my VM is ready.
Yes, when I get back to my computer I will attempt to get 2.3.0 working, (what is #25 in this context)
Thank you both for helping
no problem
#25 is GitHub issue 25, it's to do with blank windows
Thanks.
The only difference I can see between your 2.2.1 profiles and 2.3.1 ones are that the font sizes have become numbers and that the base64 image URLs have been saved as files instead
Which all seems normal
I think when you have time to build from source, I can ask you to put various debugging statements in places and we can see what happens
I will let you know.
the env var did not help
Im on an AMD GPU
Okay thats all I have time for its 0:30
Try removing the && before attempting building from source
Hi,
Sorry I have not been sucessful in Piping my Streamdeck to my VM. I will try again after the Holidays. (Propably 26th or 27th.)
building fails due to appimage problems
NO_STRIP=true deno task tauri build
Many other arch users have had that work
okay, that worked, how do I launch it lol
just from the built releases?
Okay, built app image works, and shows the same behavior
so tomorrow ill step back through commits and see what works
Cool
The white screen also happened to me in my VM right now. I needed to add my User to a Group to properly pipe my streamdeck into my vm. Proplem does not happen on my live system.
Next step to rule kde out, i will try to setup endeavouros with gnome.
Forgot to mention: tried on both systems with tge newest appimage from github.
Same Problem with EOS and GNOME.
You are using the WEBKIT_DISABLE_DMABUF_RENDERER variable or whatever it is right?
at my live system, yes
should I also try it in my vm?
9e3d675 is the last commit that works
wait im a moron one sec
574559b is the last commit that works
https://github.com/ninjadev64/OpenDeck/commit/0e191c295f925d986fe36d32e5f85095945f7ae8
So I would assume one of the changes here is what broke things.
Oh, interesting?
It’ll be a deadlock with the INSTANCES mutex then
That is not where I thought the bug would be, but that’s very helpful, thanks - I should be able to fix it next time I get time
Out all day today though
Yes of course, that’s the first step to try when the window is blank
Just let me know when to test something!
Absolutely no rush, it's holidays and I at least have a working version atm
When you've got time, could you try adding:
-
drop(categories);
after line 53 (creating line 54) of src-tauri/src/store/profiles.rs
- surrounding lines 81 to 97 of src-tauri/src/plugins/mod.rs in {}
, id est adding a {
on line 80 and a }
on line 98
I'm not sure it will fix the problem but it's worth a try
you can do that on the latest source or the 0e191c2 source, but latest is probably betterHave a good christmas!
Merry Christmas
Oh, whoops, also add
.clone()
to the end of line 53 (before the semicolon)
Merry Christmas!what lol
gimme a sec
no worries lol I just got back to a computer to try it
this laptop is taking ages to get itself together
not at my normal pc
ok, i was trying to avoid actually building the thing, but i guess i am now
because the ide error stuff isnt working
try moving the .clone between the .values() and the .flatten()
or don't until i check that it works
ok replace the line with this
let actions = categories.values().flatten().map(|x| x.to_owned()).collect::<Vec<_>>();
insteadI need to just learn rust
its usually not too hard as the ide tells u immediately that u borrowed smth wrong
but harder when that's gone, like it is for me rn
Yhea, I know Cpp, although its been years since I worked with it
so its a "I just need to actually learn how rust functions"
Ive been lazy af recently and I only use Python for my job so I havent looked at anything else
also you are right
It did not fix the issue
it did build though!
ah shame
im tryna get this thing to even run on the laptop rn, some macos-related tauri panic
how about replacing lines 57 to 59 with
true
?
like thatall of this?
with this yea
am I keeping or removing the drop and clone?
shouldn't matter
keep it
Kay
then if that works, undo it and replace just
!futures::executor::block_on(crate::plugins::is_plugin_registered(&instance.action.plugin))
with true
That worked
both?
sorry just the first
about to test the second
its working
nice, also annoying
Okay I was trying to send you the code as is, but discord wont let me, thanks
there.
ok, one more thing to try
gimme a sec
should I reset to base for this, or continue adding?
you can reset
I just want to make sure we are on the same code
you can re-add the second one of these though
mod.rs 80-98 has been surrounded.
then, replace that keep_instance function with this
and replace mod.rs
is_plugin_registered
function with this one
hopefully works 🤞
discord is bugging
Your message could not be delivered. This is usually because you don't share a server with the recipient or the recipient is only accepting direct messages from friends. You can see the full list of reasons here: https://support.discord.com/hc/en-gb/articles/360060145013
yhea im getting that as well for half of my messages
i was just gonna send the whole thing to make it easier for u
it helps if I save the file before building...
Its fine, im not as good as you but I am a software dev lol
lol
they really need to make the rust compiler faster
this shit takes ages
I need to check how many cores its using
also, its working
oh awesome
that can just be the fix then
the only parts of this code I ever really knew was the display part
So what was broken, and how did this fix it?
so what the buggy code had was an is_plugin_registered function to check whether or not a plugin was registered, and that locked the mutex every time it was called
but instead i just pulled some stuff out of that function so that it could be called only once in the parent function that was calling it, locking and then unlocking the mutex quickly which seems to be preventing the deadlock
please do just run it again to check it isnt a race condition
Threading!
I did, ive restarted it a couple times and made profile edits between
cool cool
Ill be using this for DnD (pathfinder, but im not fighting 18 years of calling thursday nights dnd) today, I will let you know if I experience any issues.
awesome, have fun
Enjoy the rest of your holiday!