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

Latest release hangs on startup (macOS 12.7.4) #4270

Open
bmclean2 opened this issue Apr 23, 2024 · 8 comments · May be fixed by #4277
Open

Latest release hangs on startup (macOS 12.7.4) #4270

bmclean2 opened this issue Apr 23, 2024 · 8 comments · May be fixed by #4277
Labels
has:bisect Git bisect performed type:bug Bug

Comments

@bmclean2
Copy link

Expected Behaviour

neomutt starts up

Actual Behaviour

neomutt hangs indefinitely on "Sorting Mailbox..."

If NeoMutt crashed, did your OS create a 'coredump' file?

n/a

How often does this happen?

  • Always

When did it start to happen?

  • When I upgraded
    Which version did you use to use?

20240416 release

NeoMutt Version

NeoMutt 20240416
Copyright (C) 2015-2024 Richard Russon and friends
NeoMutt comes with ABSOLUTELY NO WARRANTY; for details type 'neomutt -vv'.
NeoMutt is free software, and you are welcome to redistribute it
under certain conditions; type 'neomutt -vv' for details.

System: Darwin 21.6.0 (x86_64)
ncurses: ncurses 6.4.20221231 (compiled with 6.4.20221231)
libiconv: 1.17
libidn2: 2.3.7 (compiled with 2.3.7)
GPGME: 1.23.2
OpenSSL: OpenSSL 3.2.1 30 Jan 2024
libnotmuch: 5.6.0
PCRE2: 10.43 2024-02-16
storage: tokyocabinet, lmdb
compression: zlib

Configure options: --sysconfdir=/usr/local/etc --autocrypt --gss --disable-idn --idn2 --lmdb --nls --notmuch --pcre2 --sasl --sqlite --tokyocabinet --zlib --with-idn2=/usr/local/opt/libidn2 --with-lua=/usr/local/opt/lua --with-ncurses=/usr/local/opt/ncurses --with-ssl=/usr/local/opt/openssl@3 --with-sqlite=/usr/local/opt/sqlite --with-iconv=/usr/local/opt/libiconv --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/neomutt/20240416 --libdir=/usr/local/Cellar/neomutt/20240416/lib

Compilation CFLAGS: -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__ -D_XOPEN_SOURCE_EXTENDED -I/usr/local/opt/libgpg-error/include -I/usr/local/Cellar/libassuan/2.5.7/include -I/usr/local/Cellar/gpgme/1.23.2_1/include -I/usr/local/Cellar/neomutt/20240416/include -I/usr/local/include/lua -I/usr/local/Cellar/neomutt/20240416/include -I/usr/local/Cellar/neomutt/20240416/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/neomutt/20240416/include -DNCURSES_WIDECHAR -I/usr/local/opt/ncurses/include -I/usr/local/opt/libiconv/include -I/usr/local/Cellar/openssl@3/3.2.1/include -I/usr/local/Cellar/libidn2/2.3.7/include -I/usr/local/Cellar/pcre2/10.43/include -I/usr/local/opt/lmdb/include -I/usr/local/Cellar/tokyo-cabinet/1.4.48/include -I/usr/local/Cellar/neomutt/20240416/include -O2

Compile options:
  +autocrypt +fcntl -flock -fmemopen +futimens +getaddrinfo -gnutls +gpgme
  -gsasl +gss +hcache -homespool +idn -inotify -locales_hack +lua -mixmaster
  +nls +notmuch +openssl +pcre2 +pgp +sasl +smime +sqlite +truecolor

MAILPATH="/var/mail"
PKGDATADIR="/usr/local/Cellar/neomutt/20240416/share/neomutt"
SENDMAIL="/usr/sbin/sendmail"
SYSCONFDIR="/usr/local/etc"

Extra Info

Here's the last several lines of neomutt -d 5 with private portions changed. It hangs at this same spot on every startup.

