Carbonite Changelog¶
All customer facing changes to Carbonite are documented in this file.
The format is roughly based on Keep a Changelog. Read this file for inspiration and remain consistent with the style that is used here.
Carbonite has an official release cadence. At the beginning of every two-week sprint we increment the hundred-based version number. When we need to patch an existing release, we use the fractional (starting at 1) for each patch release. When adding entries to this log, add them under the top most version section in this file. You should never have to change the version number - that is done by the release managers of Carbonite.
Style guide:
iAmCode
/i/am/a/filename.txt
‘/settings/registry/path’
127.0¶
Added¶
CC-582:
carb::cpp20::atomic<>
now supports waiting for non-primitive (butis_always_lock_free
) types.OM-53429: Added settings and support to the telemetry transmitter to be able to filter out messages that came from host apps run in different modes (ie: ‘dev’ vs ‘production’ vs ‘test’). The
/telemetry/transmitter/messageMatchMode
setting is used to control this behavior. By default, all messages are allowed to pass through.CC-510: Adds
omni::experimental::IUrl
, an RFC-3986 compliant URL implementation. It is currently experimental.OM-45102: Added separate functions for trimming strings in a UTF-8 friendly way or by using current C locale. Helper function for finding the last Unicode symbol in a UTF-8 string.
CC-714: Added
carb::thread::hardware_concurrency()
, which is similar tostd::thread::hardware_concurrency()
but will take docker cgroups into account if running from within a docker container.CC-705: added support for batching events when sending to NVDF backends. These will now send as many events as possible in a single HTTP request instead of sending each message individually.
Changed¶
CC-632: carb.tasking.plugin: Evaluated how calling
ITasking::applyRange
recursively works, especially with non- uniform workloads. In some cases, performance improvements up to 67% were seen in tests with Kit.OM-53429: Added a telemetry mode tag to each structured log message’s “source” field if running in “dev” or “test” mode.
CC-386:
omni.bind
now outputs a comprehensive diff when using--fail-on-write
option alongside the error message. This should help debugging CI errors by eliminating the “What’s different?” question that requires a re-run in the environment the build failed in.CC-705: changed the telemetry transmitter to limit the number of events that would be processed at any given time to help reduce the amount of memory used. Added the
/telemetry/transmitter/<index>/queueLimit
option to control the maximum number of events that can be processed at once. This new option defaults to 10000 events. In testing, this roughly corresponds to ~500-1000MB of memory usage.CC-714: carb.tasking.plugin and omni.job now use
carb::thread::hardware_concurrency()
for default thread counts.
Fixed¶
CC-603: Fixed issue where repeated profiler runs caused incorrect profile in second run onwards. This was caused by zones ends unintentionally matching partial zone begins from the previous run. Please note that this has been fixed for the cpu profiler ONLY (/plugins/carb.profiler-cpu).
OM-34980: Fixed an issue with command line array argument in the form
[a, b]
not replacing the whole previous arrayCC-628: Fixed a few more issues with
min
/max
in public headers, as well as adding a compilation test to prevent future uses.CC-625:
carb::framework::getPluginCount
returns only the count of carb plugins loaded. The change for CC-383 madecarb::framework::getPluginCount
return the total number of carb and oni plugins, butcarb::framework::getPlugins
would only return carb plugins, leading to empty entries in theget_plugins()
python function. This change restores the previous behavior ofcarb::framework::getPluginCount
only returning the count of carb plugins.OM-53429: Fixed an issue in
omni.telemetry.transmitter
where only the first transmitter would control whether the log directory was processed and whether events were uploaded. This has now been changed so that any transmitter that needs or can accept data will allow the logs to be processed and events uploaded.CC-697: Fixed use-after-move issue in
carb::extras::EnvironmentVariable
CC-705: fixed the broken launch guard in the
omni.telemetry.transmitter
app.CC-705: fixed the trandmitter so that it no longer has the potential to resend events when multiple transmitter endpoints are out of sync.
126.0¶
Added¶
CC-505:
omni.telemetry.transmitter
now has the capability to send data to multiple endpoints at once. To do this, just make the settings key/telemetry/transmitter
and array of objects. Each object will transmit to a separate telemetry endpoint.The new setting
/telemetry/transmitter/retryLimit
has been added to allow the transmitter to handle offline telemetry endpoints more gracefully.
CC-505:
omni.telemetry.transmitter
can specify an array of telemetry endpoints with the setting key/telemetry/transmitter/endpoint
to specify fallback URLs to if your main endpoint goes down.CC-454, OM-28642:
omni.bind
diagnostic reporting has been re-done for a better experience when reporting things to the user. Multiple errors can be reported by a single run of the program as opposed to stopping at the first issue (some errors are still considered fatal and will halt execution immediately). Diagnostic messages are highlighted based on their severity if the output is a TTY.CC-533:
carb::tasking::ITasking::applyRangeBatch
was added as a more tunable alternative toapplyRange
and reduces the function call overhead ofapplyRange
.CC-447: carb.variant.plugin.dll now supports
RString
/RStringU
/RStringKey
/RStringUKey
as contained types.
Changed¶
CC-505: The following omni.telemetry.transmitter settings have been updated to work better with the multiple endpoint system. The old settings will continue to work as long as the
telemetry/transmitter
settings key is not set; if you use the new settings keys, you must upgrade all of your keys to the new system./telemetry/resendEvents
=>/telemetry/transmitter/resendEvents
/telemetry/transmissionLimit
=>/telemetry/transmitter/transmissionLimit
/telemetry/endpoint
=>/telemetry/transmitter/endpoint
/telemetry/schemasUrl
=>/telemetry/transmitter/schemasUrl
/telemetry/authenticate
=>/telemetry/transmitter/authenticate
/telemetry/authTokenUrl
=>/telemetry/transmitter/authTokenUrl
/telemetry/authTokenKeyName
=>/telemetry/transmitter/authTokenKeyName
/telemetry/authTokenExpiryName
=>/telemetry/transmitter/authTokenExpiryName
/telemetry/eventProtocol
=>/telemetry/transmitter/eventProtocol
/telemetry/seekTagName
=>/telemetry/transmitter/seekTagName
/telemetry/authTokenType
=>/telemetry/transmitter/authTokenType
/telemetry/oldEventThreshold
=>/telemetry/transmitter/oldEventThreshold
/telemetry/ignoreOldEvents
=>/telemetry/transmitter/ignoreOldEvents
/telemetry/pseudonymizeOldEvents
=>/telemetry/transmitter/pseudonymizeOldEvents
The following settings have been deprecated. These settings will continue to work as-is, but they are no longer supported when using the/telemetry/transmitter
settings key. To continue using this functionality, specify the directory or file in/telemetry/transmitter/schemasUrl
with afile://
prefix./telemetry/schemaFile
/telemetry/schemasDirectory
Fixed¶
CC-514: The
g_carbProfiler
global variable is now automatically set tonullptr
when the profiler is unloaded and/or the framework is released. Oncecarb::profiler::registerProfilerForClient()
is called, a load hook is installed which will cause theg_carbProfiler
global variable to be set for a module once the profiler module loads. Previously this global variable would be left dangling, potentially leading to crashes. A plugin or application need only be rebuilt to pick up this fix.CC-585: Fixed an issue with
carb::hashPair()
where it would erroneously always return 0.CC-593: Carbonite has changed its coding standard to not use keywords
min
ormax
in public headers and changed all existing places that previously used these keywords. This is an effort to prevent compilation issues when Windows.h is included without definingNOMINMAX
.::carb_min()
and::carb_max()
have been added as alternatives tostd::min
andstd::max
, in include/carb/Defines.h.CC-597: Build fix in
omni::core::PluginManager
for build error seen in clang.
125.0¶
Added¶
CC-258: ONI Python bindings now support
omni::string
by conversion to Python-nativestr
.CC-520: Added python support for several
IProfiler
functions that were missing.CC-506: Added “Robin Hood” open-addressing hash containers to
carb::container
:RHUnorderedMap
,RHUnorderedSet
,RHUnorderedMultimap
andRHUnorderedMultiset
. While similar to thestd
unordered containers, they are not drop-in replacements, but should be useable in many cases.CC-497: Added support for the new NVDF protocol for omni.telemetry.transmitter. Use the settings key
/telemetry/eventProtocol
to configure this.CC-497: Added an option to specify the name for seek tag in omni.telemetry.transmitter. Use the settings key
/telemetry/seekTagName
to configure this.CC-507: Removed some log messages in
ILauncher
that could lead to a deadlock in the child process.CC-440: Added overloads to allow
carb::extras::Guid
to be used as a key in astd::unordered_map
.CC-440: Added
IAudioDevice::getDeviceCapsByGuid()
andIAudioDevice::getDeviceNameByGuid()
.CC-440: Added example.audio.device to demonstrate usage of the
IAudioDevice
interface.CC-513: Added a walkthrough document and related example app and plugin to demonstrate how to create and use a Carbonite interface.
CC-383: Added the ability for ONI plugins to declare dependencies, and for Carbonite and ONI plugins to depend on each other.
omni::bind
now generates anOMNI_PLUGIN_INTERFACE
macro that defines thegetInterfaceDesc()
function, the same as carbonite interfaces. This allows for declaring dependencies to work the same between carb/omni. Omni modules can now export the functiongetModuleDependencies
to declare their dependencies. Carbonite and ONI plugin dependecies are tracked together, to unload order can be guaranteed across frameworks.
Changed¶
CC-520: For carb.profiler-cpu.plugin, the
CARB_PROFILE_FRAME
macro now ignores themask
parameter by default. This is an effort to make frame processing consistent no matter what capture mask is specified. This behavior can be returned to the previous behavior (where themask
parameter is considered) by setting config key/plugins/carb.profiler-cpu.plugin/ignoreFrameMask
to false.CC-497: Increased the omni.structuredlog log header size to 1024 when new log files are generated. Older versions of omni.telemetry.transmitter should continue to work with these longer headers.
CC-440: The audio example binaries have been renamed to better indicate which submodule they demonstrate.
Fixed¶
CC-516: Upgrade to OpenSSL 1.1.1o to fix multiple CVEs.
CC-520: Fixed a race condition in carb.profiler-cpu.plugin where it was possible to immediately query
IProfileMonitor::getLastProfileEvents
afterCARB_PROFILE_FRAME
but not receive the previous frame’s information (instead it was still the frame-before-previous).CC-519: Changed the
omni.structuredlog
tool to disable warning C4127 on Windows in generated header files. This warning occurs when a constant is used in an if-statement (which the generated code does intentionally on release builds). This can be treated as an error in builds that use higher warning levels.OM-50917: Fixed some issues with the audio device notifier in
carb.audio
on Windows when using the WASAPI backend.
124.0¶
Added¶
CC-498: Added more debugging log output to ILauncher when a new child process fails to launch (as error or warning level messages) and when a new process handle is first created (as info level messages). Only launch descriptor values that differ from their defaults will be output.
CC-291: Added documentation for
/audio/nullBackend/CaptureTestMode
.CC-291: Added
/audio/nullBackend/ReportsOverruns
for testing overrun detection inIAudioCapture
.
Changed¶
CC-478: On Windows, the memory functions (
carb::allocate
,carb::deallocate
, andcarb::reallocate
) no longer require carb.lib to be linked in order to build; instead, by default they now find the underlyingcarbReallocate
function from carb.dll at runtime. However, sometimes it is desirable to have carb.dll loaded implicitly. This is now accomplished by definingCARB_REQUIRE_LINKED=1
before including include/carb/Memory.h and will also require linking against carb.lib.CC-500: Changed the exit codes returned from
carb::launcher::ILauncher::waitProcessExit()
and fromcarb::launcher::ILauncher::getProcessExitCode()
on Linux in the case of a crashed child process so that they return the same value that a shell would report in$?
. This does not in any way affect the exit code returns in the case of child processes that exit normally. It is left up to an exercise for the host app to detect and handle the event of a crashed child process. In general, Linux processes will return a value that is 128 plus the number of the signal (ie: SIGSEGV, SIGABRT, etc) that killed the process. On Windows a crashed process will generally have an exit code that starts with 0xc0000000 (though this is not true in the case ofraise()
,abort()
, or a failedassert()
call which all typically set an exit code of3
).CC-291: Renamed some device backend settings in carb.audio-forge to make it easier for users to find settings.
/audio/oldWindowsBackend
was renamed to/audio/WASAPI/legacyBackend
./audio/nullDeviceCount
was renamed to/audio/nullBackend/DeviceCount
./audio/nullBackendIsFunctional
was renamed to/audio/nullBackend/IsFunctional
./audio/nullBackendCaptureTestMode
was renamed to/audio/nullBackend/CaptureTestMode
.
Fixed¶
CC-486: Improved performance of carb.tasking.plugin: fewer system calls to wake a thread, and fiber stack reset (if
/plugins/carb.tasking.plugin/resetFiberStack
istrue
) now only occurs in a single thread when no other tasks are available to run.Fixed a compilation issue with
CARB_PROFILE_EVENT()
macro.DRIVE-4086: Fix for reconciling an external callers held zoneId with the new/replayed zoneId created on fiber switch.
CC-473: Allow for plugins to depend on interfaces they provide.
OM-36366: Fixed a bug in
carb.audio
that would cause a muted sound to not be muted if thecarb::audio::fPlaybackModeFadeIn
flag was also used.
123.0¶
Added¶
OM-48634: Add GPU timestamp injection interface to
IProfiler
.OM-48808: Reworded some output in the crash reporter about the size and readability of the crash dump file to make it more clear whether the dump file was deleted due to a successful upload or not.
CC-470: The
Framework
now supports “load hooks”: a load hook is a callback that is called when an interface becomes available from a plugin load. This can be used to weakly couple plugins, such as if a Profiler plugin doesn’t normally load carb.tasking.plugin, but takes action when it is otherwise loaded.OM-49026: Improved the
carb.crashreporter-breakpad.plugin
startup by deferring symbol loading until a crash actually occurs.CC-485: Improved performance of carb.tasking.plugin on Windows by setting the system timer to the highest resolution available.
CC-485: Further improved performance of carb.profiler-cpu.plugin when used with carb.tasking.plugin by more quickly recording task switches.
Changed¶
CC-479: Upgraded to FLAC-1.3.4. This fixes CVE-2021-0561.
CC-449:
IAudioCapture
on Windows no longer uses DSound. It now uses the same capture system as on Linux, with a device backend built on Windows Audio Services. Functionality on Windows should not change substantially; the only major difference is that the new system has improved overrun detection. Additionally, this means thenull
device backend will now work withIAudioCapture
on Windows.
Fixed¶
OM-48865: Fix potential infinite loop in ProfilerNvtx ‘endEx’.
OM-47219: A better fix for the degenerative performance issue when carb.profiler-cpu.plugin was used with carb.tasking.plugin and /plugins/carb.profiler-cpu.plugin/fibersAsThreads as
true
.CC-422:
carb::Framework
will not print a warning message when a plugin acquires an interface that is not listed as a dependency if that interface is provided by the plugin that is loading it. a dependency if that interface is provided by the plugin that is loading it.CC-475
omni.experimental.job.plugin
no longer links with X11.CC-472: Fixed an issue that could cause a hang if multiple threads in different modules were using
carb::RString
at the same time.CC-483: Worked around a few places in the logging system that could deadlock via interaction with internal locks in GLIBC 2.17, especially when logging in a thread while a different thread loads a python binding .so which registers a log listener in a static initializer.
CC-483: Fixed a potential hang that could occur when using
carb::getCachedInterface
simultaneously from multiple threads.
122.0¶
Added¶
CC-359: carb.variant.plugin now supports strong types (
carb::Strong
).CC-415: carb.variant.plugin now has a new
carb::variant::VariantArray
type which can be used to create an array of variants, and now also supportsstd::pair<Variant, Variant>
.CC-415: carb.variant.plugin now defines (in the
carb::variant_literals
namespace) a literal_v
that can be appended to a literal to create aVariant
type from it (e.g.123_v
,"Hello"_v
, etc.)CC-359: carb.assets.plugin is now documented and now sends (via carb.eventdispatcher.plugin, if available) events
Asset.BeginLoading
when loading (or re-loading) starts for an asset, andAsset.EndLoading
when loading finishes. Seecarb::assets::IAssets::loadAsset()
in include/carb/assets/IAssets.h for more information.CC-441: Added a specialization of std::hash for carb::cpp17::variant.
CC-376:
omni.bind
generated Python bindings now support keyword parameters with names based on their C++ parameter name (insnake_case
). This can be overridden withOMNI_ATTR("py_name=something_else")
.
Changed¶
BREAKING CHANGE: The types
Id
,Pool
andSnapshot
within thecarb::assets
namespace have been converted to strong types (carb::Strong
) instead of fake pointer types. As such, assigning them to0
ornullptr
will now cause a compile error. Instead use their default constructed or special invalid types:kInvalidAssetId
,kInvalidPool
andkInvalidSnapshot
, respectively. Forprintf
-style formatting, instead of using%p
, use the format specifier for the underlying type and call the.get()
function. This is to better facilitate types passing through the Variant system.BREAKING CHANGE: The rarely-used
carb::assets::CreateContextFn
loader function must now return acarb::assets::LoadContext*
instead of avoid*
; the rarely-used symbolcarb::assets::OnDependancyChangedFn
has had its spelling correct tocarb::assets::OnDependencyChangedFn
.CC-275: Updated the Windows audio playback backend to an improved implementation. If you run into playback issues, you can restore the old backend with this settings key:
/audio/oldWindowsBackend
.OM-39028: improved
carb::dictionary
conversion error reportingCC-420: On Linux, changes the
carbReallocate
function to be weak-linked. This alters the memory functions which use it (carb::allocate
,carb::deallocate
, andcarb::reallocate
) to understand this and gracefully fail when thecarbReallocate
function is not available. This allows users which only incidentally use these functions to not link againstlibcarb.so
. This case is common for plugins which might use anomni::string
.
Fixed¶
CC-404/OM-46660: Fixed an issue with carb.input.plugin where action mappings referencing a device were not cleaned up when a device was destroyed, potentially causing a crash later when the destroyed device was dereferenced.
CC-423: Worked around an internal compiler error with gcc-7 that can occur in some cases when using include/omni/String.inl.
OM-47219: Fixed a degenerative performance issue when carb.profiler-cpu.plugin was used with carb.tasking.plugin and /plugins/carb.profiler-cpu.plugin/fibersAsThreads as
true
.CC-455: Fixed an issue with
carb::tasking::IFiberEvents
where a task may have ended and a new task begun without any notification.OM-33460: Fixed ObjectParam member access operator.
CC-373:
fillOutArray
lifted restriction for array size argument. It used to beuint32_t
, now it’s anyunsigned
type.CC-359: Fixed an issue with
carb::variant::Variant
wheregetValue<const char*>
would read garbage from aVariant
of typeconst char*
.
121.0¶
Added¶
CC-289: Allowed
omni.structuredlog.plugin
to be used in a ‘standalone’ mode. This plugin can be used in a non-Carbonite app without the need for other dependent libraries (including ‘carb.dll/so’). When being used in standalone mode, the omni/structuredlog/StructuredLogStandalone.h header should be used to pull in the supported dependencies. The structured log library is expected to be present in the same directory as the main executable. The example.structuredlog.dynamic example app demonstrates how the library can be used in standalone mode.CC-396: Added string conversion helpers to Utf8Parser.h, which will allow easy conversions between UTF-8 and UTF-16/UTF-32.
CC-377: Added carb.eventdispatcher.plugin which is a replacement for carb.events.plugin for immediate events (the carb.events.plugin is more of a message queue). Additional features:
Allows observers to filter which events they receive.
Doesn’t use carb.dictionary.plugin; instead it uses a new extensible variant system in carb.variant.plugin which is faster than dictionary and supports the same types.
More clearly defined behavior of recursive event dispatching when adding/removing observers.
Lack of ref-counting prevents crashes like OM-43254 from unreleased events.
CC-421: Carb python logging will now convert to string and log any python object.
Fixed¶
CC-401: Update Python and OpenSSL dependencies to fix a security vulnerability.
CC-396: Fixed some security issues in
carb::extras::Utf8Parser
around invalid characters.
120.0¶
Added¶
CC-363: Added support for specifying other types of authentication tokens in
omni.telemetry.transmitter
. This now supports long-lived API keys as tokens through the use of the ‘/telemetry/authTokenType’ setting and specifying a local file through ‘/telemetry/authTokenUrl’ instead of a URL. These two options can also be used to specify a long-lived API key that is downloaded from a custom URL or read from a file. The ‘/telemetry/authTokenKeyName’ and ‘/telemetry/authTokenExpiryName’ settings can also be used to specify different ways to parse the token out of a JSON blob from all sources. By default, the token type is detected based on whether it is retrieved from a URL or file.CC-199: Added the
IJob
interface.IJob
is an experimental ONI interface that provides an abstraction for a foreign job system.
Changed¶
Documentation for
omni::string
explaining the requirement for linking against carb.dll/libcarb.so to useomni::string
OM-45612: Changed an error message from carb.profiler to a warning since it could potentially be written out frequently and flood the telemetry data lake if it is redirected as a telemetry event.
Fixed¶
CC-364: Fixed improper use of
memory_order_relaxed
incarb::tasking::TaskGroup
and improper use ofvolatile
.CC-355: Fixed some minor rendering issues in
IAudioUtils::drawWaveform()
. Golden image tests that use this functionality will likely need their images regenerated.CC-362: Fixed the
flags
parameter validity checks incarb::audio::createSoundFromFile()
andcarb::audio::createSoundFromBlob()
.CC-362:
IAudioData::getFormat()
has had its documentation corrected.CC-362: Fixed the confusing behavior of
SoundData.get_format()
on streaming sounds in thecarb.audio
python bindings.
119.0¶
Added¶
OM-44734: Added a ‘retry count’ to each crash dump’s metadata. If a crash dump fails to upload multiple times, it will eventually be deleted and considered corrupt instead of letting failing crash dump files pile up locally and attempting to upload on each new run. The retry count to delete failed dumps after is controlled with the setting ‘/crashreporter/retryCount’. This is an integer value that defines the maximum number of times to try an upload of any given crash dump file. This setting defaults to 10 tries. This can be set to a lower value to delete so that on the next run, any local dumps that have already been tried and failed that many times will be deleted if they fail again.
CC-329: added python bindings for
IAudioData
.
Fixed¶
CC-353: Fixed a build break in GCC 9.3.0 caused by
__attribute__(())
syntax changes.CC-374: Fixed memory orders and contention issues that could arise on high CPU counts, especially on AArch64 machines.
118.0¶
Added¶
CC-316: Added the
audio/pulseAudio/enumerateMonitors
setting to allow PulseAudio’s loopback (AKA monitors) devices to be enumerated as audio capture devices.CC-331: Added
carbGetSdkVersion()
and include/carb/SdkVersion.h to allow access to the SDK version string. A helper macro was also added to allow verification of whether the loaded Carbonite framework version matches the header files that are being used in a host app.OM-44740: Added the Carbonite SDK version as metadata in the crash reporter.
Changed¶
CC-301: Changed all of the Carbonite framework globals (ie:
g_carb*
) so that they are weakly linked. This is to resolve an issue related to pulling in include/carb/extras/ headers from pure ONI modules. When this happened, the linker would often add an undefined reference to one of the framework globals because something in the header calledCARB_ASSERT()
,CARB_LOG_*()
, etc.OM-44182: Changed the ‘quick shutdown’ process to include unloading the omni.core plugins as well as the Carbonite plugins.
CC-304:
carb::delegate::Delegate
now allows itself to be destructed while in a callback.
Fixed¶
OM-43654: Evaluated all Carbonite Python bindings and released the GIL (global interpreter lock) wherever appropriate.
CC-326: Fixed a crash that could sometimes occur in carb.profiler-cpu.plugin when
/plugins/carb.profiler-cpu.plugin/recordSourceInfo
was enabled (the default).OM-43254:
carb::memory::PooledAllocator
behaves correctly if the underlying allocator throws duringallocate()
.OM-43254: Resolved and issue with carb.dictionary.plugin where a
std::bad_alloc
exception could be raised during operations that could create a newdictionary::Item
. This is now considered a fatal condition instead of allowing an exception to cross the ABI boundary.OM-43898: Thread safety improvements to fix a rare crash and a few other issues in carb.audio.
117.0¶
Added¶
CC-298:
omni::string
now supportsprintf
-style formatting through additional constructors and functions:assign_printf
,append_printf
,insert_printf
andreplace_printf
._vprintf
versions of these functions also exist that accept ava_list
.CC-253: Adds overloads to
omni::string
forstd::string
,carb::cpp17::string_view
, andstd::string_view
. These additional overloads make it easier to useomni::string
withstd::string
.CC-274: Implemented
carb::container::IntrusiveUnorderedMultimap
. See the documentation for more details and example usage.CC-193: Adds
CARB_TOOLCHAIN_CLANG
definition to be1
when a Clang-infrastructure tool is running (0
otherwise).
Changed¶
CC-266: Both the omni.bind and omni.structuredlog tools now support the
--fail-on-write
option that causes them to fail their operation if a change to a generated file needs to be written to disk. This is used in the CI build scripts to ensure that MRs that make changes to generated code always include the latest version. If the build fails due to this error, the solution is to run a local build first and commit any changed files. Changes to generated files can occur if the codegen tools in the Carbonite SDK (orrepo_format
since the Carbonite codegen tools also use it for code formatting) are updated and produce different results from previous. This can occur any time the Carbonite SDK version is updated in the dependecies of another project.OM-43576: Removed the
MiniDumpWithDataSegs
flag from the crash dumps on Windows. This skips adding the global data segments of each module to the crash dump which can make some debugging tasks more difficult. However, if needed that dump flag can be added back by using the ‘/crashreporter/dumpFlags=WithDataSegs’ setting. Removing this flag does have the benefit of significantly reducing the size of crash dump files, especially in projects that have a large number of loaded modules.CC-247: Warn, instead of fail, when a user asks for 0.x and we have an implementation 0.y (where y > x). Previously, we error out when x != y since according to semver 0.* versions should not be considered to be backwards compatible (but they could be). Note that in 1.0 and higher there would be no change to how versions are checked. In that case, minor versions are always backwards compatible.
Fixed¶
CC-295: Fixed compilation errors in
omni::string
when exceptions are disabled.CC-303 / OM-43576: Now that
MiniDumpWithDataSegs
has been removed from crash dumps,RString
values cannot be resolved in minidumps. CC-303 resolves that by including additional debugging information forRString
in crash dumps. Also establishes better testing practices for futureRString
version changes.CC-306: Fixed a compiler error when using
operator+(carb::extras::Path, const char*)
in theomni
namespace. That operator was ambigous following the additionaloperator+
overloads added by CC-253. Added additionaloperator+
overloads forcarb::extras::Path
to remove the ambiguity.OM-43783: Fixed an issue in
carb::cpp20::counting_semaphore
andbinary_semaphore
where threads would busy wait.OM-43783: Fixed an issue in include/carb/Framework.h that would cause issues if
free()
was#define
’d (i.e. for memory debugging).OM-43783: Cleaned up some Intellisense warnings in include/carb/cpp17/Variant.h
OM-43783: Fixed some ambiguous operator errors and namespace issues with include/omni/String.inl and include/carb/cpp17/StringView.h that could occur when building external projects.
OM-43783: Issues around
std::vsnprintf()
that are worked around in include/carb/extras/StringSafe.h also now apply tostd::snprintf()
as well.CC-193: Changes GNUC compiler-specific warning macros (those with names like
CARB_IGNOREWARNING_GNUC
) to be available whenCARB_COMPILER_MSC
is1
and a Clang-infrastructure tool is being run (CARB_TOOLCHAIN_CLANG
is1
). This now correctly suppresses GNUC-specific warnings being emitted on the Windows platform from Clang.OM-43819: Allowed the
omni.structuredlog.plugin
module’s ‘shutdown’ flag to be cleared each time the plugin is reloaded, even if the previous unload didn’t actually remove it from memory. This prevents some crashes and potential loss of functionality on Linux when dlclose() silently leaves the library loaded.Reverted CC-5: Ability for crashreporter to upload files (attachments) to S3. The original change was causing issues on Linux related to the static linking of OpenSSL in carb.crashreporter-breakpad.plugin and conflicting with the static linking of OpenSSL in Python 3.7. A future Carbonite build will reinstate this functionality.
116.0¶
Added¶
CC-183: Added
std::string
andcarb::cpp17::string_view
overloads toIDictionary::makeAtPath()
.CC-82: Added optional support for zipping crash dump files before uploading them. The zip implementation supports 4+GB files and can process files without allocating memory at crash time. The zip files are typically ~10% the size of the original file in practice, so crash dump upload time should be greatly reduced once supported on the server side.
CC-252: Added DLL boundary safe
allocate
,deallocate
, andreallocate
top level functions to Carbonite. These functions all use an internal reallocation function within carb.dll/libcarb.so, making them safe to use from different modules.carb::Framework::internalRealloc
,carb::Framework::allocate
,carb::Framework::free
, andcarb::Framework::reallocate
are now deprecated in favor of these new top level functions.CC-263: Added
IFileSystem::makeCanonicalPathEx2()
. This version takes an extraflags
parameter that allows some behaviour to be controlled. By default on Windows, this version assumes that the caller has already checked if the given file already exists. Thecarb::filesystem::fCanonicalFlagCheckExists
has been added to get back the same behaviour asIFileSystem::makeCanonicalPathEx()
.CC-244: Added a framework for simple geolocation to the telemetry transmitter. This will be used to allow the transmitter to exit itself early on startup if its current country matches a country code in a restricted regions list (specified in the ‘/telemetry/restrictedRegions’ setting). This is currently disabled due to the need for an account to use various geolocation APIs. This may be enabled at some point in the future. By default, the transmitter is allowed to run in all regions.
CC-246: Added
omni::detail::PointerIterator
, a wrapper iterator for a possibly-cv-qualifiedT*
as aT
iterator class. It does not change the semantics from the fundamental logic of pointers. This is meant to be used on container types with contiguous storage (such asvector
andstring
), as returning a pointer directly from iterator functions (begin()
andend()
) would be inappropriate.CC-218: Added flags and settings to the telemetry transmitter to control the behaviour of how old events are processed if they are encountered in a telemetry log.
CC-8: Added
omni::string
, an ABI safe replacement forstd::string
that also offers DLL-Boundary safe allocation.CC-290: Added
carb::extras::getLibraryHandleFromFilename()
to get a library handle without forcing a load (ie: only retrieve the handle if the library is already loaded in the process).
Changed¶
CC-262: Improved some logging in the telemetry transmitter. It will now output the path to log directory it will be scanning and whether it is able to get a valid authentication token (if needed).
CC-281: Changed the way the omni.structuredlog.plugin plugin loads the privacy settings on startup. In addition to the previous method of loading the state into the ISettings dictionaries, it now also loads and caches the privacy settings state internally on plugin load.
CC-290: Added a
flags
parameter tocarb::extras::loadLibrary()
to allow a module name to be constructed internally from a base filename instead of having to explicitly callcarb::extras::createLibraryNameForModule()
first.CC-290: Changed
carb::extras::createLibraryNameForModule()
to allow path components to also be included in the base library name instead of only supporting the base name itself.
Fixed¶
OM-42834: Fixed an issue on x86-64 Linux where carb.windowing-glfw.plugin required libGLX but did not link against it, potentially causing crashes if libGLX.so was unloaded before it.
OM-28142: omni.bind now only updates copyright in .gen.h files if the code contents of the file change.
CC-266: omni.structuredlog now only updates the copyright year in .gen.h files if other code changes also occurred.
CC-268: carb.events now keeps subscriptions at a given
Order
in the same order as when they were registered.CC-278: Resolved an issue where carb.profiler-cpu.plugin could potentially access memory from a DLL/SO after it had been unloaded.
CC-279: Resolved a rare issue with carb.tasking where a task could be assigned to an emergency thread which wouldn’t execute the task and could leave the task in a stuck state.
CC-293: Fixed an issue where carb.tasking could crash shortly after unloading if emergency threads had been started.
CC-217: Evaluated and fixed several places that were incorrectly using
std::memory_order_relaxed
.CC-292: Fixed an issue in carb.datasource-file.plugin where a crash could rarely occur when the plugin was shut down and unloaded.
115.0¶
Changed¶
CC-276: Instead of using getFileStat to determine the filesize of an opened file use fseek / ftell on linux and getFileSizeEx on windows. getFileStat retrieves costly information like the time converted to the local timezone which showed up in profilings.
CC-276: use DeleteFileEx to delete a file on Windows instead of ShFileOperationW for performance reasons.
Added¶
CC-222: ILauncher: Added
ILauncher::waitForStreamEnd()
to wait for thestdout
orstderr
streams from a child process to end completely before doing other operations on the process handle. This allows a caller to ensure all the data from the child process has been received before destroying the process handle or waiting for the child process to exit. Since the reads from these streams happen asynchronously, it was not previously possible to ensure all data had been received without waiting for a fixed period of time after the child process exits.CC-222: ILauncher: added a single extra read callback call for
stdout
orstderr
streams when the stream ends. The end of the stream is signalled by delivering a callback with a zero byte count.CC-248: Exposed all of the minidump ‘type’ flags to the settings under
/crashreporter/dumpFlags
. These can either be specified as a single hex value for all the flags to use (assuming the user knows what they are doing), or withMiniDump*
flag names separated by comma (‘,’), colon (‘:’), bar (‘|’), or whitespace. There should be no whitespace between flags when specified on the command line. The ‘MiniDump’ prefix on each flag name may be omitted if desired. This defaults to an empty string (ie: no extra flags). The flags specified here may either override the default flags or be added to them depending on the value of/crashreporter/overrideDefaultDumpFlags
. This option is ignored on Linux.
Changed¶
CC-222: ILauncher: documented some behavior on Linux where destroying a process handle before the child process exits could result in the child process terminating. This occurs if a read callback has been registered for the child process, then the child process tries to write to the stream (ie:
stdout
orstderr
) after the parent process has destroyed the handle. This occurs because the Linux kernel’s default behavior on trying to write to a broken pipe or socket is to raise a SIGPIPE signal. This cannot be worked around in a general case without the child process knowing to ignore SIGPIPE.
Fixed¶
CC-220: Fixed a crash that could occur in carb.dll on Windows in
carb::filesystem::FileSystemWatcherWindows
, especially when watching paths that were mapped to network shares.CC-5: Added ability for crashreporter to upload files (attachments) to S3. By default the
.dmp
and.dmp.toml
are uploaded, but other files can be specified in the settings (either statically in config file or dynamically via the settings interface). By default only internal NVIDIA crashes are uploaded to carb-telemetry bucket. A future update will include a web interface and backtrace.io link to the data.CC-242: Fixed a issue on Windows that would cause DLLs to fail to load if their pathname exceeded 260 characters.
114.0¶
Added¶
Functions for string trimming
overwriteOriginalWithArrayHandling
function inDictionaryUtils.h
that handles overwriting of arrays during dictionary mergeCC-192: Added the
/audio/nullDeviceCount
setting to allow the number of null audio devices to be configured for testing purposes.CC-192: Added the
/audio/nullBackendIsFunctional
setting to allow the null backend to simulate broken audio devices for testing purposes.Some additional flags were added to
carb::extras::SharedMemory
.A
carb::extras::SharedMemory::open()
overload was added to support opening an existing region by name.carb::this_process::getId()
andcarb::this_process::getIdCached()
were added to carb/process/Util.h;carb::this_thread::getProcessId()
andcarb::this_thread::getProcessIdCached()
are now deprecated.carb::this_process::getUniqueId()
was added to generate a process-specific unique ID for the uptime of the machine since PID can be reused.carb::memory::testReadable()
was added to carb/memory/Util.h to test if a memory word can be read from an address without crashing.CC-182:
carb::Framework
now has memory management functions that enable cross-plugin memory blocks:allocate
,free
andreallocate
. Memory allocated with these functions by one plugin can be passed to and freed by a different plugin or the executable.CC-185: Added task debugging functions to carb.tasking.plugin:
ITasking::getTaskDebugInfo()
andITasking::walkTaskDebugInfo()
. These functions allow retrieving runtime debug information about tasks.CC-235: The carb.assets.plugin system will now provide more debug information about orphaned assets when asset types are unregistered and the system is shut down.
Changed¶
CC-190: Allowed the
/telemetry/schemasUrl
setting to be treated as either an array of URL strings or just a single URL string. If multiple URLs are provided, they will be tried in order until a schemas package successfully downloads. This allows for a way for the ‘backup’ URLs to be provided for the telemetry transmitter.carb::extras::CmdLineParser now trims whitespace character for keys and values
OM-34980: Helper functions for processing command line arguments handle array and JSON values
CC-192: carb.audio previously had two
null
audio backends that could be chosen in different configurations (there was no obvious way to do this). Only one of thesenull
backends should be possible to use anymore. Audio devices under thenull
backend may appear to have changed as a result of this.CC-192:
IAudioPlayback::setOutput()
now checks for invalid flags, so it will now fail if non-zero flags are passed in which contain neither offOutputFlagDevice
orfOutputFlagStreamer
.How
carb::extras::SharedMemory::createOrOpen()
uses thesize
parameter when opening an existing shared memory region has changed to be safer. On Linux the shared memory region grows to accommodate a larger size; on Windows growth is not supported, so requesting a larger size will fail. Previously thesize
parameter was ignored which could lead to invalid memory accesses.On Linux, a global semaphore named
/carbonite-sharedmemory
is used to synchronize thecarb::extras::SharedMemory
system across multiple processes. If a process crashed or was killed with this semaphore acquired, all apps that usecarb::extras::SharedMemory
(or derivative systems, such asRString
and carb.dictionary) would hang when attempting to acquire the semaphore. Now, a warning log (or print tostderr
) is emitted after 5 seconds of waiting on the semaphore.CC-58: Previously,
Framework::unloadAllPlugins()
would terminate all plugins (callingcarbOnPluginShutdown
) and then on a subsequent pass unload the plugin (callFreeLibrary()
ordlclose()
). Now, the plugin is unloaded immediately after termination.
Fixed¶
Replaced usage of
kUpdateItemOverwriteOriginal
withoverwriteOriginalWithArrayHandling
in code that handles configuration processingCC-192: Capture devices capabilities queried through
IAudioDevice::getDeviceCaps()
andIAudioCapture::getDeviceCaps()
will now reportfDeviceFlagConnected
on working devices.CC-192: Audio device capabilities queried through
IAudioDevice::getDeviceName
will no longer reportfDeviceFlagConnected
, since that function does not test for device connectivity/functionality.CC-192: When using the
null
audio device backend on Linux,IAudioPlayback
andIAudioDevice
in some configurations could report different playback devices. This should no longer occur.CC-181: On Linux, shared memory regions used for
carb::RString
could be left over from an incomplete previous run of a Carbonite application, causing crashes when RString was initialized. This has been fixed in a backwards-compatible way so that the application validates the shared memory.Fixed an issue with
extras::isTestEnvironment()
leaking module references on Linux.Fixed an issue with
IFileSystem::getExecutablePath()
andIFileSystem::getExecutableDirectoryPath()
not initializing in a thread-safe manner.Fixed an incorrect error message that was reported when using
ILauncher
on Windows.CC-227: omni.structuredlog timestamp checking has been fixed, so it won’t regenerate files during every build.
CC-213: Fixed carb.audio returning
AudioResult::eInvalidParameter
andAudioResult::eDeviceDisconnected
whenAudioResult::eDeviceLost
should have been returned.
113.0¶
Fixed¶
BREAKING CHANGE:
carb::Format::B5_G6_R5_UNROM
spelling was corrected tocarb::Format::B5_G6_R5_UNORM
.CC-1:
carb::RStringKey
andcarb::RStringUKey
now satisfystd::is_standard_layout<>
in order to conform to better ABI safety. The binary layout of these classes did not change and are therefore backwards compatible with older Carbonite binaries.CC-184: Fixed an issue where running a Carbonite executable as root on Linux could potentially cause other Carbonite executables by other users to crash on startup when either the
SharedMemory
orRString
systems were in use.Fixed a shared memory leak on Linux when the
RString
system was in use and shutdown occurred withcarb::quickReleaseFrameworkAndTerminate()
.OM-39751:
IAudioCapture::getSoundFormat()
will no longer report its format aseDefault
and it will also no longer report a channel mask of 0.CC-164: Fixed an issue where
carb::profiler::ProfileEvent
objects within a frame provided bycarb::profiler::IProfileMonitor
would not be sorted correctly.CC-219: fixed
IAudioPlayback
leakingStreamer
objects when theContext
is destroyed.
Added¶
Documentation for our release and versioning process, docs/Releasing.html|rst
Implemented
carb::cpp20::bit_cast
andcarb::cpp20::endian
in include/carb/cpp20/Bit.h.carb/tasking/TaskingHelpers.h now contains additional macros such as
CARB_ASYNC
andCARB_MAYBE_ASYNC
to signal that a function is called from a task. Macros such asCARB_ASSERT_ASYNC
to assert that a function is running in task context.OM-41046: added
waitForClose()
tocarb::audio::OutputStreamer
, so that it is possible to verify when the output file is no longer being written to when you disconnect the streamer viaIAudioPlayback::setOutput()
.OM-41046: exposed
fOutputFlagAllowNoStreamers
inIAudioPlayback
to allow clients to easily have an audio context with no underlying audio device. This is mainly intended to simplify testing.CC-176: Added support for fixed length string buffers in structs to
omni.bind
.Implemented carb.simplegui.plugin, a wrapper around Dear ImGui with a built-in Vulkan raster renderer that significantly simplifies the work required to get a usable GUI for example projects. This also removes Carbonite’s dependency on the carb_gfx_plugins.
OM-39664: Added the
omni::platforminfo::IDisplayInfo
interface to use to collect information on all the attached displays in the system and their supported display modes.
Changed¶
carb::dictionary::getStringArray()
now has its parameters marked asconst
.CC-163: Changed the
omni.structuredlog
tool so that it only writes the output files if they have changed versus the code that has been generated or the output file doesn’t exist yet. If the file already exists and is identical to the generated code, the output will just be ignored. This is to avoid having to touch timestamps for unmodified generated files and to avoid the possibility of a write permission error if another project with a missing dependency is currently reading from the generated file.OM-39751: add
/audio/maxDefaultChannels
to limit the number of audio channels that are used when opening an audio device with a default speaker mode. This was an issue when opening the “null” device in ALSA which reported the maximum possible number of audio channels. Opening anIAudioPlayback
context with more than 16 channels requires some additional setup, so this should not be automatic.OM-35496: added some extra omni.structuredlog bindings to python. As a result, omni.structuredlog now ships an
__init__.py
and a binary instead of only shipping a binary.CC-23: Applicable carb.tasking.plugin settings are now dynamic and will be reloaded automatically when they change.
112.53 @joshuakr¶
Changed¶
carb.profiler-cpu.plugin Improvements¶
The
IProfiler
interface now supports Instant events via macroCARB_PROFILE_EVENT()
. Instant events are drawn on the timeline with zero duration. Instant events may not be supported by profilers other than profiler-cpu.The
IProfiler
interface now supports Flow events via macrosCARB_PROFILE_FLOW_BEGIN()
andCARB_PROFILE_FLOW_END()
. Flow events draw as an arrow between two zones and can begin and end in different threads. Flow events may not be supported by profilers other than profiler-cpu.When using carb.tasking.plugin and profiler-cpu, an Instant event is automatically emitted when a task is queued. A Flow event is automatically drawn from where the task was queued to when the task begins executing. When the setting key /plugins/carb.profiler-cpu.plugin/fibersAsThreads is
false
, Flow events are automatically drawn to connect all zones executing the task as they move between various task threads.For profiler zones, the Category field is now automatically set to the name of the library containing the zone.
The resulting (possibly compressed) json output from carb.profiler-cpu.plugin is more compact.
The “begin” event (via
CARB_PROFILE_BEGIN()
orCARB_PROFILE_ZONE()
) is now slightly faster.The “frame complete” event (via
CARB_PROFILE_FRAME()
) is now slightly faster.Fixed a few possible crashes that could occur if a library had been unloaded when unprocessed profile events referenced it.
112.52 @jshentu¶
Added¶
OM-40643: Added
createCursor
toIWindowing
. Allowing supplying custom image and use it as cursor shape.
112.51 @cdannemiller¶
Changed¶
Removed trailing new lines from all CARB_LOG messages as Carbonite will automatically add this newline to each log.
112.50 @jroback¶
Added¶
OM-36988: Added carb::extras::Uuid, UUIDv4 class for UUIDv4 unique identifiers
112.49 @jfeather¶
Fixed¶
OM-39751: removed an optimization for an edge case in carb.audio-forge that prevented certain callbacks from being sent.
112.47 @evanbeurden¶
Fixed¶
OM-40193: Deferred creation of the standard logger log file until a message is actually written to it. This was to fix the behaviour of a log file being truncated by a secondary concurrent launch of an app trying to write to the same log file even if the new process did not write any log messages.
OM-40193: Fixed the behaviour of
carb::logging::StandardLogger::setFileConfiguration()
in the case of disabling logging to file when the log file has not been opened yet. Previously the log filename was not being cleared as documented.OM-40193: Allowed
carb::filesystem::IFileSystem::closeFile()
to fail gracefully if passednullptr
. This makes the function more friendly to use and makes its behaviour match expected common OS level behaviour for similar functions such asfclose()
andCloseHandle()
.OM-40193: Enabled much more of the
omni.telemetry.transmitter
app’s logging by default. This allows it to leave a log file that can be reliably used for post mortem analysis of its behaviour.OM-40193: Updated the OpenSSL version used in the
omni.telemetry.transmitter
app to fix some issues under CentOS7.
112.46 @hfannar¶
112.45 @evanbeurden / @joshuakr¶
Fixed¶
OM-40256: Fixed a potential race condition calling the IEventListener::onEvent() functions for subscribers to an event stream. It was previously possible to have the subscription removed at the same time the object was being used to call the onEvent() function.
OM-40212: Fixed an issue where serialized events sent from different threads could be received out-of-order despite the serialization. Added documentation for carb.events.
112.44 @joshuakr¶
Added¶
OM-39253: For
carb::profiler::IProfiler
,CARB_PROFILE_BEGIN()
now returns a value that can be passed toCARB_PROFILE_END()
for validation.OM-33647: carb.profiler-cpu.plugin now outputs source information if available. This can be disabled with setting: /plugins/carb.profiler-cpu.plugin/recordSourceInfo (default: true).
Documentation for header files in include/carb/profiler/.
Fixed¶
OM-40102: Fixed a carb.tasking issue where a timed-wait could cause
ITasking::suspendTask()
to not work correctly.
112.43 @jfeather¶
Fixed¶
OM-40135: Converting bytes to frames with a variable-bitrate format in the audio utilities in AudioUtils.h will no longer result in a divide-by-zero. Note that this behavior is still an error.
OM-40135: setting
AudioImageDesc::lengthType
toUnitType::eBytes
should now function correctly instead of hitting a divide-by-zero.OM-40135: Fixed a bug where sounds would fail to encode due to libvorbis setting
bitrate_nominal
to a negative number.
112.42 @evanbeurden¶
Added¶
OM-39664: Added a concept of ‘volatile’ metadata to the crash reporter. These are metadata values that change frequently (ie: free RAM, frame rate, etc) that should only be collected in the event a crash does actually occur.
OM-39664: Added the ‘/crashreporter/debuggerAttachTimeoutMs’ config option to provide a wait period after a crash occurs where a debugger can attach before the crash upload and metadata processing actually occurs.
OM-39664: Added RAM, swap, and VM space information as metadata in the crash report.
112.41¶
Fixed¶
OM-40023: Add an error message when
remove()
fails inIFileSystem::removeFile()
to match the Windows behavior.
112.40¶
Fixed¶
OM-39974: Fixed a memory corruption crash that could occur when
IInput::clearActionMappings
was called in a multi-threaded environment.
112.39¶
Fixed¶
Updated the following INFO log from carb.audio from
[carb.audio.context] the bus count would not be changed => exiting
to[carb.audio.context] the bus count would not be changed => nothing to do
Changed that message to VERBOSE as well.
112.38¶
Fixed¶
carb::audio::IAudioUtils::drawWaveform()
will no longer encounter errors when the sound offset is specified in a unit other than frames.
112.37¶
Changed¶
Enable C++17 on codebase¶
OM-34896: Enable C++17. By default Carbonite now compiles with C++17. Linux toolchains stay the same as before, MSVC has been moved to VS2019. All existing binaries remain 100% compatiable, including python bindings. Projects using Carbonite can continue using C++14. Carbonite remains backwards compatible with C++14.
112.36¶
Fixed¶
Fixed a bug in ILauncher on Linux where destroying a process handle could incorrectly close a file descriptor it didn’t own.
112.35¶
Changed¶
Drastically improved performance of carb.profiler-cpu.plugin¶
OM-33716: Change carb.profiler-cpu.plugin to use per-thread queues instead of a global ringbuffer. This greatly improved performance by reducing contention: about 99.5% faster in highly contended cases.
Switched to using Ryu and {fmt} for conversion of numeric values to string in the profiler for additional speed improvement. Adjusted compression settings so that a generated .gz profile is about 2% larger but much faster.
OM-39381: Fixed an issue where
CARB_PROFILE_FUNCTION
incorrectly generated the function name.
112.33¶
Fixed¶
OM-38834:
IFileSystem::readFileLine()
now consumes the line ending even if there is no room for it in the buffer provided. See the documentation forIFileSystem::readFileLine()
for more information.
Changes¶
Keys for carb.dictionary.plugin now internally use
carb::RString
. This has no effect on the plugin interface, ABI or API but should result in higher performance and less (transient and long-term) memory usage.Compile-breaking change: carb/rstring/RString.h has moved to carb/RString.h.
112.32¶
Fixed¶
Added better collection of the Windows product name string to include Windows Server versions in
omni::platforminfo::IOsInfo
.Added support for retrieving page file information in
omni::platforminfo::IMemoryInfo
.Added support for retrieving the system compositor vendor and version in
omni::platforminfo::IOsInfo
.
112.31¶
Fixed¶
OM-38790: Fixed memory corruption and invalid memory accesses that could occur in the
RString
system on Linux.Improved stability around
carb::extras::SharedMemory
andcarb.launcher
.
Added¶
Added a
CARB_RETRY_EINTR
macro for GCC on Linux to automatically retry operations whenEINTR
is reported.All Carbonite python bindings are now built for Python 3.9 in addition to the previous platforms.
112.30¶
Fixed¶
Improved the retrieval of available physical RAM in
carb::extras::getPhysicalMemory()
.
112.29¶
Added¶
Added the
omni.platforminfo.plugin
plugin. This provides interfaces to access the CPU, memory, and OS information for the calling process.Added python bindings for the
omni.platforminfo.plugin
plugin.
112.27¶
112.25¶
Fixed¶
carb.input.plugin¶
OM-37121: Allow
filterBufferedEvents()
to be called multiple times beforedistributeBufferedEvents()
is called.Compile-breaking change: The
InputEventFilterFn
now returns aFilterResult
enum instead ofbool
. Previous return values offalse
should now returnFilterResult::eRetain
and previous return values oftrue
should now returnFilterResult::eConsume
.
Other¶
carb::getCachedInterface
can now take a template parameter to reference a specific plugin. If specified, the parameter must be a global const char array to have the requisite template linkage.Improved some error messages around
tryAcquireInterface
failures.
112.24¶
Fixed¶
carb.assets.plugin¶
OM-38102: The carb.assets system would consider successful but zero-byte loads from a datasource as failures. This is no longer the case: zero-byte successful loads are now treated as success and the asset will proceed with the loading process.
carb::assets::IBlobAsset
now supportsnullptr
/zero-byte data and has been changed to version 1.0.
112.23¶
Changes¶
carb.crashreporter-breakpad.plugin¶
OM-38102: Crashes now store metadata as a separate file alongside crashes, so if crash uploads must be deferred until a subsequent run, the proper metadata can be uploaded.
The uptime of the application (measured as time that carb.crashreporter-breakpad.plugin has been loaded) is now automatically included in the metadata as
UptimeSeconds
.The UUID of the dump is now included in the metadata as
DumpId
.Crash metadata is included in the human-readable text file that is produced alongside the crash dump.
112.22¶
Changed¶
fix carb.log_* python functions to provide more source info (file, line number, module etc) to the logging system.
112.21¶
Fixed¶
OM-37197: When carb.crashreporter-breakpad.plugin detects a crash and writes out the callstack in the .txt file, it now attempts to discern source file and line information (via
addr2line
) and include it in the report.Resolved an erroneous log message “Failed to create or open a semaphore” that would be logged when using
RString
in multiple modules.
112.20¶
Removed¶
Removed the
omni/extras/InterruptableSleep.h
header and related classes in favor of usingcarb::cpp20::binary_semaphore
directly instead.
112.19¶
Added (Reverted in 112.26)¶
Functions for string trimming
OM-34980: Helper functions for processing command line arguments handle array and JSON values
Changed (Reverted in 112.26)¶
carb::extras::CmdLineParser now trims whitespace character for keys and values
112.18¶
Fixed¶
OM-37431: Fixed an internal carb.tasking assumption that could lead to
CARB_CHECK
violations.OM-37902: Fixed a race condition with certain timed waits that could lead to asserts and test failures.
112.17¶
Fixed¶
OM-37870: Fixed an issue that was causing
carb::tasking::Future
returned fromITasking::addTask
(and variants) to be signaled before a task was complete, causing spurious test failures. Added documentation.
112.16¶
Added¶
Added the omni.telemetry.transmitter tool to its own package that is published with the other Carbonite packages. This was done for easier deployment of the tool in non-Carbonite projects that want to use it.
112.15¶
Added¶
OM-31214: Added a function
carb::quickReleaseFrameworkAndTerminate()
which will attempt to shutdown all plugins, flushstdout
andstderr
, and terminate the app viaTerminateProcess()
on Windows or_exit()
on Linux.
Fixed¶
carb.memory has been disabled by default for Debug builds (it was already disabled by default for Release builds) as it could cause shutdown crashes.
On Windows, if
main()
exits and the Carbonite framework has not been shut down, the framework now attempts to shut itself down before all threads are terminated.A workaround was implemented when using carb.tasking with ASan and UBSan: false errors could previously be reported due to fiber stack memory being reused. If ASan is detected, the memory for thread stacks is now
mmap
’d toPROT_NONE
instead of unmapped, leaving the address space non-reusable but preventing the errors.
112.14¶
Fixed¶
OM-37286: Fixed possible UB with
carb::tasking::Trackers
storing aninitializer_list
.Fixed a compile issue with include/carb/assets/IAssets.h on GCC 10.
112.13¶
Fixed¶
OM-34654: carb.dictionary.serializer-json could not handle serializing or parsing float values such as
inf
ornan
, which could cause corrupted JSON files from failed serialization. This has been fixed to serialize those values as strings so they can be serialized/deserialized properly.
112.11¶
Changed¶
Changed carb.crashreporter-breakpad to determine the absolute path of the crash dump directory during configuration rather than in the crash handling code path to prevent possible errors while crashing.
112.8¶
Fixed¶
Made the handling of finding the system temp directory more robust on Linux and improved some error messages from
carb::filesystem::IFileSystem::makeTempDirectory()
.
112.7¶
Fixed¶
Command line settings are now parsed as 64 bit integers and doubles, rather than 32 bit integers and floats. This prevents clamping of values larger than the maximum values of 32 bit integers or floats.
112.6¶
Changed¶
Changed carb.crashreporter-breakpad to print the absolute path of the crash dump file.
112.3¶
112.1¶
Fixed¶
Resolved an issue with counted
RString
objects from 112.0 where the length was not always taken into account.
112.0¶
Changed¶
RString changes¶
RString
API has a minor change:isNone()
is replaced byisEmpty()
, and default-constructedRString
will refer to an empty string (c_str()
returns “”). Similarly,eRString::RS_None
is replaced byeRString::Empty
.RString
and variant classes now have constructors that accept a counted string (length provided) and astd::string
.As such,
RString
now supports strings with embedded NUL (‘\0’) characters.
CrashReporter-Breakpad changes¶
Windows minidumps now include data segment information (global variables).
RString
data is included in Windows minidumps.Settings key
/crashreporter/preserveDump
(default: false) can be used to have a dump file remain even after it has been uploaded to the server.Several log messages when writing a crash dump and uploading were changed from Verbose to Warn to be more visible.
Fixed¶
On Linux, processes launched via
ILauncher
withfLaunchFlagNoStdOut
and/orfLaunchFlagNoStdErr
would close the file handles forstdout
andstderr
, allowing them to be reused. This could lead to undefined behavior.
111.20¶
Optimized read access of the IDictionary interface.
Fixed¶
Changed¶
OM-36102: carb.crashreporter-breakpad prints crash dump file location at error level when crash occurs.
111.18¶
Fixed¶
omni::core::cast would not compile if used with
IObject
and the Implementation uses multiple inheritance.Added a unit test for the above.
111.17¶
Fixed¶
OM-13024 and OM-25736: Interfaces (that may be non-trivial) were always memcpy’d when instantiated. Now, by means of a new plugin function
carbOnPluginRegisterEx2
(automatically generated byCARB_PLUGIN_IMPL
), the plugin interfaces are now constructed in place without memcpy. This requires the plugin to be recompiled against Carbonite 111.17. The Carbonite Framework version did not change and remains version 0.5. Any plugins compiled against Carbonite Framework 0.5 will continue to work (but will perform the memcpy which is unsafe if the Interface struct is not trivial), and Carbonite Framework 0.5 from Carbonite 111.16 and previous will continue to load newer plugins.
111.15¶
Fixed¶
OM-35664: Fixed an issue with plugin unload ordering where dependencies could be unloaded to early. This was rare and generally affected plugins which had a stated dependency in
CARB_PLUGIN_IMPL_DEPS
but did not acquire the dependency untilcarbOnPluginShutdown()
was called.
111.14¶
Fixed¶
OM-35375: It was possible for some
ISettings
setter functions such assetString
to call callbacks while an internal lock was held. This could lead to some deadlock situations if another thread was querying the settings.
111.13¶
Fixed¶
Renamed tempalte vars in
TypeTraits.h
to avoid conflicting with termios.h
Changed¶
Moved the telemetry transmitter helper functions in
include/omni/structuredlog/Telemetry.h
from theomni::structuredlog
namespace toomni::telemetry
.Implied ‘test’ mode in the telemetry transmitter when the
/telemetry/schemaFile
or/telemetry/schemasDirectory
options are used.
111.12¶
Fixed¶
Fixed the
omni.structuredlog
tool to only disable MSVC’s ‘fast up-to-date’ check for projects that make use of the tool. Projects that do not use the tool will still skip the build check if they are up to date.
Changed¶
omni::structuredlog::launchTransmitter()
will now automatically pass a number of settings from the host process to the child process, so that launching the transmitter is easier.
111.11¶
Changed¶
Updated to repo_format 0.6.4
111.10¶
Fixed¶
Fixed an issue with carb.profiler-tracy.plugin where throwing a C++ exception could cause issues after the plugin was unloaded.
Added¶
Added a helper function to
carb::launcher::ArgCollector
to collect all the settings in a given branch and add them as arguments that can be passed to a child process.
111.9¶
Changed¶
Upgraded to repo_format 0.6.0 and ran latest repo_format on all code. This results in a large change to copyright ranges in the header of source files only.
111.7¶
Fixed¶
Fixed potential memory corruption that could occur within carb.tasking, especially with
ITasking::applyRange()
.
Changed¶
omni.telemetry.transmitter requires
--/telemetry/allowRoot=true
to be able to run as root. This was done to prevent users from running the transmitter withsudo
and causing permission issues with the lock files.
111.6¶
Fixed¶
Shutdown/unload improvements¶
Change 110.0 introduced a tweak to unload ordering that would attempt to discover “implicit dependencies” by plugins acquiring interfaces through
tryAcquireInterface
. There were issues with this implementation and it was disabled in version 111.3.A corrected unload order is now present in Carbonite. If plugin Foo acquires an interface from plugin Bar, Foo must now be unloaded before Bar. The exception to this rule is a circular reference, in which case unload order is the reverse of the load order.
Added¶
Added documentation for the various structured log settings to the Telemetry Overview docs.
Added documentation for the various telemetry transmitter settings to the Telemetry Overview docs.
Added
/structuredlog/logDirectory
to allow the output directory of structured logging to be specified by Settings.
111.5¶
Added¶
Structured Log¶
Documented the wildcard helper functions in
include/omni/str/Wildcard.h
.Added settings keys to allow structured log schemas to be enabled or disabled from config files or command line.
The following new settings paths have been added to disable schemas and events. Each key under this path will enable or disable one or more schemas or events (wildcards are allowed):
/structuredLog/state/schemas
: enable or disable zero or more schemas when they are first registered./structuredLog/state/events
: enable or disable zero or more events when they are first registered.
The following new settings keys have been added to disable schemas and events. Each of these keys is expected to be an array of strings indicating the schema or event name and its enable or disable state:
/structuredLog/schemaStates
: enables or disables zero or more matching schemas when they are first registered./structuredLog/eventStates
: enables or disables zero or more matching events when they are first registered.
For more information, see
include/omni/structuredlog/StructuredLogSettingsUtils.h
or consult the generated documentation package.Added
/structuredlog/logDirectory
to allow the output directory of structured logging to be specified by Settings.
Utilities¶
Added
carb::this_thread::getProcessId()
andcarb::this_thread::getProcessIdCached()
to wrap the platform-specfic code needed to get a process ID.
111.4¶
Fixed¶
Fixed a hang that could occur rarely with
carb::getCachedInterface<>
on the AArch64 platform.
111.3¶
Changed¶
The “Improvements to Carbonite Shutdown” from version 110.0 have been revoked pending review. An issue was discovered that would cause improper plugin unload order on shutdown.
111.2¶
Added¶
String-interning (registered fast-comparison strings)¶
A registered string class
RString
has been added in carb/rstring/RString.h.The
RString
class is case-sensitive, but has companion classRStringU
that is “un-cased” (i.e. case-insensitive).The
RString
and variant classes can be (in)equality checked in O(1), and non-lexicographically sorted in O(1) time.All registered strings are shared within an application’s memory space across multiple modules and can be used prior to
main()
without needing to instantiate the Carbonite framework.Carbonite registered strings are similar to Unreal’s
FName
,boost::flyweight<std::string>
and USD’sTfToken
.
111.1¶
Added¶
/telemetry/schemasDirectory
and/telemetry/schemaFile
has been added to omni.telemetry.transmitter. This will allow debug builds to load their telemetry schemas from disk instead of requiring a HTTP download./telemetry/authentication
has also been added to the transmitter to allow test cases where authentication can’t be used.
Fixed¶
Fixed a shutdown crash that could occur if a cached interface was destroyed after the Carbonite framework has been unloaded.
110.1¶
Fixed¶
Fixed an issue with carb.scripting-python.plugin where
IScripting::executeScript()
andIScripting::executeScriptWithArgs()
would crash if the script had incorrect Python grammar.
110.0¶
Changed¶
Improvements to Carbonite Shutdown¶
If a plugin creates a dependency with
tryAcquireInterface()
, that dependency could be unloaded before the plugin is unloaded, leading to potential crashes at shutdown. Now such a dependency is taken into account during plugin unloading so that plugins are unloaded before their dependencies.The
getCachedInterface()
helper function no longer tries to re-acquire the interface if the interface has been released. TheresetCachedInterface()
function will evict the cached interface and reset so that the next call togetCachedInterface()
will attempt to re-acquire the interface. Releasing the entire framework however does reset the cached state so that it can be re-acquired.Cached interfaces are now evicted immediately prior to calling
carbOnPluginShutdown
for a plugin. This causesgetCachedInterface()
to returnnullptr
instead of an interface that is in the process of destructing.
108.14¶
Added¶
IAudioDevice::getBackend()
has been added to allow users to check which audio backend they’re running under to make specific decisions based on which audio system is running. This is mainly intended to be used to detect if ALSA is in use, which makes some operations (such as device enumeration) costly.
108.13¶
Changed¶
omni.telemetry.transmitter switched from environment variables to ISettings. This allows users to configure omni.telemetry.transmitter with the config.toml file or via command line arguments.
OMNI_TELEMETRY_ENDPOINT
has been replaced with/telemetry/endpoint
.OMNI_TELEMETRY_SCHEMAS_URL
has been replaced with/telemetry/schemasUrl
.
108.12¶
Changed¶
omni.telemetry.transmitter no longer uses python.
omni::structuredlog::launchTransmitter()
has had the arguments for its python environment removed.
108.11¶
Changed¶
The carb.tasking.plugin heuristic that guides
carb::tasking::ITasking::applyRange
has been adjusted to allow for more parallelism, especially with fewer than 512 items.
108.10¶
Fixed¶
Callstacks reported by carb.crashreporter-breakpad.plugin during crash time now include offsets next to the function names in order to be more accurate.
108.9¶
Changed¶
carb.profiler-cpu is now statically linked to zlib on Linux. This was the existing behavior on windows.
Public include files should now build cleanly with /W4 warning level on MSVC and -Wall on GCC.
Added¶
carb.tasking.plugin Additions¶
If the /plugins/carb.tasking.plugin/debugTaskBacktrace key is true and a task enters the Waiting state, the backtrace is now captured and stored at
carb::tasking::TaskBundle::m_backtrace
for a given task. The entire database of tasks is available atcarb.tasking.plugin.dll!carb::tasking::Scheduler::s_scheduler->m_taskHandleDb
and can be added to the watch window.carb::tasking::ScopedTracking
now exists to be able to start and end tracking oncarb::tasking::Trackers
without having to add a dummy task (OM-33470).
108.8¶
Fixed¶
Fixed the
omni.structuredlog
tool when it is called using an external project (ie: outside of Carbonite). Previously this script would generate prebuild commands that would not work properly under MSVC. They would however build correctly when run throughbuild.{bat|sh}
. This tool has now been fixed to write out a full build script for MSVC prebuild commands and write out a similar set of commands for use on Linux.
108.7¶
Changed¶
carb.tasking.plugin Changes:¶
An optimization where a task that waits on another task may attempt to execute the dependent task immediately, regardless of priority.
Dependency helper classes
carb::tasking::Any
andcarb::tasking::All
can now take iterators as input.Fixed a small rare memory leak at shutdown.
108.6¶
Added¶
Additional features for carb.tasking.plugin¶
“Task Storage” has now been exposed in the
ITasking
interface (similar to thread-local storage, but for tasks).Full support for
Promise
andFuture
types.Added support for specifying multiple schemas to be built in a single project. Multiple schemas may now be specified as an array in a single call to
omni_structuredlog_schema()
. A single schema to be built may still be specified by passing an object containing the parameters instead of a full array.
108.5¶
Added¶
Added support for anonymized and pseudonymized events in the telemetry transmitter.
Fixed¶
Fixed some structured log schemas that don’t always rebuild properly under MSVC. This was caused by a limitation of MSVC projects generated under premake. This problem didn’t exist on Linux.
108.4¶
Changed¶
Class names in generated structured log headers have changed to include the version in their name. This will require changes in structured log calls that use enum types or object types and code that uses generated structured log python bindings.
Fixed¶
The
OMNI_FORCE_SYMBOL_LINK
macro now correctly evaluates, so redefinition errors should no longer occur.It should now be possible to include multiple versions of a structured log schema without encountering build errors.
108.3¶
Fixed¶
Added a more helpful error message when setup_omni_structuredlog() isn’t called in a premake script that uses omni_structuredlog_schema().
108.2¶
Changed¶
Added
isWindowFloating
andsetWindowFloating
tocarb::windowing::IWindowing
, and implemented them for carb.windowing-glfw.plugin.
108.1¶
Changed¶
Upgraded to the newest version of repo_format, which includes clang-format v12.
Removed the –clang-format and –clang-format-style options from the omni.bind python script, these are replaced with –format-module, which gives the user more flexibility in choose how and if they want to format the code.
Breaking Changes¶
Users are required to upgrade to repo_format 0.5.4 or later.
108.0¶
Changed¶
`ILogMessageConsumer_abi::onMessage_abi()`` had its prototype changed to add the TID, PID and timestamp, so that this data will be available when using asynchronous logging.
107.3¶
Fixed¶
Fixed a rare debug assert in ITasking.
Fixed an issue where a carb::tasking::Semaphore could assert on destruction.
Changed¶
omni.structuredlog.lua has replaced the questionable carb_path
global with
setup_omni_structuredlog()
to specify the carbonite path.
107.2¶
Changed¶
IAssets¶
The IAssets
interface has changed to better support ITasking
and to deprecate carb::tasking::Counter
.
The
IAssets::loadAsset()
functions no longer take aCounter
object. Instead, they take acarb::tasking::Tracker
helper object similar to theITasking::addTask
functions. This allows specifying multiple variant types of trackers to asset loading (including the now-deprecatedCounter
objects).The
IAssets::loadAssetEx
function is deprecated and directs the caller to use the saferloadAsset
wrapper functions.The
LoadAssetFn
andCreateContextFn
no longer pass aCounter
and expect data to be returned rather than passed through an output argument. Since these functions are called from Task Context as a co-routine, they are free to use any of the fiber-safe waiting methods provided byITasking
to await other operations.
107.1¶
107.0¶
Changed¶
ITasking 2.0¶
The ITasking
interface has undergone some extensive improvements that are (mostly) backwards-compatible with existing
code.
The
Counter
type is deprecated. The interface remains for the time being but will now produce deprecation warnings for manualCounter
manipulation. Instead,TaskGroup
is a more efficient means of grouping tasks together.The
Any
andAll
helper objects forRequiredObject
used byITasking::addSubTask
are now nestable.Tasks can now be canceled before they have started executing. See
ITasking::tryCancelTask()
.The
ITasking::addTaskIn
andITasking::addTaskAt
functions now accept multiple tracker objects.The
ITasking
functionsyieldUntilCounter
andwaitForTask
have been combined into a genericwait()
function. Thewait()
function can also useAny
andAll
helper objects.Unhandled exceptions thrown from a task will now treat the task as canceled.
A fiber-aware futex system has now been exposed to allow for generic waiting.
The
PinGuard
and wrapper classes such asCounterWrapper
no longer need anITasking*
pointer passed to them, nor do they cache the pointer. These classes now rely on thecarb::getCachedInterface
helper function.
IAssets¶
The IAssets
interface has changed to better support ITasking
and to deprecate carb::tasking::Counter
.
The
IAssets::loadAsset()
functions no longer take aCounter
object. Instead, they take acarb::tasking::Tracker
helper object similar to theITasking::addTask
functions. This allows specifying multiple variant types of trackers to asset loading (including the now-deprecatedCounter
objects).The
IAssets::loadAssetEx
function is deprecated and directs the caller to use the saferloadAsset
wrapper functions.The
LoadAssetFn
andCreateContextFn
no longer pass aCounter
and expect data to be returned rather than passed through an output argument. Since these functions are called from Task Context as a co-routine, they are free to use any of the fiber-safe waiting methods provided byITasking
to await other operations.
HandleDatabase¶
HandleDatabase has a new function
handleWasValid()
to check if a handle was previously valid but has been released.Added an
addRef()
function that accepts a validTrueType*
.
106.7¶
Changed¶
carb.crashreporter-breakpad.plugin was updated to use Google Breakpad chrome_90 release.
106.6¶
Changed¶
Renamed the
OmniCoreStartArgs::padding
member toOmniCoreStartArgs::flags
and added some flags to control the behavior of some of the built-in object overrides more explicitly. Specifically to allow for theILog
andIStructuredLog
objects to be able to be disabled without having to create a dummy stub implementation for each of them. This member was intentially unused before and did not change size so it should not cause any breakages from the name and usage change.
106.4¶
Changed¶
carb.scripting-python.plugin:
executeScript()
andexecuteScriptWithArgs()
now do just-in-time script compilation when called for the first time. Previously the script was compiled each time the functions were called.
106.3¶
Fixed¶
Fixed a crash that would occur in an app started from Python if carb.scripting-python.plugin was initialized but the GIL had been released by the calling thread.
106.2¶
Fixed¶
The carb.tasking plugin will now discard all pending tasks when released. Only the tasks currently running will be allowed to finish. Note that this will potentially cause leaks; if it is important to clean up rather than abandoning tasks, use a
carb::tasking::Counter
or other means to ensure that all necessary tasks have completed before releasing carb.tasking.plugin.
106.1¶
Added¶
Added
omniGetBuiltInWithoutAcquire()
to carb.dll/libcarb.so which will become the new entry-point for accessing interfaces. The existing functionsomniGetLogWithoutAcquire()
,omniGetTypeFactoryWithoutAcquire()
andomniGetStructuredLogWithoutAcquire()
are now deprecated and will be removed in a future version.
106.0¶
Broke¶
Removed
ICaching
interface. The interface had no known usage in the wild.
Fixed¶
Restored
omniGetTelemetryWithoutAcquire
which was removed between 105.0 and 105.1.
105.2¶
Changes¶
Improvements to carb.tasking’s parallel_for()/applyRange()¶
The parallel_for()
and applyRange()
functions in ITasking
should be seeing 5-10% improvement in certain situations.
Improvements to LocklessQueue and LocklessStack¶
The InputIterator
-style push()
functions on these containers now accept InputIterator
types that dereference into
both T*
and T&
types to allow for different situations.
Fixed¶
Using carb.tasking’s
applyRange()
function should prevent stuck checking and fix the occasional “carb.tasking is likely stuck” messages.Fixed an issue that could sometimes cause a crash at shutdown in carb.profiler-cpu and carb.dictionary.
105.1¶
Fixed¶
.pyd files that call OMNI_PYTHON_GLOBALS
can now access carb::Framework
from within the bindings.
105.0¶
Removed¶
The mirror tool dependency has been removed along with associated tests.
carb.windowing-glfw now only supports X11/GLX on Linux. The Wayland/EGL backend has been removed.
104.0¶
Broke¶
ITokens 0.1 -> 1.0¶
ITokens::calculateDestinationBufferSize
now accepts a pointer to store an error code (ResolveResult
) of the
calculation. This is an ABI breaking change.
ITokens::calculateDestinationBufferSize
and ITokens::resolveString
now accept special flags (ResolveFlags
) that allow to modify token resolutioin process. This is an ABI breaking change.
All Interfaces Bumped to at least 1.0¶
IObject
0.1 -> 1.0IAssert
0.2 -> 1.0IAssetsBlob
0.1 -> 1.0IAudioCapture
0.4 -> 1.0IAudioData
0.6 -> 1.0IAudioDevice
0.1 -> 1.0IAudioGroup
0.1 -> 1.0IAudioPlayback
0.5 -> 1.0IAudioUtils
0.3 -> 1.0ICaching
0.1 -> 1.0IDataSource
0.3 -> 1.0IDictionary
0.8 -> 1.0IEcs
0.1 -> 1.0IEvents
0.2 -> 1.0IFileSystem
0.1 -> 1.0IMemoryTracker
0.1 -> 1.0IProfileMonitor
0.3 -> 1.0ISettings
0.6 -> 1.0IFiberEvents
0.1 -> 1.0IThreadPool
0.1 -> 1.0IThreadUtil
0.1 -> 1.0ITypeInfo
0.1 -> 1.0IGLContext
0.1 -> 1.0
This change was made to avoid potentially unnecessary breaking changes (due to semantic versionings 0 major rule) in the future.
103.1¶
Fixed¶
RingBuffer improvements¶
The carb/container/RingBuffer object had a problem with high contention. The RingBuffer now performs much better in a high-contention environment.
carb.profiler-cpu improvements¶
Because it was based on the RingBuffer, carb.profiler-cpu.plugin also suffered from debilitating performance problems that have been resolved with the RingBuffer improvements.
Resolved potential Linux hang in carb::thread::futex¶
The Futex system had a rare hang that could occur in certain situations where a wait() would not be woken by a notify()
due to a race condition. This also affected things using carb::cpp20::atomic<>
which was based on
carb::thread::futex
.
PooledAllocator no longer constrained by “buckets”¶
The template parameter for the number of “buckets” in use by the PooledAllocator
has now been removed.
PooledAllocator
will now happily allocate memory until the underlying allocator runs out of memory.
103.0¶
Fixed¶
getCachedInterface() now re-acquires when framework/plugin unloaded¶
If an interface is released (or the entire framework is released), carb::getCachedInterface()
will now detect this and
attempt to re-acquire the interface (or return nullptr
if it is no longer available). This fixes issues where plugins
may be often released and re-acquired.
NOTE: Do not use static
when calling acquireInterface
as this will not properly reset if the interface is released.
Instead, use carb::getCachedInterface()
.
NOTE: To streamline the adoption process, the Carbonite framework version was not modified. Two new functions were
added to carb::Framework
. Since the framework version was not altered, it is possible for code built against the new
getCachedInterface()
to load older versions of Carbonite without error, but this will result in a crash instead of a
failure to load the Carbonite framework. This edge case was deemed to be rare and the cost to alter the framework
version much higher than the benefit granted.
Added¶
Release Hooks for plugins and the framework¶
The Carbonite framework now has two new functions: addReleaseHook()
and removeReleaseHook()
. These function as sort
of atexit()
-like behavior for the Carbonite framework based on an interface being released. If nullptr
is specified
as the interface, then the Release Hook will be called back when the Carbonite framework itself is released.
102.15¶
Added¶
carb.tasking lock debugging¶
Since carb.tasking is a fiber-based tasking system, tasks that enter a waiting state and then wake can resume on any
thread (unless pinned with carb::tasking::PinGuard
). Locks like std::mutex
, std::recursive_mutex
and
std::shared_mutex
that are locked before waiting and unlocked after waking see this as a thread that doesn’t own the
lock attempting to release the lock. To discover these conditions, a config option has been added to carb.tasking:
/plugins/carb.tasking.plugin/debugLocks (default:false). When this option is enabled, having a task wait while holding
a mutex will result in an Error log and assert.
102.14¶
Fixed¶
IAssets potential OnChangeEvent call during/after unsubscribe¶
Fixes an issue with IAssets
where an OnChangeEvent
callback could be in progress during
unsubscribeToChangeEvents
. The behavior now waits in the unsubscribe call for any callback in progress to finish. It
is now also possible to unsubscribe during the callback.
Added¶
carb::tasking::RecursiveMutexWrapper¶
carb::tasking::MutexWrapper
will now abort if used recursively. If recursion is desired, use RecursiveMutexWrapper
.
HandleDatabase::releaseIfLastRef¶
Added a function HandleDatabase::releaseIfLastRef
which allows special functionality if-and-only-if a handle reference
is the last reference, atomically.
Changed¶
ITasking performance improvement¶
ITasking
now benefits from a performance optimization for starting the next pending task immediately when a task
completes.
ISettings/IDictionary changes¶
Retrieving an array via python bindings will keep the elements of the array as their proper types rather than collapse them to a common type.
ISettings::getPreferredArrayType
andIDictionary::getPreferredArrayType
now use the first element as a baseline type to convert to, instead of trying to convert everything toeBool
by default. This was causing an array of[0.0, 0.0, 0.0]
to convert to[False, False, False]
erroniously.
102.13¶
Fixed¶
IAssets delay reloading fix¶
Fixes two issues introduced with 102.11:
IAssets::yieldForAssetLoaded
could spuriously wait if an asset reload was in progress.Unregistering an AssetType would wait for pending assets to reload, even if the reload delay was very long. Now asset reloads are abandoned immediately upon unregistering an AssetType.
ITasking crash fix¶
Fixes a rare crash with use of carb::tasking::Any
and carb::tasking::All
in 102.10
102.12¶
Fixed¶
ITasking fix for “carb.tasking is likely stuck” during applyRange()¶
In long-running parallel tasks during applyRange()
the carb.tasking stuck checking feature could determine that the
system is stuck even when it is not. Now applyRange()
contributes to the heuristic which should reduce false positive
stuck warnings.
102.11¶
Changes¶
IAssets version 1.0¶
IAssets
has been promoted to version 1.0 with a few additional changes. AssetTypeParams
has been created as a
parameter for registerAssetType()
to contain all of the configuration information for Asset Types; this struct should
start as AssetTypeParams::getDefault()
and then any parameter changes can be made.
The AssetTypeParams
struct has a new reloadDelayMs
option (default=100 ms). For Asset Types that automatically
reload, this will wait for reloadDelayMs
to elapse from the last datasource change notification in an effort to
prevent multiple reloads for multiple changes in rapid succession that can occur when an asset is being written to.
102.10¶
Changes¶
ITasking::addSubTask()
and ITasking::addThrottledSubTask()
support lists of required Counter objects¶
In some cases, it is desirable to wait until any or all of a group of Counter objects become complete in order to
start a sub-task. To that end, addSubTask()
and addThrottledSubTask()
now accept an initializer_list
of Counters,
passed into helper objects carb::tasking::Any
or carb::tasking::All
, such as:
tasking->addSubTask(carb::tasking::All{ counter1, counter2 }, ...)
Which would wait until both counter1
and counter2
are complete before starting the sub-task. carb::tasking::Any
is specified similarly but waits until at least one of the passed Counters is complete.
ITasking::addTask()
and variants support lists of notify Counter objects¶
In some cases, it is desirable for multiple Counter objects to be incremented before a task starts and decremented when
the task completes. Previously, only one Counter could be passed to addTask()
variant functions and the other Counter
objects would need to be manually incremented/decremented. Now, addTask()
variants (except for addTaskAt()
and
addTaskIn()
) will allow passing an initializer_list
of Counters. Each of the non-nullptr Counter objects passed will
be incremented before the addTask()
variant function returns and decremented upon task completion.
102.9¶
Added¶
New feature: CARB_STRONGTYPE
¶
CARB_STRONGTYPE
now exists in carb/Strong.h to declare a strong type. The using
and typedef
keywords do not
actually create a new type; they just create aliases for the type. CARB_STRONGTYPE
declares a structure that acts like
the referenced type but is strongly typed and requires explicit assignment.
New feature: carb::delegate::Delegate
¶
Delegate
implements a std::function
-like loose-coupling system but allows multiple bindings and thread-safe access.
Additionally, it attempts to be as safe as possible allowing bound callbacks to unbind themselves (or other callbacks)
safely when the callback is executing. See carb/delegate/Delegate.h for more information.
102.8¶
Fixed¶
Performance improved in ITasking::applyRange()
¶
A degenerate case was identified that could cause ITasking::applyRange()
to perform poorly under very short workloads.
This has been corrected. In some cases, small workloads may still perform more poorly than a straight for()
loop due
to the overhead in dispatching tasks to other threads and subsequent cache performance. Performance testing uses of
applyRange()
is advised.
102.7¶
Changes¶
ITypeFactory
now calls onModuleCanUnload
and onModuleUnload
¶
Previously, ~ITypeFactory
would simply call dlclose
/FreeLibrary
to shutdown each loaded plugin. This patch now
attempts to call each plugin’s onModuleCanUnload
, and if it returns true
, onModuleUnload
is called followed by
dlclose
/FreeLibrary
. If a plugin’s onModuleCanUnload
returns false
it may be called again after other plugins
are unloaded. If onModuleUnload
cannot be safely called, either because onModuleCanUnload
returns false
or it is
not defined, ~ITypeFactory
will call dlclose
/FreeLibrary
on the loaded plugin.
This is new behavior and may expose bugs in previously existing onModuleCanUnload
/onModuleUnload
implementations.
102.6¶
Changes¶
Debugging mode for waiting tasks¶
ITasking
now supports a new boolean setting: /plugins/carb.tasking.plugin/debugWaitingTasks (default=false). This
setting parks all waiting tasks in a dedicated thread so that they will show up in debuggers. For Visual Studio, the
Parallel Stacks and Threads windows will now have threads named “carb.task wait” and __WAITING_TASK__()
will be in the
call stack. For GDB, the threads will appear with the name “carb.task wait” and will show up in the “info threads” list.
Note that this debugging feature can create hundreds of transient threads and may negatively affect performance, but
can be useful for debugging hangs.
Debugging mode for Task and Counter creation backtrace¶
ITasking
now supports a new boolean setting: /plugins/carb.tasking.plugin/debugTaskBacktrace (default=false). This
setting will capture a backtrace when ITasking::addTask()
is (or variants are) called. This backtrace is available to
view in the debugger as a local variable DebugTaskCreationCallstack
in the carb::tasking::TaskBundle::execute
function whenever a task is being executed. Similarly, a backtrace will be captured for Counter objects created with
ITasking::createCounter
and ITasking::createCounterWithTarget
. This backtrace is available as a local variable in
the Counter::wait
function called DebugCounterCreationCallstack
. At carb.tasking.plugin shutdown time, the
creation backtrace of any leaked Counter objects is logged as a Warning.
102.3¶
Changes¶
ITasking
will attempt to detect a “stuck” condition and attempt to get “unstuck”¶
It is possible to get ITasking
into a situation where it is stuck: a task uniquely locks a resource and then waits in
a fiber-safe way. Other tasks attempt to lock the same resource but don’t wait in a fiber-safe way until all task
threads are blocked waiting on the resource. At this point ITasking
is stuck because when the task that holds the lock
becomes ready to run, no threads are available to run it. The new emergency-unstick system will detect this and start
emergency threads to process ready tasks, attempting to un-stick the system.
The stuck-check time can be configured using ISettings
key /plugins/carb.tasking.plugin/stuckCheckSeconds (default:
1; set to 0 to disable).
102.2¶
Fixed¶
IAssets::unregisterAssetType()
now waits until all assets are actually unloaded¶
In prior versions, performing several IAssets::unloadAsset
, IAssets::unloadAssets
or IAssets::releaseSnapshot
could
start unloading data in the background. A call to IAssets::unregisterAssetType
after this point could potentially
destroy the asset type, but would not wait for the background unload tasks to complete. This could cause issues at shutdown
where other systems would shut down expecting that after unregistering the type that they would no longer be used. This
fix causes IAsset::unregisterAssetType
to wait for any pending load/unloads to complete before returning.
Fixes an issue where IAssets
could stop updating an asset¶
If an asset was loaded twice and one of the assets was unloaded, the system would ignore changes to the underlying data and no longer update the still-loaded asset. This has been resolved.
102.1¶
Fixed¶
Task priority changes to ITasking
¶
ITasking
now correctly respects task priority when resuming tasks that have slept, waited or suspended.
ITasking
compile fixes¶
ITasking::addTask()
and variants would fail to compile in situations where they were capturing additional parameters
that would be passed to the Callable parameter. These compile issues have been fixed.
102.0¶
Broke¶
Normalized Mouse Coordinate in IInput
¶
IInput
interface version has bumped from 0.5 to 1.0. This is to support mouse coordinates being returned in either
normalized or pixel coordinates.
IInput::getMouseCoords
was renamed toIInput::getMouseCoordsPixel
.Added
getMouseCoordsNormalized
.Python:
MouseEvent.get_mouse_coords
was renamed toMouseEvent.get_mouse_coords_pixel
.Python: Added
MouseEvent.get_mouse_coords_normalized
.
carb.imaging.plugin.dll Has Moved to the rendering Repo¶
IImaging
has moved to the rendering repo.
Kit is incompatible with older Carbonite builds that still have carb.imaging.plugin.dll.
carb.imaging.plugin.dll users outside kit/rendering must:
Pull rtx_plugins instead of Carbonite
Add a header include path from rtx_plugins/include.
Add plugins/carb_gfx to your search library path.
kit/rendering users can no longer rely on carb.imaging.plugin.dll being built ahead of time and must make it a build prerequisite by including it in their
dependson
.
Transition discussion can be found here.