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

[Bug] Unexpected termination when using external editor. #104

Closed
Vainyards opened this issue Jun 3, 2022 · 12 comments
Closed

[Bug] Unexpected termination when using external editor. #104

Vainyards opened this issue Jun 3, 2022 · 12 comments
Assignees

Comments

@Vainyards
Copy link

Vainyards commented Jun 3, 2022

Im getting an error with "unexpected termination: 6" When using external editor.

It happens after I have written mail, and saves and quits. Both for nano and vim.

Normal inhouse mail writing seemes to be working fine.

´´
mbp@Sleipnir ~ nmail
unexpected termination: 6
0 0x00000106 229 4e7 Util::SignalCrashHandler(int)
1 0x07ff 81c 7c9 dfd _sigtramp
2 0x07fd d00 000 400
3 0x07ff 81c 6ff d24 abort
4 0x07ff 81c 770 082 abort_message
5 0x07ff 81c 761 1a5 demangling_terminate_handler()
6 0x07ff 81c 65d e19 _objc_terminate()
7 0x07ff 81c 76f 4a7 std::__terminate(void ()())
8 0x07ff 81c 771 d05 __cxa_get_exception_ptr
9 0x07ff 81c 771 ccc __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception
)
a 0x00000106 17e 3b9 sqlite::errors::throw_sqlite_error(int const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)
b 0x00000106 182 77d sqlite::database_binder::_prepare(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)
c 0x00000106 182 61c sqlite::database::operator<<(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)
d 0x00000106 1a2 550 ImapCache::GetBodys(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::set<unsigned int, std::__1::less, std::__1::allocator > const&, bool)
e 0x00000106 1b4 cea ImapIndex::HandleSyncEnqueue()
f 0x00000106 1b2 656 ImapIndex::Process()
10 0x00000106 1b7 04e void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, void (ImapIndex::)(), ImapIndex> >(void*)
11 0x07ff 81c 7b4 4e1 _pthread_start
12 0x07ff 81c 7af f6b thread_start
´´
Any clues on what's going on?

@d99kris d99kris self-assigned this Jun 3, 2022
@d99kris
Copy link
Owner

d99kris commented Jun 3, 2022

Hi, assuming this is easily reproduced, could you help reproduce the issue with extra verbose logging enabled? You can run nmail in offline mode to avoid having sensitive information logged (but better glance through the log before you share it):
nmail -ee -o
-ee is for extra verbose
-o is for offline mode

And then please send the log file ~/.nmail/log.txt to d99kris at gmail dot com (preferred), alternatively attach it here.

Thanks!
Kris

PS. FYI - I am not able to reproduce this problem (on Mac nor Ubuntu, tested emacs/nano/vim).

@Vainyards
Copy link
Author

Vainyards commented Jun 3, 2022

Hello

I have attached the log.txt here.

@d99kris
Copy link
Owner

d99kris commented Jun 3, 2022

Thanks, that was quick! I've downloaded the file now and will analyze it.

Btw, I noted that the log file somehow has some addresses from your address book. Feel free to delete the attachment above if you don't want others to access them.

@Vainyards
Copy link
Author

That is done!
Thanks for the fast suppport and advice! :)

@d99kris
Copy link
Owner

d99kris commented Jun 21, 2022

I wanted to confirm something:

It happens after I have written mail, and saves and quits. Both for nano and vim.

Does it mean it crashes immediately after save/quit of the external editor? Or does it crash once you try to send (CTRL-X) the email?

@Vainyards
Copy link
Author

it happens in both cases. From start it mostly works once, or crashes right after sent mail. Then it mostly works to edit, then when saving it crashes.

@d99kris
Copy link
Owner

d99kris commented Jun 21, 2022

Ok, thanks. Can I also check if you're using macOS standard Terminal or some other terminal app?

@Vainyards
Copy link
Author

I use iterm2, have not tried with standard Terminal.

@d99kris d99kris changed the title Unexpected termination when using external editor. [Bug] Unexpected termination when using external editor. Aug 1, 2022
@d99kris
Copy link
Owner

d99kris commented Aug 11, 2022

Hi, I think I know the root cause, I can reproduce a crash like that if I run nmail with certain locales, for example Swedish: LANG="sv_SE.UTF-8" nmail

Could you help run the command locale in your iterm2 and share its output? I just want to confirm that your configured locale is affected by this nmail bug. Meanwhile I'll prepare and test a fix for the locale issue.

@Vainyards
Copy link
Author

Hello

here is the output of locale of my iterm2:
LANG="sv_SE.UTF-8"
LC_COLLATE="sv_SE.UTF-8"
LC_CTYPE="sv_SE.UTF-8"
LC_MESSAGES="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_ALL=

@d99kris
Copy link
Owner

d99kris commented Aug 12, 2022

Thanks 👍
Will hopefully get a fix in this weekend.

@d99kris
Copy link
Owner

d99kris commented Aug 13, 2022

This should be fixed with above commit. Please let me know if you're still encountering any issues.

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

2 participants