[afterimage] prevent nullptr access#21860
Conversation
Fixes crash reported in https://root-forum.cern.ch/t/timage-drawcircle-cause-core-dump/64784 But not sure if this is the right spot to initialize the canvas or if it should error earlier
|
It fix symptoms, but not solve real problem. Box appears - circle not. |
|
Probably you already find a solution. Can you implement this? |
FillRectangle check is already in FillRectangleInternal
|
I guess it should be cleaner now. If you're ok with changes, just a gentle reminder to click on "squash on merge". Btw any idea what could be the reason of this failure? https://github.com/root-project/root/actions/runs/24142770826/job/70448687673?pr=21820 |
as suggested by linev Co-authored-by: ferdymercury <ferdymercury@users.noreply.github.com>
There is clear failure in the libAfterImage. |
(Mmm that test was not running before, so I am not really changing...) |
So then you hit some real problem there - and it need to be investigated. |
|
even smaller reproducer of the issue: |
Test Results 22 files 22 suites 3d 6h 49m 55s ⏱️ Results for commit 6e796ec. |
linev
left a comment
There was a problem hiding this comment.
Thanks for implementing the fix!
|
/backport to 6.38, 6.36 |
|
Can you try backport fix to 6.36 and 6.38 branches, automatic bot failed |
Fixes crash reported in https://root-forum.cern.ch/t/timage-drawcircle-cause-core-dump/64784 Provide InitImage method which initialize image for painting Use it in all relevant places. Co-authored-by: ferdymercury <ferdymercury@users.noreply.github.com>
Fixes crash reported in https://root-forum.cern.ch/t/timage-drawcircle-cause-core-dump/64784 Provide InitImage method which initialize image for painting Use it in all relevant places. Co-authored-by: ferdymercury <ferdymercury@users.noreply.github.com>
Fixes crash reported in https://root-forum.cern.ch/t/timage-drawcircle-cause-core-dump/64784 Provide InitImage method which initialize image for painting Use it in all relevant places. Co-authored-by: ferdymercury <ferdymercury@users.noreply.github.com>
I can reproduce locally. You can check it yourself via running Happens also with 6.36 Works fine in interactive mode. |
|
This test involves
Can you evaluate which will be the better one. |
Fixes crash reported in https://root-forum.cern.ch/t/timage-drawcircle-cause-core-dump/64784 Provide InitImage method which initialize image for painting Use it in all relevant places. Co-authored-by: ferdymercury <ferdymercury@users.noreply.github.com>
This Pull request:
Fixes #21880
Fixes crash reported in https://root-forum.cern.ch/t/timage-drawcircle-cause-core-dump/64784
But not sure if this is the right spot to initialize the canvas or if it should error earlier
It crashes also on 6.36 so seems unrelated to recent changes in build system.
Changes or fixes:
Checklist: