TreeView SaveSource

Can someone tell me what I am doing wrong. I created a simple tree and opened it in the TreeViewer via

[code]{
TTree *T = new TTree(“ntuple”,“data from ascii file”);

T->ReadFile("Date_Time_Speed.txt");

T->Draw("tD:tT*24","data/data","surf");

T->StartViewer();

};[/code]

In the browser If I select File->SaveSource I get

[quote]==========================================
=============== STACKTRACE ===============

================ Thread 0 ================
libTreeViewer!TTreeViewer::SaveSource()

================ Thread 1 ================
ntdll!KiFastSystemCallRet()
kernel32!InvalidateConsoleDIBits()
kernel32!ReadConsoleInputA()
libCore!pause_()
libCore!`anonymous namespace’::HandleConsoleThread()
0xffffffffe87c8024 ??

================ Thread 2 ================
ntdll!KiFastSystemCallRet()
libWin32gdk!TGWin32RefreshTimer::~TGWin32RefreshTimer()

==========================================
============= END STACKTRACE =============
==========================================[/quote]

I am on Windows XP, using v 5.13/04.

Thanks,
Sanjeev

Hi Sanjeev,

I see no problem running some macros from $ROOTSYS/tutorials and using File->SaveSource from the TreeViewer on Windows XP. For reproducing exactly your case the file Date_Time_Speed.txt might be needed.

Cheers, Ilka

Hi Ilka,

Here are the 2 files I used. Hope you can reproduce the problem with them.

Regards,
Sanjeev
plot.C (189 Bytes)
Date_Time_Speed.txt (4.67 KB)

Hi Sanjeev,

Thank you for provided files - I can reproduce your case. Very likely the reason comes from the fact that TTreeViewer::SaveSource is expecting a TFile, which does not exist in your case. I saved your tree in a root file and closed the TreeViewer (opened by your macro). Then I opened the TBrowser and re-opened the TreeViewer via the TBrowser context menu. Everything worked fine in that case and File->SaveSource did not crash. I will investigate further tomorrow.

Cheers, Ilka

Hi Sanjeev,

A fix in TTreeViewer is uploaded in cvs head and TTreeViewer::SaveSource works fine with your example. Thank you for reporting that case.

Cheers, Ilka

Hi Ilka,

Thank you for responding so fast to this issue!

Regards,
Sanjeev