FillColor bug in root 6.22

Bonjour,

I experience a segmentation violation when I try to touch the FillStyle in my objects (tried with TH1D and TPaveText). The following code & procedure lead to the crash:

h = new TH1D("h", "t", 10,0 ,10)
h->Fill(1)
h->SetFillStyle(2)
h->SetFillColor(2)
h->Draw()

First, the histogram is not filled as it should (it stays hollow, the TPaveText in was black).
Enabling the Editor (or the DrawPanel) on the Histogram,
and in the “Fill” section, clicking on the second square (“Fill style”)
results in the log output at the end of this post.

Any hints ?

Best regards,
Vincent Boudry.


Please read tips for efficient and successful posting and posting code

ROOT Version: 6.22.00
Platform: OSX 11.2.1
Compiler: Conda installation


 *** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[<unknown binary>] (no debug info)
[/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics] CGPatternDrawInContextDelegate (no debug info)
[/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics] build_tile (no debug info)
[/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics] ripc_GetColor (no debug info)
[/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics] ripc_Render (no debug info)
[/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics] ripc_DrawRects (no debug info)
[/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics] CG::DisplayListExecutor::drawRects(CG::DisplayListEntryRects const*) (no debug info)
[/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics] CG::DisplayList::executeEntries(std::__1::__wrap_iter<std::__1::unique_ptr<CG::DisplayListEntry const, std::__1::default_delete<CG::DisplayListEntry const> >*>, std::__1::__wrap_iter<std::__1::unique_ptr<CG::DisplayListEntry const, std::__1::default_delete<CG::DisplayListEntry const> >*>, CGContextDelegate*, CGRenderingState*, CGGStack*, CGRect const*, __CFDictionary const*, bool) (no debug info)
[/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics] CG::DisplayList::execute(CGContextDelegate*, CGRenderingState*, CGGStack*, CGRect const*, __CFDictionary const*) (no debug info)
[/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics] CGDisplayListDrawInContextDelegate (no debug info)
[/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore] CABackingStoreUpdate_ (no debug info)
[/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore] invocation function for block in CA::Layer::display_() (no debug info)
[/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore] -[CALayer _display] (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] -[_NSBackingLayer display] (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] -[_NSViewBackingLayer display] (no debug info)
[/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore] CA::Layer::display_if_needed(CA::Transaction*) (no debug info)
[/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore] CA::Context::commit_transaction(CA::Transaction*, double, double*) (no debug info)
[/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore] CA::Transaction::commit() (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] ___NSRunLoopObserverCreateWithHandler_block_invoke (no debug info)
[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation] __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (no debug info)
[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation] __CFRunLoopDoObservers (no debug info)
[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation] __CFRunLoopRun (no debug info)
[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation] CFRunLoopRunSpecific (no debug info)
[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox] RunCurrentEventLoopInMode (no debug info)
[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox] ReceiveNextEventCommon (no debug info)
[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox] _BlockUntilNextEventMatchingListInModeWithFilter (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] _DPSNextEvent (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libCore.6.22.06.so] TMacOSXSystem::DispatchOneEvent(bool) (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libCore.6.22.06.so] TSystem::ProcessEvents() (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libGui.6.22.06.so] TGClient::WaitForUnmap(TGWindow*) (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libGed.6.22.06.so] TGedPopup::PlacePopup(int, int, unsigned int, unsigned int) (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libGed.6.22.06.so] TGedSelect::HandleButton(Event_t*) (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libGui.6.22.06.so] TGFrame::HandleEvent(Event_t*) (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libGui.6.22.06.so] TGClient::HandleEvent(Event_t*) (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libGui.6.22.06.so] TGClient::ProcessOneEvent() (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libGui.6.22.06.so] TGInputHandler::Notify() (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libCore.6.22.06.so] TMacOSXSystem::DispatchOneEvent(bool) (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libCore.6.22.06.so] TSystem::InnerLoop() (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libCore.6.22.06.so] TSystem::Run() (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libCore.6.22.06.so] TApplication::Run(bool) (no debug info)
[/Users/boudry/miniconda/envs/root6/lib/libRint.6.22.06.so] TRint::Run(bool) (no debug info)
[/Users/boudry/miniconda/envs/root6/bin/root.exe] main (no debug info)
[/usr/lib/system/libdyld.dylib] start (no debug info)

Looking at it. I see that crash to when trying to access the fill menu of the GUI… weird…

The fix was found by @tpochep (thanks Timur).
A PR has been created. It will be soon in master.

Thanks to have seen it.

The PR is now merged in master.

   TH1D *h = new TH1D("h","t",10,0,10);
   h->SetBinContent(2,1);
   h->SetFillColor(2);
   h->SetFillStyle(3005);
   h->Draw("");

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.