Skip to content

fix(skia-x11): Fix X11 clipboard segfault on TIMESTAMP selection requests - #24168

Merged
MartinZikmund merged 1 commit into
unoplatform:masterfrom
shrimqy:clipboard-crash-fix
Nov 11, 2026
Merged

MartinZikmund merged 1 commit into
unoplatform:masterfrom
shrimqy:clipboard-crash-fix

Conversation

@shrimqy

@shrimqy shrimqy commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

GitHub Issue: n/a

PR Type:

🐞 Bugfix

What changed? 🚀

Fixed X11 clipboard TIMESTAMP selection replies: ownership timestamp is now passed via IntPtr[] instead of a bare IntPtr, so XChangeProperty receives a pointer to the value rather than treating the timestamp as a memory address. Fixes intermittent segfaults when paste is triggered repeatedly while the app owns the clipboard.

PR Checklist ✅

Copilot AI lite review requested due to automatic review settings August 22, 2026 11:24
@github-actions github-actions Bot added the platform/x11 🐧 Categorizes an issue or PR as relevant to X11 label Aug 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an X11 clipboard crash on TIMESTAMP selection requests in the Skia X11 runtime by ensuring the timestamp value is passed to XChangeProperty as a pointer to data (via an IntPtr[]) rather than being misinterpreted as a memory address.

Changes:

  • Update the TIMESTAMP reply path to call XLib.XChangeProperty with IntPtr[] data containing _ownershipTimestamp (avoids passing the timestamp as a raw pointer value).

Process note (blocks readiness):

  • The PR description lists “GitHub Issue: n/a”. Per repo PR rules, please add a proper issue link (Fixes/Closes/Related to with full URL), or add the explicit “No related issue…” note with an approving team member as described in the guidelines.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@morning4coffe-dev morning4coffe-dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix selects the correct XChangeProperty buffer overload: the format-32 TIMESTAMP value must be supplied through an IntPtr[] buffer with one element, not interpreted as an IntPtr address. The existing raw-pointer overload explains the invalid-memory access, and the property type/element count are retained. This is Xlib protocol/marshaling correctness; there is no corresponding microsoft-ui-xaml implementation to translate.

@mergify

mergify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@MartinZikmund

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 245204 found UI Test snapshots differences: skia-linux-screenshots: 240, skia-windows-screenshots: 294

Details
  • skia-linux-screenshots: 240 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedVisualsTestbedPage.png-dark
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • CompositionPath.png-dark
    • CompositionPath.png
    • AnimatedBackVisualSourceSamplePage.png
    • AppWindowTitleBar Properties.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • AppWindowTitleBar Properties.png-dark
  • skia-windows-screenshots: 294 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedVisualsTestbedPage.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png
    • AutomationPropertiesExtensions_Role.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AnimatedVisualsTestbedPage.png-dark
    • AutomationProperties_AutomationId.png
    • AnimatedBackVisualSourceSamplePage.png

@MartinZikmund
MartinZikmund merged commit 363365a into unoplatform:master Nov 11, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform/x11 🐧 Categorizes an issue or PR as relevant to X11

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants