[GH-ISSUE #104] [Bug] Unexpected termination when using external editor. #93

Closed
opened 2026-03-03 01:19:44 +03:00 by kerem · 12 comments
Owner

Originally created by @Vainyards on GitHub (Jun 3, 2022).
Original GitHub issue: https://github.com/d99kris/nmail/issues/104

Originally assigned to: @d99kris on GitHub.

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?

Originally created by @Vainyards on GitHub (Jun 3, 2022). Original GitHub issue: https://github.com/d99kris/nmail/issues/104 Originally assigned to: @d99kris on GitHub. 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<char>, std::__1::allocator<char> > const&) b 0x00000106 182 77d sqlite::database_binder::_prepare(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) c 0x00000106 182 61c sqlite::database::operator<<(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) d 0x00000106 1a2 550 ImapCache::GetBodys(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::set<unsigned int, std::__1::less<unsigned int>, std::__1::allocator<unsigned int> > 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_delete<std::__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?
kerem closed this issue 2026-03-03 01:19:44 +03:00
Author
Owner

@d99kris commented on GitHub (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).

<!-- gh-comment-id:1145721232 --> @d99kris commented on GitHub (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).
Author
Owner

@Vainyards commented on GitHub (Jun 3, 2022):

Hello

I have attached the log.txt here.

<!-- gh-comment-id:1145728277 --> @Vainyards commented on GitHub (Jun 3, 2022): Hello I have attached the log.txt here.
Author
Owner

@d99kris commented on GitHub (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.

<!-- gh-comment-id:1145737789 --> @d99kris commented on GitHub (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.
Author
Owner

@Vainyards commented on GitHub (Jun 3, 2022):

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

<!-- gh-comment-id:1145749118 --> @Vainyards commented on GitHub (Jun 3, 2022): That is done! Thanks for the fast suppport and advice! :)
Author
Owner

@d99kris commented on GitHub (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?

<!-- gh-comment-id:1161522110 --> @d99kris commented on GitHub (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?
Author
Owner

@Vainyards commented on GitHub (Jun 21, 2022):

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.

<!-- gh-comment-id:1161569530 --> @Vainyards commented on GitHub (Jun 21, 2022): 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.
Author
Owner

@d99kris commented on GitHub (Jun 21, 2022):

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

<!-- gh-comment-id:1161676074 --> @d99kris commented on GitHub (Jun 21, 2022): Ok, thanks. Can I also check if you're using macOS standard `Terminal` or some other terminal app?
Author
Owner

@Vainyards commented on GitHub (Jun 21, 2022):

I use iterm2, have not tried with standard Terminal.

<!-- gh-comment-id:1161699453 --> @Vainyards commented on GitHub (Jun 21, 2022): I use iterm2, have not tried with standard Terminal.
Author
Owner

@d99kris commented on GitHub (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.

<!-- gh-comment-id:1212093591 --> @d99kris commented on GitHub (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.
Author
Owner

@Vainyards commented on GitHub (Aug 12, 2022):

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=

<!-- gh-comment-id:1212771235 --> @Vainyards commented on GitHub (Aug 12, 2022): 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=
Author
Owner

@d99kris commented on GitHub (Aug 12, 2022):

Thanks 👍
Will hopefully get a fix in this weekend.

<!-- gh-comment-id:1213056544 --> @d99kris commented on GitHub (Aug 12, 2022): Thanks 👍 Will hopefully get a fix in this weekend.
Author
Owner

@d99kris commented on GitHub (Aug 13, 2022):

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

<!-- gh-comment-id:1214148483 --> @d99kris commented on GitHub (Aug 13, 2022): This should be fixed with above commit. Please let me know if you're still encountering any issues.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nmail#93
No description provided.