[2024-04-23 19:10:32]<5> mutt_addr_is_user() no, all failed
[2024-04-23 19:10:32]<5> mutt_addr_is_user() no, all failed
[2024-04-23 19:10:32]<5> mutt_addr_is_user() #5 yes, randomguy@gmail.com = randomguy@gmail.com
[2024-04-23 19:10:32]<2> maildir_msg_open() File opened (fd=7): path_to_mail/mail/mailboxname/INBOX/cur/1713901892.7319_3.randomguys-mbp,U=5697:2,S
[2024-04-23 19:10:32]<2> parse_parameters() 'charset=utf-8'
[2024-04-23 19:10:32]<2> parse_parameters() parse_parameter: 'charset' = 'utf-8'
[2024-04-23 19:10:32]<1> mutt_read_mime_header() bogus MIME header: 
[2024-04-23 19:10:32]<2> parse_parameters() 'charset=UTF-8; name="Electronic ticket receipt, July 08 for MR xxxxxxx xxxxxxx.pdf"'
[2024-04-23 19:10:32]<2> parse_parameters() parse_parameter: 'charset' = 'UTF-8'
[2024-04-23 19:10:32]<2> parse_parameters() parse_parameter: 'name' = 'Electronic ticket receipt, July 08 for MR xxxxxxx xxxxxxx.pdf'
[2024-04-23 19:10:32]<2> parse_parameters() 'filename="Electronic ticket receipt, July 08 for MR xxxxxxx xxxxxxx.pdf"'
[2024-04-23 19:10:32]<2> parse_parameters() parse_parameter: 'filename' = 'Electronic ticket receipt, July 08 for MR xxxxxxx xxxxxxx.pdf'
[2024-04-23 19:10:32]<1> mutt_read_mime_header() bogus MIME header: 
[2024-04-23 19:10:32]<5> count_body_parts() desc="none"; fn="(none)", type="6/mixed"
[2024-04-23 19:10:32]<3> count_body_parts_check() [OK]    6/mixed ?? text/plain [7]... [2024-04-23 19:10:32]<3> count_body_parts_check() no
[2024-04-23 19:10:32]<3> count_body_parts_check() [EXCL]  6/mixed ?? message/external-body [4]... [2024-04-23 19:10:32]<3> count_body_parts_check() no
[2024-04-23 19:10:32]<3> count_body_parts() 0x60000294c000 shallcount = 0
[2024-04-23 19:10:32]<3> count_body_parts() 0x60000294c000 pre count = 0
[2024-04-23 19:10:32]<5> count_body_parts() desc="none"; fn="(none)", type="7/html"
[2024-04-23 19:10:32]<3> count_body_parts() 0x60000294c0c0 shallcount = 0
[2024-04-23 19:10:32]<5> count_body_parts() desc="none"; fn="Electronic ticket receipt, July 08 for MR xxxxxxx xxxxxxx.pdf", type="2/pdf"
[2024-04-23 19:10:32]<3> count_body_parts_check() [OK]    2/pdf ?? */.* [9]... [2024-04-23 19:10:32]<3> count_body_parts_check() yes
[2024-04-23 19:10:32]<3> count_body_parts_check() [EXCL]  2/pdf ?? text/vcard [7]... [2024-04-23 19:10:32]<3> count_body_parts_check() no
[2024-04-23 19:10:32]<3> count_body_parts_check() [EXCL]  2/pdf ?? text/x-vcard [7]... [2024-04-23 19:10:32]<3> count_body_parts_check() no
[2024-04-23 19:10:32]<3> count_body_parts_check() [EXCL]  2/pdf ?? application/pgp.* [2]... [2024-04-23 19:10:32]<3> count_body_parts_check() no
[2024-04-23 19:10:32]<3> count_body_parts_check() [EXCL]  2/pdf ?? application/pkcs7-.* [2]... [2024-04-23 19:10:32]<3> count_body_parts_check() no
[2024-04-23 19:10:32]<3> count_body_parts_check() [EXCL]  2/pdf ?? application/x-pkcs7-.* [2]... [2024-04-23 19:10:32]<3> count_body_parts_check() no
[2024-04-23 19:10:32]<3> count_body_parts_check() [EXCL]  2/pdf ?? message/external-body [4]... [2024-04-23 19:10:32]<3> count_body_parts_check() no
[2024-04-23 19:10:32]<3> count_body_parts() 0x6000029a7540 shallcount = 1
[2024-04-23 19:10:32]<3> count_body_parts() return 1
[2024-04-23 19:10:32]<3> count_body_parts() 0x60000294c000 post count = 1
[2024-04-23 19:10:32]<3> count_body_parts() return 1
[2024-04-23 19:10:32]<1> mutt_body_free() not unlinking Electronic ticket receipt, July 08 for MR xxxxxxx xxxxxxx.pdf
[2024-04-23 19:10:32]<2> maildir_msg_close() File closed (fd=7)
[2024-04-23 19:10:32]<5> mutt_addr_is_user() no, all failed

