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

Segmentation fault when running as non-root on Arch Linux #126

Open
eskalVAR opened this issue Jun 16, 2022 · 3 comments
Open

Segmentation fault when running as non-root on Arch Linux #126

eskalVAR opened this issue Jun 16, 2022 · 3 comments

Comments

@eskalVAR
Copy link

I have compiled the package using the user provided : https://aur.archlinux.org/packages/notekit-clatexmath-git

clatexmath-git dependency is met by : https://aur.archlinux.org/packages/clatexmath-git


For some reason when I run the package by itself it seg faults:

`== This is notekit, built at Wed Jun 15 22:13:43 2022. ==
Detected paths:
Config: /home/viking/.config/notekit
Active notes path: /home/viking/.local/share/notekit
Default notes path: /home/viking/.local/share/notekit
Resource path: /usr/share/notekit

Segmentation fault (core dumped)


Running as sudo is fine :

== This is notekit, built at Wed Jun 15 22:13:43 2022. ==
Detected paths:
Config: /root/.config/notekit
Active notes path: /root/.local/share/notekit
Default notes path: /root/.local/share/notekit
Resource path: /usr/share/notekit

color1
autosave


GDB provides the following backtrace at segmentation fault:
#0 0x00007ffff5e9c8e9 in free () at /usr/lib/libc.so.6
#1 0x00007ffff668a9e1 in tex::LaTeX::queryResourceLocation(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&) () at /usr/lib/libclatexmath.so.0
#2 0x00007ffff668af69 in tex::LaTeX::init(std::__cxx11::basic_string<char, std::char_traits, std::allocator >) () at /usr/lib/libclatexmath.so.0
#3 0x0000555555593e12 in ()
#4 0x000055555558f6a1 in ()
#5 0x0000555555590132 in ()
#6 0x000055555558ff8e in ()
#7 0x00007ffff6d0ec9d in Glib::SignalProxyNormal::slot0_void_callback(_GObject*, void*) () at /usr/lib/libglibmm-2.4.so.1
#8 0x00007ffff77e1fd0 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#9 0x00007ffff780ea66 in () at /usr/lib/libgobject-2.0.so.0
#10 0x00007ffff77ffbe5 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff77ffe74 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#12 0x00007ffff6e0ef79 in () at /usr/lib/libgio-2.0.so.0
#13 0x00007ffff6e0f10c in g_application_run () at /usr/lib/libgio-2.0.so.0
#14 0x000055555558f979 in ()
#15 0x00007ffff5e29290 in () at /usr/lib/libc.so.6
#16 0x00007ffff5e2934a in __libc_start_main () at /usr/lib/libc.so.6
#17 0x0000555555578aa5 in ()`

@sp1ritCS
Copy link
Contributor

I know exactly what the issue is. I accidentally made cLaTeXMath free a statically allocated variable.

This should be addressed by NanoMichael/MicroTeX#86 . Alternatively you should also be able to unset XDG_DATA_HOME, then it should work too.

@eskalVAR
Copy link
Author

. Alternatively you should also be able to unset XDG_DATA_HOME, then it should work too.
Yes this does work! Wish I didn't have but it's an okay temporary fix.

Weird that the PR you linked hasn't been pulled in. I have yet to try that solution.

Thank you!

@towo
Copy link

towo commented Nov 21, 2022

FWIW, can confirm that unsetting XDG_DATA_HOME works.

That's a weird one.

For someone looking for a configuration-side easy fix, copy /usr/share/applications/com.github.blackhole89.notekit.desktop to $XDG_DATA_HOME/applications (SCNR — it's ~/.local/share/applications) and modify the Exec directive to read something like

Exec=env -u XDG_DATA_HOME notekit

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

3 participants