Skip to content

fix(svg): create the Linux native view in createNativeView - #197

Merged
triniwiz merged 1 commit into
masterfrom
fix/linux-svg-native-view
Nov 9, 2026
Merged

triniwiz merged 1 commit into
masterfrom
fix/linux-svg-native-view

Conversation

@triniwiz

@triniwiz triniwiz commented Nov 9, 2026

Copy link
Copy Markdown
Member

On Linux, Svg created its GtkDrawingArea once, in the constructor, and returned that same widget from createNativeView(). Disposing the native view releases the widget, so when the same Svg instance was set up again (for example when an Angular HMR update re-attaches the view tree) it returned a freed widget. GTK logged G_IS_OBJECT / GTK_IS_WIDGET criticals and the app crashed.

The drawing area and its draw callback registration are now created in createNativeView(), and the reference is cleared in disposeNativeView().

Svg created its GtkDrawingArea once, in the constructor, and returned it
from createNativeView. Disposing the native view releases that widget, so
when the same Svg was set up again (an Angular HMR update re-attaching the
view tree) it handed back a freed widget: GTK logged invalid-widget
criticals and the app crashed. Create the drawing area, and register its
draw callback, each time the native view is created.
@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 465c7938-582b-4bb2-9523-8f7f03e443a1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

ℹ️ Note: npm publishing is disabled for pull requests.
Publishing is performed only from tag pushes via the npm Release workflow.
If you need a test publish, merge to master — pushes publish pr-tagged prereleases.

@triniwiz
triniwiz merged commit 47f84c4 into master Nov 9, 2026
27 checks passed
@triniwiz
triniwiz deleted the fix/linux-svg-native-view branch November 9, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant