folkertvanheusden / multitail

Tail on steroids
https://vanheusden.com/multitail/
MIT License
129 stars 13 forks source link

v7.1.2 crashes with "Cannot allocate memory" with --retry-all and certain row/column layouts #36

Open cbeams opened 5 months ago

cbeams commented 5 months ago
$ uname -a
Darwin x.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:52 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T8103 arm64 arm64 MacBookAir10,1 Darwin

$ multitail -v
 --*- multitail 7.1.2 (C) 2003-2022 by folkert@vanheusden.com -*--

If I tell multitail to watch three log files that do not yet exist (with --retry-all) in a layout of 3 columns having 2 rows in the first column, 1 row in the second column and 1 row in the third column, everything works as expected:

$ rm *.log ; multitail -s 3 -sn 2,1,1 --retry-all a.log b.log c.log

[ ... ncurses ui appears as expected ... ]

If I add a second row to the third column, again everything works as expected:

$ rm *.log ; multitail -s 3 -sn 2,1,2 --retry-all a.log b.log c.log

[ ... ncurses ui appears as expected ... ]

However, if I add a second row to the second column, multitail crashes as follows:

$ rm *.log ; multitail -s 3 -sn 2,2,1 --retry-all a.log b.log c.log
 --*- multitail 7.1.2 (C) 2003-2022 by folkert@vanheusden.com -*--

The following problem occured:
-----------------------------
Failed to reallocate a memory block to -12 bytes.
If this is a bug, please report the following information:
The last system call returned: 12 which means "Cannot allocate memory"