Closed jian-lin closed 9 months ago
From The GNU C Library Reference Manual of malloc
1
The contents of the block (allocated by
malloc
) are undefined; you must initialize it yourself
If first_run
is not initialized, its initial value can be false
. As a result, rime->api->setup()
2 will never be called. However, according to the comment3 of setup()
in librime, it must be called before any other API is accessed.
The issue I observe is that logging of librime does not work well: if setup()
is not called, there are no log files and there is a warning in the stderr as follows:
WARNING: Logging before InitGoogleLogging() is written to STDERR
Thanks for the explanation.
Hey, @jian-lin, thanks for the contribution. Can you explain more about this?