Could you try to get a stack trace from that?
I've never used "motion" and I don't know its source code, but [1] makes
me wonder if the failure could be happening in [2].
OTOH, from the output, "motion" has entered config_camera() and gone
beyond [2] a second time before the realloc() abort - but could these
two calls have received the same cnt?
From my very little understanding of the code and from your output, it
looks like "motion" might be processing motion.conf twice (the
"Processing thread 0 [...]" line precedes a call to conf_process(), as
does "Processing camera config file"). Is this intended?
[1]
https://github.com/Motion-Project/motion/blob/HEAD/src/conf.c#L3204
[2]
https://github.com/Motion-Project/motion/blob/HEAD/src/conf.c#L3180
(Links are to HEAD, as that's what I started reading.)
--
Nuno Silva