Bug 253796 - misc/mc: GLib-ERROR **: 15:55:28.036: ../glib/gmem.c:113: failed to allocate 18446744073709551588 bytes
Summary: misc/mc: GLib-ERROR **: 15:55:28.036: ../glib/gmem.c:113: failed to allocate ...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Alexey Dokuchaev
Depends on:
Reported: 2021-02-23 15:07 UTC by Marco Beishuizen
Modified: 2021-06-27 08:06 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Marco Beishuizen 2021-02-23 15:07:11 UTC

I get a glib error when trying to save a file by hitting F2 in mc. But it only happens when mc is running as root in an xterm, it doesn't happen when mc runs as user. As soon as I hit F2 I get:

(mc:73921): GLib-ERROR **: 15:55:28.036: ../glib/gmem.c:113: failed to allocate 18446744073709551588 bytes
                          Trace/BPT trap

Seems a lot of bytes what it's trying to allocate.
After the crash the xterm is also broken, scrolling with the mouse etc.

Comment 1 Ben Woods freebsd_committer 2021-05-22 02:24:04 UTC
Sorry, due to a lack of time I have reset the maintainer of this port back to ports@FreeBSD.org. Hopefully someone else is able to step in to help.
Resetting the assignee of this bug accordingly.
Comment 2 Marco Beishuizen 2021-05-22 09:24:43 UTC
Discovered that it has something to do with setting ncurses. Using the default slang works without problems.
Comment 3 Alexey Dokuchaev freebsd_committer 2021-06-24 08:28:39 UTC
I've rebuilt misc/mc with Ncurses instead of S-Lang, but could not reproduce this bug, under any user, X11 (xterm) or bare console.  We need more information, ideally the exact steps that definitely lead to a crash.
Comment 4 Alexey Dokuchaev freebsd_committer 2021-06-27 08:06:44 UTC
(In reply to Alexey Dokuchaev from comment #3)
> We need more information [...]
Nevermind, I've reproduced the crash and got a core dump.  The problem is with drawing shadows when the dialog window does not fit the screen (shrink your xterm window small enough and it will start crashing on every fart).  Should not be hard to fix; meanwhile, you can run mc(1) in colorless mode (with -b switch) to avoid hitting buggy code path.