hyprwm / hyprland-plugins

Official plugins for Hyprland
BSD 3-Clause "New" or "Revised" License
462 stars 43 forks source link

hyprexpo: can't load the plugin #120

Closed LOSEARDES77 closed 3 months ago

LOSEARDES77 commented 3 months ago

when i try to load the plugin with hyprpm it says everything was ok but when doing hyprctl plugin list says no plugins loaded

image

Logs i found usefull:

[LOG] [functionhook] assembler returned:

[LOG] [functionhook] assembler returned:
/tmp/hypr/.hookcode.asm: Assembler messages:
/tmp/hypr/.hookcode.asm:7: Error: operand type mismatch for `movabs'

[ERR] [functionhook] failed, unsupported asm / failed assembling:
push %r12
push %rbp
mov %rsi, %rbp
push %rbx
mov %rdi, %rbx
sub $0x60, %rsp
movzx 0x291fbb(%rip), %eax

[ERR]  [PluginSystem] Plugin /home/loseardes77/.local/share/hyprpm/hyprland-plugins/hyprexpo.so (Handle 1f09290) crashed in init. Unloading.
[LOG]  [PluginSystem] Plugin  unloaded.

I'm on latest git version of hyprland

i have tryed to compile separated and load with hyprctl but i get the same logs and this error message on hyprctl:

error in loading plugin, last error: Plugin /home/loseardes77/Repos/hyprland-plugins/hyprexpo/hyprexpo.so could not be loaded: plugin crashed/threw in main: [he] Failed initializing hooks
vaxerski commented 3 months ago

https://github.com/hyprwm/Hyprland/blob/main/CMakeLists.txt#L95-L95

try compiling hyprland with -no-pie -fno-pic

LOSEARDES77 commented 3 months ago

https://github.com/hyprwm/Hyprland/blob/main/CMakeLists.txt#L95-L95

try compiling hyprland with -no-pie -fno-pic

I get the exact same logs

vaxerski commented 3 months ago

ugh, I have to find a better way to patch relative addressing

LOSEARDES77 commented 3 months ago

I thought this had to be with my pc. So is a bug with the hook system?

vaxerski commented 3 months ago

yah

LOSEARDES77 commented 3 months ago

Still can't see why it works for other people then but i believe in you to fix it <3

vaxerski commented 3 months ago

patch.txt try this for hyprland

LOSEARDES77 commented 3 months ago

Do i need to refresh the Hyprland session?

vaxerski commented 3 months ago

refresh? it's a patch, recompile it with it

LOSEARDES77 commented 3 months ago

I mean after compiling installing exit hyprland and re enter or only the Headers is what matters?

vaxerski commented 3 months ago

yea re enter its a code patch

LOSEARDES77 commented 3 months ago
[LOG] [functionhook] assembler returned:

[LOG] [functionhook] assembler returned:
/tmp/hypr/.hookcode.asm: Assembler messages:
/tmp/hypr/.hookcode.asm:7: Error: no such instruction: `movz -0x7f6d71c27235(%rip),%eax'

[ERR] [functionhook] failed, unsupported asm / failed assembling:
push %r12
push %rbp
mov %rsi, %rbp
push %rbx
mov %rdi, %rbx
sub $0x60, %rsp
movzx 0x29230b(%rip), %eax

[ERR]  [PluginSystem] Plugin /home/loseardes77/Repos/hyprland-plugins/hyprexpo/hyprexpo.so (Handle 21f84e0) crashed in init. Unloading.
[LOG]  [PluginSystem] Plugin  unloaded.
LOSEARDES77 commented 3 months ago

I recompiled the plugin too with new headers just in case

vaxerski commented 3 months ago

right that won't work... hm.

vaxerski commented 3 months ago

patch.txt try this

LOSEARDES77 commented 3 months ago

What shoudl i answer here when patching? image

vaxerski commented 3 months ago

oops I did a dumb and molten 2 patches together. Gimme sec

vaxerski commented 3 months ago

patch.txt fixed

LOSEARDES77 commented 3 months ago

the patch is only for the HookSystem.cpp and hpp right?

LOSEARDES77 commented 3 months ago

Ok now works fine. Thanks you!

vaxerski commented 3 months ago

well wait for me to commit it lol

vaxerski commented 3 months ago

done, enjoy

gptlang commented 3 months ago

image

I still seem to be getting the same problem