Keep track of clog_refs so we can null the pointers when calling
CLG_exit. Otherwise we will run into issues where the code will try to
access freed data.
Windows 10 supports V100 on all consoles given
you enable the ENABLE_VIRTUAL_TERMINAL_PROCESSING
flag for the console.
This patch enables color logging only on windows
10 and only if the log is not being redirected
to a file.
Differential Revision: https://developer.blender.org/D10546
When using Windows Terminal the same control codes Linux
uses to colorize the text can be used. WT can be detected
by looking at the WT_SESSION environment variable.
Differential Revision: https://developer.blender.org/D8848
Reviewed by: campbellbarton
`use_color` was defaulted to 'on' and only turned off when it was
decided the terminal didn't support this. This was the wrong
way to go about things, since that test only ran for Linux/Mac other
operating systems would get color formatting regardless if they
supported it.
The new default is `off` until the platform specific code inside
`CLG_ctx_output_set` turns it on after running some sanity checks.
This fix was part of the review of D8848 but deserved its on commit
Reviewed By: campbellbarton
This adds a new `--debug-exit-on-error` flag. When it is set, Blender
will abort with a non-zero exit code when there are internal errors.
Currently, "internal errors" includes memory leaks detected by
guardedalloc and error/fatal log entries in clog.
The new flag is passed to Blender in various places where automated
tests are run. Furthermore, the `--debug-memory` flag is used in tests,
because that makes the verbose output more useful, when dealing
with memory leaks.
Reviewers: brecht, sergey
Differential Revision: https://developer.blender.org/D8665
Fix several issues in CLOG code:
* In `clg_str_reserve`, allocated memory may be bigger than requested
one, do not assign the latter back to `cstr->len_alloc`.
* `clg_str_vappendf` was mis-interpreting returned value from
`vsnprintf`, and completely mixing total allocated memory and extra
needed amount of memory to allocate...
Simplified code of `clg_str_vappendf` to only have allocating code
handled in one place, makes things easier to follow too.
Think this should also be beckported to 2.83.
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.
Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.
See T46725.
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.