-
Notifications
You must be signed in to change notification settings - Fork 88
[jni] Store and display stack trace of release point for debugging #2851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Health
License Headers
|
| Files |
|---|
| pkgs/jni/test/debug_release_test.dart |
All source files should start with a license header.
Unrelated files missing license headers
| Files |
|---|
| pkgs/hooks_runner/test_data/download_assets/hook/build.dart |
| pkgs/objective_c/example/command_line/lib/main.dart |
| pkgs/objective_c/lib/src/ns_input_stream.dart |
This check can be disabled by tagging the PR with skip-license-check.
API leaks ✔️
The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
| Package | Leaked API symbol | Leaking sources |
|---|
This check can be disabled by tagging the PR with skip-leaking-check.
Breaking changes ⚠️
| Package | Change | Current Version | New Version | Needed Version | Looking good? |
|---|---|---|---|---|---|
| jni | Breaking | 0.15.2 | 0.15.3-wip | 0.16.0 Got "0.15.3-wip" expected >= "0.16.0" (breaking changes) |
This check can be disabled by tagging the PR with skip-breaking-check.
Changelog Entry ✔️
| Package | Changed Files |
|---|
Changes to files need to be accounted for in their respective changelogs.
This check can be disabled by tagging the PR with skip-changelog-check.
This is useful for debugging use-after-release and double-release bugs.
We store all of the points where the objects is registered to be released by an arena, and also the point when it was finally released. When it comes to throwing either
UseAfterReleaseErrororDoubleReleaseError, we can show the user where they previously released or registered to release the object. We only do this inside assertions and also everything is behind a boolean flagJni.captureStackTraceOnReleasewhich isfalseby default.We store the stack trace string using in a
char**in C because we want to access it from any isolate. A finalizable handle is created to handle garbage collection.Also make
releasedBy(arena)less strict: meaning it will only release if the object has not been released before and will not throw a double release error.Closes #2246.