How to best install Root on Windows XP?

Hello,

Last month I installed Root VC++ 7.1 “Release” on my Windows XP laptop via the MSI file. It has been great to have on the laptop as I am learning more about Root, particularly the memory allocation/control.

A question I have is this: I was surprised to see that Visual Studio (also installed on the laptop) prompted me to start up the Visual Studio debugger when I was using only Root. Is this expected in the “Release” version of Root? Also, some of my (self-inflicted) memory errors were of the “corrupted heap” variety, and seemed to start appearing at the same time that my laptop began to slow down a lot.

The end result was that I had to do a “system restore” on my laptop. This has fixed the slowness but now I am without Root. I would like to reinstall it but want to make sure I do it right. Is it possible to install it without any crosstalk from the Visual Studio debugger? Also, are my memory errors in Root persisting after I quit the Root session?

Thanks for any advice.

Regards,
Penny

Hi.

This is very general description. What does it mean “using only Root”? Do you start ROOT, it crushes and debugger starts? Or do you start ROOT and debugger starts instead of ROOT (or with ROOT)?
Or do you execute your code? If yes - you have to show minimal code sample, reproducing the problem.

I’m the newbie telepath so from your very general description I can deduce this has nothing to do with ROOT.

This sounds really strange and wild - did you try to reboot your machine first, instead of restoring???
What’s your super-hacking code doing, that you have to reinstall OS???

8-[

By “using only Root” I mean that I start a Root session from a command prompt, run my code 2-3+ times, eventually crash it with a memory error (presumably by not deleting a Canvas or Histogram after creating it), and then after it crashes I am asked by the Visual Studio debugger whether I would like to use it to debug.

And yes, I tried rebooting before implementing the ‘System Restore’.
Feb24-12-57-28_16bit.root (351 KB)
readrootfile.C (9.62 KB)

[quote=“slocum”]8-[

eventually crash it with a memory error (presumably by not deleting a Canvas or Histogram after creating it),

[/quote]

Non-deleting canvas can not crash ROOT. I’ll have a look at your code.

VIVE L’AMOUR!
see the “fixed” source code in the attached file. :-({|=
Your main problem, resulting in segmentation violations, was an improper use of the “strcat” function. Secondary problems were: an improper argument to “b_voltages->SetAddress”, the usage of the “T” pointer in several functions without initialization and finally not closing the root input file, referenced by the “f” pointer, between consecutive calls to “run”. You also create memory leaks replacing existing histograms, I believe, but I didn’t “fix” it in the attached source code - I don’t want to steal all the fun from you. :mrgreen:
A pitiful case, am I not?
Pepe Le Pew.
readrootfile.C (10 KB)

Well, I’ve decided to have some fun by myself. :mrgreen:
readrootfile.C (10.8 KB)

Thank you very much! I will run this when I get back to my office on Monday. It will be great to have a good starting point as I keep learning Root. And I will have lots of fun fixing all of the rest of the memory leaks.
Best regards,
Penny

[quote=“Pepe Le Pew”]VIVE L’AMOUR!
see the “fixed” source code in the attached file. :-({|=
Your main problem, resulting in segmentation violations, was an improper use of the “strcat” function. Secondary problems were: an improper argument to “b_voltages->SetAddress”, the usage of the “T” pointer in several functions without initialization and finally not closing the root input file, referenced by the “f” pointer, between consecutive calls to “run”. You also create memory leaks replacing existing histograms, I believe, but I didn’t “fix” it in the attached source code - I don’t want to steal all the fun from you. :mrgreen:
A pitiful case, am I not?
Pepe Le Pew.[/quote]

Maybe the other memory leaks are fixed? In any case, thanks again! :smiley:

Hi Pepe,
This looks GREAT! Thank you very much. This (corrected) piece of code really answers a lot of questions I have had about how to handle Root more smoothly. I am going to use it and also refer back to it as I write more code.
Thanks!
Penny

You’d better become familiar with:
http://root.cern.ch/drupal/content/tutorials-and-courses
http://root.cern.ch/root/html/tutorials/
http://root.cern.ch/drupal/content/howtos
http://root.cern.ch/drupal/content/users-guide
http://root.cern.ch/drupal/content/reference-guide