* autoloaded colors() crashes with out of memory error
@ 2014-08-04 21:22 Marc Cornellà
2014-08-05 16:28 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Marc Cornellà @ 2014-08-04 21:22 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]
DISCLAIMER: this is my first email to zsh-users, be gentle :D
Hi,
I'm a collaborator within the oh-my-zsh project. One of our users[1] has
two boxes where he
connects via ssh, both at Digital Ocean, that crash whenever this code runs:
autoload colors && colors
We've separated the statement, and we see that it crashes on `colors'. But
since the function is
autoloaded, we can't know what will run before we run it:
$ autoload -t colors
$ which colors
colors () {
# undefined
# traced
builtin autoload -Xt
}
$ colors
colors:3: fatal error: out of memory
Connection to server closed.
We tried using the `autoload +X` construct to force loading the definition
of the function so we can
see what's wrong with it, but that also run out of memory.[2]
We also tried sourcing directly the officially provided colors file from
/usr/share/zsh/functions/Misc/colors,
and colors worked fine.
Is there any way to find out where zsh is sourcing the colors definition
from, or is this a bug in itself?
Any response will be appreciated. Thanks!
[1] https://github.com/robbyrussell/oh-my-zsh/issues/1815
[2]
https://github.com/robbyrussell/oh-my-zsh/issues/1815#issuecomment-50936620
--
Marc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: autoloaded colors() crashes with out of memory error
2014-08-04 21:22 autoloaded colors() crashes with out of memory error Marc Cornellà
@ 2014-08-05 16:28 ` Bart Schaefer
2014-08-06 20:07 ` Marc Cornellà
0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2014-08-05 16:28 UTC (permalink / raw)
To: Marc Cornella, zsh-users
On Aug 4, 11:22pm, Marc Cornella wrote:
}
} $ autoload -t colors
} $ which colors
} colors () {
} # undefined
} # traced
} builtin autoload -Xt
} }
} $ colors
} colors:3: fatal error: out of memory
} Connection to server closed.
The expression
print -l -- ${^fpath}/colors(|.zwc)(N)
should find the source from which colors is being autoloaded, unless there
is a zwc "digest file" containing multiple function definitions. Look at
for zwc in ${^fpath}/*.zwc(N)
do
print -- $zwc
zcompile -t $zwc
done
to see if there might be any such. Zsh tries to detect when a .zwc file
is from a different zsh version and avoid loading it, but there may be
cases where that's failing.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: autoloaded colors() crashes with out of memory error
2014-08-05 16:28 ` Bart Schaefer
@ 2014-08-06 20:07 ` Marc Cornellà
0 siblings, 0 replies; 3+ messages in thread
From: Marc Cornellà @ 2014-08-06 20:07 UTC (permalink / raw)
To: Bart Schaefer; +Cc: zsh-users
Thanks, man! The user got it to work again, he had a `colors`
directory from his vim config being autoloaded instead.
Next time I'll try the mailing list sooner haha
Again, thank you very much! :)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-06 20:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-04 21:22 autoloaded colors() crashes with out of memory error Marc Cornellà
2014-08-05 16:28 ` Bart Schaefer
2014-08-06 20:07 ` Marc Cornellà
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).