* macOS 12.7.4
* Were you using multiple copies of NeoMutt at once? No
* Were you using 'screen' or 'tmux'? No
* Is your email local (maildir) or remote (IMAP)? maildir

@bmclean2 bmclean2 added the type:bug Bug label Apr 23, 2024
@bmclean2 bmclean2 changed the title Latest release hangs on startup (macOS 12) Latest release hangs on startup (macOS 12.7.4) Apr 23, 2024
@roccoblues
Copy link
Member

Hi, to clarify: the title says "Latest release ...". Is it only happening with 20240416? If you switch back to a previous version this does not happen?

@bmclean2
Copy link
Author

bmclean2 commented Apr 24, 2024

20240329 starts up normally. I compiled it with the same options as the homebrew version except truecolor—couldn't figure out how to turn that on. So yes, only with 20240416

@roccoblues
Copy link
Member

Sorry about that. Are you maybe able to bisect the issue to a specific commit? Also can you try with the latest main?

I'm also on macOS, these are my usual configure options:

./configure --notmuch --with-notmuch=/opt/homebrew/opt/notmuch --disable-doc --disable-nls --lmdb --zlib --idn2 --with-idn=/opt/homebrew/opt/libidn2 --with-iconv=/opt/homebrew/opt/libiconv --with-ncurses=/opt/homebrew/opt/ncurses

truecolor depends on the ncurses version, afaik.

@bmclean2
Copy link
Author

bmclean2 commented Apr 25, 2024

The bisect found 9325596 as the problematic commit. Worth mentioning that while I was bisecting, 7520d13 printed this to the screen: Assertion failed: (DTYPE(he_base->type) == DT_STRING), function cs_subset_string, file helpers.c, line 301.

Edit (flatcap) unquote commits so that GitHub links them

@flatcap flatcap added the has:bisect Git bisect performed label Apr 25, 2024
@flatcap
Copy link
Member

flatcap commented Apr 25, 2024

Thanks, @bmclean2 that's very helpful.
The 'Assertion failure' is expected -- the code was undergoing some major changes in that side-branch.

Please can I ask that you do some different bisection, now -- that of your config.
First, please check that the basic NeoMutt works; zero config:

neomutt -n -F /dev/null

If that works, and I really hope it does, please can you comment out half of your config and start up NeoMutt.
If that works, try the other half.
Then repeat with smaller blocks.

One or more config lines is causing NeoMutt to get into a loop.
If you can find one, I can fix it.

Thanks ❤️

@bmclean2
Copy link
Author

bmclean2 commented Apr 26, 2024

@flatcap, I did some more playing around on 20240416. This line is the culprit:

folder-hook . "set index_format='%3C %4Z %?X?& ? %D %-20.20F %.70s (%-4.4c) %>'"

Specifically, if I change the %4Z to %4z, it works. I'm not sure if this is a bug or a feature. The docs state that %Z should work, and indeed it worked in previous versions.

@flatcap flatcap linked a pull request Apr 26, 2024 that will close this issue
@flatcap
Copy link
Member

flatcap commented Apr 26, 2024

Great find! (but I don't think %Z is to blame)
There's a mistake at the end of your format string.
The %> (hard padding) expando is missing the pad character.
It should read %> (percent, greater-than, space).

The parser ought to catch this.
For now, I've changed the code to default to (space).

Please can you give branch [devel/padding] a try (#4277)

Thanks

@bmclean2
Copy link
Author

Can confirm that the original problem is rectified by %> .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has:bisect Git bisect performed type:bug Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants