holzschu / holzschu/a-shell

Segmentation fault issues with `lg2`

Open
#974 21 comments 0 reactions 0 assignees View on GitHub
fix committed
Dominant language
Perl
Stars
3.9k
Forks
213
Avg merge
1m
Merged PRs (30d)
1

Description

I am currently using `lg2` to sync a git repository using a custom shell script, that I run using an iOS shortcut.

Here's the shortcut for a general idea.
Image

The issue with this shortcut though, `lg2 status` often errors out with `segmentation fault`s. I observed that if I manually open and exit a-Shell from the iOS app switcher, these segfaults go away -- actually, the `exit` bookend commands that you see in the above shortcut screenshot were added later, to simulate this behaviour.

However, I have noticed that `exit`s don't destroy the instance. When I open the app after running an `exit`, I am often times presented with an old instance. Added a short recording below that demonstrates this issue.

https://github.com/user-attachments/assets/8630c6fc-500b-47db-8fb4-3afa650cf04c

I am positive that if I can somehow program the proper "close everything" behaviour into the shortcut, I don't have to keep wrangling with the whole "open and close a-Shell before running the shortcut" act. I am presuming the segmentation faults have something to do with the shortcut creating a new session and not properly GC-ing the whole thing.

Any pointers on how to manage this better, if it can be managed in the first place, or a workaround if I am plainly missing something... are welcome and appreciated.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.