Skip to content

[datalog] Guard FileLogger callbacks during log destruction - #9314

Open
virtuald wants to merge 2 commits into
wpilibsuite:mainfrom
virtuald:datalog-fixes-12
Open

[datalog] Guard FileLogger callbacks during log destruction#9314
virtuald wants to merge 2 commits into
wpilibsuite:mainfrom
virtuald:datalog-fixes-12

Conversation

@virtuald

Copy link
Copy Markdown
Member

🤖 sez:

The FileLogger(file, log, key) constructor captures DataLog& log by
reference in an asynchronous callback (FileLogger.cpp:70-75). Nothing ties
the logger's lifetime to the log. If DataLog is destroyed or Java calls
DataLog.close() first, a later inotify event invokes AppendString() on the
freed native object.

The Java wrapper does not retain or coordinate the DataLog relationship;
DataLog.close() frees and clears its native handle independently
(DataLog.java:272-275).

@virtuald
virtuald requested a review from a team as a code owner August 16, 2026 20:41
@github-actions github-actions Bot added the type: testing Related to testing. label Aug 16, 2026
@github-actions github-actions Bot added the robotpy Issues that affect RobotPy (Python) support label Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

robotpy Issues that affect RobotPy (Python) support type: testing Related to testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant