[gui] reenable fit panel testing and fix nullptr access#21882
[gui] reenable fit panel testing and fix nullptr access#21882ferdymercury wants to merge 4 commits intoroot-project:masterfrom
Conversation
Test Results 22 files 22 suites 3d 9h 8m 4s ⏱️ For more details on these failures, see this check. Results for commit 6baefa7. ♻️ This comment has been updated with latest results. |
| if (values) { | ||
| fValues = *values; | ||
| fContext = gVirtualX->CreateGC(gVirtualX->GetDefaultRootWindow(), values); | ||
| if (gVirtualX) |
There was a problem hiding this comment.
Checking of gVirtualX does not make big sense - it always present, also in batch mode
There was a problem hiding this comment.
It was null when i checked with the debugger. Note that TVirtualX::Instance can still return nullptr when on batch
There was a problem hiding this comment.
|
I checkout your branch and try to run test.
|
Yes, same here, I had deactivated (commented) locally those old tests for the moment and was focusing on whether it was running at all without crashing.
Weird, where? I see a different behavior on Linux. It just crashes when deleting the TGTooltip at shutdown for me.
Same here, that's what I would say "expected", a lot of errors in batch mode of not being able to load icons, but no crashes. |
I mean when I run compiled executable.
This is most challenging part - try to understand if there double deletion or just wrong pointer released. |
|
I probably found the reason why it crashes. Also side problem is that in Fixing this two problems makes test running for me |
|
First step is #21907 @ferdymercury After such two steps we will be able to enable this and may be other GUI tests in CI |
| if (gVirtualX) | ||
| gVirtualX->ChangeWindowAttributes(fId, &wattr); |
There was a problem hiding this comment.
Probably these changes are no longer needed since I was trying out different things and you already found the culprit in TGGC
|
After #21907 is merged you can try rebase your code and see if now fit panel test can be enabled. |
|
Please remove all changes in gui classes from this PR. And at the end of UnitTesting.cxx one should have: And please check |
as suggested by linev, from root-project#21891
| result += MakeTest("TestTree1D.........", &FitEditorUnitTesting::TestTree1D); | ||
|
|
||
| result += MakeTest("TestTree2D.........", &FitEditorUnitTesting::TestTree2D); | ||
| // result += MakeTest("TestTree2D.........", &FitEditorUnitTesting::TestTree2D); |
There was a problem hiding this comment.
Remove commented-out lines
There was a problem hiding this comment.
I was thinking of coming back / reenabling these failing tests once we get the current test up and running on all platforms.
(It just needs the definition of a missing function or functor gausNd)
|
We have several platforms failing. For Windows probably we should force batch mode. One need to add But several linux and mac platforms need to be investigated deeper |
This Pull request:
Changes or fixes:
initialize to null instead
Fixes #21881
Checklist: