Libwin32gdk crashes on multi-core system

I am using 5.18/00 and have recently moved from a single core PC running windows XP to a dual quad core running Vista Business SP1. I have noticed that on my new machine,
pTree->Draw(“y:x>>h(300,-750,750,300,-750,750)”,"",“colz”)
produces a crash occasionally - the more bins in the 2D histogram, the higher the probability of a crash. (If I use “goff” instead of “colz” and then type h->Draw(“colz”) I do not seem to get crashes: If I debug the crashed application, I see a call stack with libWin32gdk all over it[quote]> 00000000()
gdk-1.3.dll!038e22a0()
[Frames below may be incorrect and/or missing, no symbols loaded for gdk-1.3.dll]
libWin32gdk.dll!02ab7f87()
libWin32gdk.dll!02ac8b1c()
libWin32gdk.dll!02ac3dfa()
libWin32gdk.dll!02ab1d43()
libWin32gdk.dll!02ab9f31()
libCore.dll!10085311()
kernel32.dll!76b8e3f3()
ntdll.dll!774acfed()
ntdll.dll!774ad1ff()
[/quote]Here’s my question: In the 5.20/00 release notes, there’s a comment in the “Graphical Output - TPad” section that says “On a Windows dual core machine, the WaitPrimitive call returned immediately” Was this change added address the crashes I’ve been experiencing? If so, can I easily patch the 5.18/0 sources rather than going to 5.20? If not, can you provide any hints for how I can deal with this problem? (Other, less common crashes occur that are not particually reproducible that I have not found work-arounds for) Thanks!
Ed

Hi Ed,

Well, if you don’t use WaitPrimitive(), I don’t see how it could be related…
I don’t have access to multicore machine right now, but I will try next week.
Meanwhile, could you post a running macro showing the problem?
Thanks.

Cheers, Bertrand.

I just firied up root and typed into the command line:

TFile *f= new TFile("ntuple.root"); TTree *nt = (TTree *)f->Get("nt"); gStyle->SetPalette(1) nt->Draw("y:x>>h(500,-750,750,500,-750,750)","","colz");where ntuple.root is a root file containing a TTree with branches x,y. This TTree has about 20E6 entries. It took several time to do the Draw before it crashed:
On first call a default TCanvas was created (my app has an embedded canvas)
on 4th call I got “Gdk-CRITICAL **: file gdkwindow-win32.c: line 1436: assertion window != NULL' failed" message, but no crash on the 9th call I got "Gdk-CRITICAL **: file gdkwindow-win32.c: line 987: assertionGDK_IS_WINDOW(window)’ failed” message and the program crashed. and I got the following call stack:

[quote]> gdk-1.3.dll!03b3394d()
[Frames below may be incorrect and/or missing, no symbols loaded for gdk-1.3.dll]
gdk-1.3.dll!03b339db()
ntdll.dll!774503b2()
user32.dll!76c38362()
ntdll.dll!77452ed6()
libWin32gdk.dll!02dd8aeb()
libWin32gdk.dll!02de864c()
libWin32gdk.dll!02de3dfa()
libWin32gdk.dll!02dd1d43()
libWin32gdk.dll!02dd9f31()
libCore.dll!10085311()
kernel32.dll!76b8e3f3()
ntdll.dll!774acfed()
ntdll.dll!774ad1ff()
[/quote]

Hi Ed,

I cannot reproduce the problem (using a ntuple with 25e+06 entries):

root [0] TFile *f1 = new TFile("hsimple.root", "READ"); root [1] TNtuple *ntuple = (TNtuple*)f1->Get("ntuple"); root [2] gStyle->SetPalette(1); root [3] ntuple->Draw("px:py","", "colz"); <TCanvas::MakeDefCanvas>: created default TCanvas with name c1 root [4] ntuple->Draw("py:px","", "colz"); root [5] ntuple->Draw("px:py","", "colz"); root [6] ntuple->Draw("3*px+2","px**2+py**2>1"); root [7] ntuple->Draw("1.3*px+2","(px^2+py^2>4) && py>0"); root [8] ntuple->Draw("2*px+2","pz>2"); root [9] ntuple->Draw("py:px","", "colz"); root [10] ntuple->Draw("px:py","", "colz"); root [11] ntuple->Draw("1.3*px+2","(px^2+py^2>4) && py>0"); root [12] ntuple->Draw("2*px+2","pz>2"); root [13] ntuple->Draw("3*px+2","px**2+py**2>1"); root [14] ntuple->Draw("3*px+2","px**2+py**2>1"); root [15] ntuple->Draw("3*px+2","px**2+py**2>1"); root [16] ntuple->Draw("3*px+2","px**2+py**2>1"); root [17] ntuple->Draw("3*px+2","px**2+py**2>1"); root [18] ntuple->Draw("3*px+2","px**2+py**2>1"); root [19] ntuple->Draw("3*px+2","px**2+py**2>1"); root [20]
Maybe the problem comes from somewhere else in your code…
(BTW, I can only test on hyperthreaded machine…)

Cheers, Bertrand.

Bertrand,
The default 2D histogram size, I believe is 40x40. The problem I have is when drawn into much larger 2D histogram, e.g. 400x400. Please try

ntuple->Draw(“py:px>>h2(400,,,400,,)”,"", “colz”);

where and are appropriate for your ntuple. Thanks!

Ed

Hi Ed,

I tried up to 600x600 without problem…
It sounds like a memory problem… did you try to catch the error in the debugger?

Cheers,
Bertrand.

Hi Bertrand,
Yes, yes, but beyond the stack trace above, and the “GDK-Critical” messages, I don’t know what else I can look at. Is hyperthreading enabled on your machine? It it possible that its a multi-core issue? Also, as stated in my Post from Aug 15 at 13:03, there is no user code involved - just running root.exe w/out loading any additional modules. If you can suggest more debug tests, I will be happy do them and report… Thanks!
Ed

Ed,
I will try to make more deep tests and I’ll let you know.
I only have a hyperthreaded machine and obviously HT is on…
Best, Bertrand.