Skip to content

Add a protection against undefined fPainter#22832

Open
couet wants to merge 1 commit into
root-project:masterfrom
couet:canvas-fix
Open

Add a protection against undefined fPainter#22832
couet wants to merge 1 commit into
root-project:masterfrom
couet:canvas-fix

Conversation

@couet

@couet couet commented Jul 16, 2026

Copy link
Copy Markdown
Member

In TCanvas::Build when a canvas is drawn from a TFile, fPainter is not defined and we get a crash. This problem was reported here: https://root-forum.cern.ch/t/segfault-when-drawing-canvas-stored-in-file/

This PR add a simple protection to avoid the crash. It fixes the problem. The canvas is Drawn as before.
May be @linev has a better fix has he did several changes in that area recently: https://github.com/root-project/root/commits/master/graf2d/gpad/src/TCanvas.cxx

@couet couet self-assigned this Jul 16, 2026
@couet
couet requested a review from linev as a code owner July 16, 2026 09:16
@github-actions

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 16h 42m 57s ⏱️
 3 870 tests  3 870 ✅ 0 💤 0 ❌
79 655 runs  79 655 ✅ 0 💤 0 ❌

Results for commit dc27900.

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