root icon indicating copy to clipboard operation
root copied to clipboard

[core] proper check whether class is a TRef or TRefArray

Open ferdymercury opened this issue 1 year ago • 86 comments

This Pull request:

Changes or fixes:

Fixes https://its.cern.ch/jira/projects/ROOT/issues/ROOT-7052 reported by @olifre

Checklist:

  • [ ] tested changes locally
  • [ ] updated the docs (if necessary)

ferdymercury avatar Mar 11 '24 09:03 ferdymercury

Build failed on ROOT-ubuntu2204/nortcxxmod. Running on root-ubuntu-2204-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.

Errors:

  • [2024-03-11T11:55:18.742Z] /home/sftnight/build/workspace/root-pullrequests-build/root/core/meta/src/TStreamerElement.cxx:311:135: error: ‘Class’ is not a member of ‘TVirtualRefProxy’

phsft-bot avatar Mar 11 '24 12:03 phsft-bot

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default How to customize builds

phsft-bot avatar Mar 11 '24 12:03 phsft-bot

Test Results

    11 files      11 suites   2d 0h 45m 13s :stopwatch:  2 586 tests  2 534 :white_check_mark: 0 :zzz:  52 :x: 26 592 runs  26 104 :white_check_mark: 0 :zzz: 488 :x:

For more details on these failures, see this check.

Results for commit d0ec62d2.

github-actions[bot] avatar Mar 11 '24 13:03 github-actions[bot]

I can't figure out which is the class giving the problems in the tests. Candidates could be:

TRefTable
TRefCnt
TRefArrayProxy

or that somehow the type pointer is not correct.

I'll try now with TRefArrayProxy

ferdymercury avatar Mar 11 '24 17:03 ferdymercury

Test Results

    1 files      1 suites   2h 37m 53s :stopwatch: 2 481 tests 2 432 :white_check_mark: 0 :zzz: 49 :x: 2 483 runs  2 434 :white_check_mark: 0 :zzz: 49 :x:

For more details on these failures, see this check.

Results for commit 1caa3e95.

github-actions[bot] avatar Mar 11 '24 17:03 github-actions[bot]

I'll try now with TRefArrayProxy

No luck.

ferdymercury avatar Mar 11 '24 18:03 ferdymercury

No luck.

Are you able to reproduce the failure locally? If not, you can use something like:

   //check if element is a TRef or TRefArray
   const bool originalTest = (strncmp(fTypeName.Data(),"TRef",4) != 0);
   TClass* const type = GetClassPointer();
   const bool newTest = (!type || !(type->InheritsFrom(TRef::Class()) || type->InheritsFrom(TRefArray::Class()) || type->InheritsFrom("TVirtualRefProxy"))
   if (originalTest != newTest)
		Fatal("GetExecID", "Problem with type %s original test %d, new test %d\n", 
                  fTypeName.Data(), originalTest, newTest);
   if (originalTest) return 0;

pcanal avatar Mar 11 '24 19:03 pcanal

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default How to customize builds

phsft-bot avatar Mar 11 '24 21:03 phsft-bot

Build failed on ROOT-ubuntu2004/python3. Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.

Errors:

  • [2024-03-11T21:11:51.784Z] FAILED: core/CMakeFiles/Core.dir/meta/src/TStreamerElement.cxx.o
  • [2024-03-11T21:11:52.040Z] /home/sftnight/build/workspace/root-pullrequests-build/root/core/meta/src/TStreamerElement.cxx:312:155: error: expected ‘)’ before ‘if’

Warnings:

  • [2024-03-11T21:11:52.040Z] /home/sftnight/build/workspace/root-pullrequests-build/root/core/meta/src/TStreamerElement.cxx:312:15: warning: unused variable ‘newTest’ [-Wunused-variable]

phsft-bot avatar Mar 11 '24 21:03 phsft-bot

Build failed on ROOT-ubuntu2204/nortcxxmod. Running on root-ubuntu-2204-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.

Errors:

  • [2024-03-11T21:10:37.438Z] /home/sftnight/build/workspace/root-pullrequests-build/root/core/meta/src/TStreamerElement.cxx:312:155: error: expected ‘)’ before ‘if’

Warnings:

  • [2024-03-11T21:10:37.438Z] /home/sftnight/build/workspace/root-pullrequests-build/root/core/meta/src/TStreamerElement.cxx:312:15: warning: unused variable ‘newTest’ [-Wunused-variable]

phsft-bot avatar Mar 11 '24 21:03 phsft-bot

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default How to customize builds

phsft-bot avatar Mar 11 '24 21:03 phsft-bot

Build failed on ROOT-ubuntu2004/python3. Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.

Errors:

  • [2024-03-11T21:23:29.006Z] FAILED: core/CMakeFiles/Core.dir/meta/src/TStreamerElement.cxx.o
  • [2024-03-11T21:23:29.276Z] /home/sftnight/build/workspace/root-pullrequests-build/root/core/meta/src/TStreamerElement.cxx:313:4: error: expected ‘,’ or ‘;’ before ‘if’

Warnings:

  • [2024-03-11T21:23:29.276Z] /home/sftnight/build/workspace/root-pullrequests-build/root/core/meta/src/TStreamerElement.cxx:312:15: warning: unused variable ‘newTest’ [-Wunused-variable]

phsft-bot avatar Mar 11 '24 21:03 phsft-bot

Build failed on ROOT-ubuntu2204/nortcxxmod. Running on root-ubuntu-2204-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.

Errors:

  • [2024-03-11T21:22:49.737Z] /home/sftnight/build/workspace/root-pullrequests-build/root/core/meta/src/TStreamerElement.cxx:313:4: error: expected ‘,’ or ‘;’ before ‘if’

Warnings:

  • [2024-03-11T21:22:49.737Z] /home/sftnight/build/workspace/root-pullrequests-build/root/core/meta/src/TStreamerElement.cxx:312:15: warning: unused variable ‘newTest’ [-Wunused-variable]

phsft-bot avatar Mar 11 '24 21:03 phsft-bot

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default How to customize builds

phsft-bot avatar Mar 11 '24 21:03 phsft-bot

Test Results

     5 files       5 suites   9h 35m 16s :stopwatch:  2 541 tests  2 126 :white_check_mark: 0 :zzz:   415 :x: 12 408 runs  10 424 :white_check_mark: 0 :zzz: 1 984 :x:

For more details on these failures, see this check.

Results for commit dacdc81b.

github-actions[bot] avatar Mar 11 '24 21:03 github-actions[bot]

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default How to customize builds

phsft-bot avatar Mar 11 '24 22:03 phsft-bot