[Ovmsdev] V3 progress
casner at acm.org
Mon Oct 23 11:29:20 HKT 2017
On Sun, 22 Oct 2017, Tom Parker wrote:
> I found a very odd bug, if you make a script which calls a command that
> doesn't log anything, you get a crash in ovms_console.cpp. It took me quite
> some time to trace this to commands that don't log, because start and stop do
> log if they're called in the right order, but my terrible network manager
> would call start whenever the network came up which would die the second time
> because the v2 client is already running and doesn't log anything if you try
> to start it again.
When the code in ovms_console was written it was not possible for a
LogBuffers object to have no buffers because it was only created at
the same time as the first buffer was inserted. When I began using
LogBuffers to collect the output of BufferedShell, this was no longer
I fixed the crash by checking for the empty case. A second commit was
required because the first one resulted in leaking the empty
However, while checking about that leak I see what looks like a leak
of another 108-byte block every time the tick script runs. I have not
identified that yet.
Also, I think if I call the tick script from another one I can get a
different (related) crash. About to test that one.
More information about the OvmsDev