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

[suggestion?] wf::option_wrapper_t crash #638

Closed
damianatorrpm opened this issue Jul 27, 2020 · 4 comments · Fixed by #2214
Closed

[suggestion?] wf::option_wrapper_t crash #638

damianatorrpm opened this issue Jul 27, 2020 · 4 comments · Fixed by #2214
Labels
low-priority Issues that aren't likely to be resolved soon

Comments

@damianatorrpm
Copy link
Contributor

damianatorrpm commented Jul 27, 2020

	 wf::option_wrapper_t<bool> move_signal
	 {
		  "dbus_interface/move_signal"
	 };

whereas the .xml file defines it as a string (where it should be bool)

The wayfire plugins can be since recent commit in various directories.

it's probably right to crash wayfire if such a mismatch is there,
on plugin load or on startup when plugin is enabled by default.

If the plugin is loaded onto a running wayfire session,
wayfire crashes and you get a segfault, complaining about the mismatch.

The reason I am reporting this is that
if it's enabled before wayfire start the computer freezes and needs reboot.
No VT switch possible, though the SysRq keys are still working.

I could imagine that it blocks somehow the input and doesn't free it?
My question is where to report this?

@ammen99
Copy link
Member

ammen99 commented Jul 27, 2020

I belive this is a problem with the wf-config design as a whole, it does not let you dynamically load a plugin which was not available when starting wayfire. We could make core reload XMLs when loading new plugins, I'll have to check whether this won't have other issues though.

I also see now that the decision to crash on incorrect option may not be what we want, especially after startup (on startup, if an option is missing from the XML, then it is highly likely that wayfire has not been configured properly at all). I am not sure how to fix that.

@kode54
Copy link
Contributor

kode54 commented Jul 29, 2020

Ps safety note, sometimes crashed Wayfire console can be recovered with a ctrl c press. Or, if that doesn’t work, and you have working ssh, you can kill the stalled wayfire process there, like I had to the other day.

@soreau
Copy link
Member

soreau commented Jul 29, 2020

I also see now that the decision to crash on incorrect option may not be what we want, especially after startup (on startup, if an option is missing from the XML, then it is highly likely that wayfire has not been configured properly at all). I am not sure how to fix that.

What do you mean by this? Wayfire should be able to start without any config at all. If an option is missing from xml, this means there is code using an option but it is not in xml. The plugin in question is dbus and it is a developer mistake. It is annoying that wayfire can 'hang' in this case and ctrl+alt+bkspc does not exit. I think best would be to make sure wayfire exits properly and prints a clear error message.

@ammen99 ammen99 added the low-priority Issues that aren't likely to be resolved soon label Oct 28, 2020
@ammen99
Copy link
Member

ammen99 commented Jan 30, 2021

A new idea, just add a try-catch when loading plugins. This way, we can detect these errors, just print Fix your plugin in the log, and ignore the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low-priority Issues that aren't likely to be resolved soon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants