Root and Microsoft VC++ Runtime Error on Vista

[color=red]//Please go to the last post[/color]

Hi everybody,
I would like to know if someone know this problem.
I had just finished my application using VC++ compiler and Root libs, in my XP pc it works fine, but on Vista it gives me this error:

[quote]Microsoft Visual C++ Runtime Library Error
Runtime Error!
Program: D:\root\bin\DrawEngine.exe //It’s my second app

This application has requested the Runtime to terminate in an unusual way.
Please contact the application’s support team for more information.[/quote]

Please let me know.


maybe you’re using a debug build of your program but release build of ROOT? Or you are not forcefully including w32pragma.h so you pick up an incompatible STL? Those would be my first two guesses. If it’s none of those we’ll need a bit more info: build log of your program, which root version you use, where you downlaoded (link) it or how you built it etc, which MSVC version you use, whether you installed the runtime on the vista machine - so many questions :slight_smile:

Cheers, Axel.

Please DO NOT POST this type of message in this thread reserved for announcement of User ROOT Applications. Use Root Support instead.


Hi Axel, thanks for your disponibility,
So, more information:

  • My root’s version is 5.21/05 trunk@26220, Nov 16 2008, 16:30, it’s from SVN trunk and compiled using Cygwin and VC++ compiler [Visual Studio 2008] (as explained from root’s homepage). It was configure as:
  • In my VC++ application I included w32pragma.h and I’m compiling in the Release mode -> I’m compiling with the /clr option.

  • I’m using the ACLiC from Cint to generate a lib, because this application creates a root’s window with many graphs.

  • In attachment you have my built log.

  • For the deployment of the application I created I folder that have the following structure:

MyApp |-bin - all root's dll + MyApplication + msvcp90.dll + msvcm90.dll + msvcr90.dll + Microsoft.VC90.CRT.manifest |-icons - all root's icons |-fonts - all root's fonts |-etc - all default elements |-libs - Contains only the *.rootmap files

I would like to highlight that it works perfectly in all XP pc’s (I tried with 3pc’s and it works :slight_smile:) but in my vista not :frowning:!
This Vista doesn’t have: root installed; VC++. The only thing that it has it the VC++ 2005 redistributable runtime.
I tried also to install the VC++ 2008 redistributable runtime, but nothing this error persists.
Thank you very much for help.

Hi Rene, sorry you are right.

Hi Axel,
you can download the application (with installer) from this link:
If you have a Vista pc could you please test it?
Thank you very much for all your help.

I think that I found the problem, but I cannot solve it: I export my root’s version to the Vista Pc (without VC++ compiler), and I tried to run the tutorials\eve\arrow_standalone.C (my application is based on this example, it’s exactly the same thing, a little bit more complex), and it brokes when it arrives at the creation of the line:

TGLEmbeddedViewer* ev = new TGLEmbeddedViewer(evf);

I tried with my macro (that I compile with VC++) and root breaks in the same line :slight_smile:!
So in attachment there is the error and the arrow_standalone.C
Thank you for any help, and please help me!
PS: After many tests I found that any other macro that uses for exemple TEmbeddedCanvas, etc… works fine in Vista, except the TGLEmbeddedViewer.

So I install root 5.21/06 .msi package on my Vista, but the error persists, I cannot run the C:\root\tutorials\eve[b]arrow_standalone.C[/b]. Cint shows me the following error (in attachment). The bug lives in TGLContext.cxx at line 144.

if (shareList && !wglShareLists(shareList->fPimpl->fGLContext, glContext)) { wglDeleteContext(glContext); Error("TGLContext::SetContext", "Context sharing failed!"); throw std::runtime_error("Context sharing failed"); }
Please someone can fix it?
Thank you very much for any kind of help.

I don’t see the problem on my Vista box… Maybe it’s a problem related to your video card/driver… what kind of hardware do you have?

– Bertrand.

Hi Bertrand,
Thank you very much for your reply:
My video card if: Modible Intel® 965 Express Chipset Family.
My Pc is the Toshiba Satellite U400 - 137, Intel Centrino (CPU Duo Core).
So if the problem is my pc, could you please test my application in your vista (if you have time), download it from:
And run Draw Results.
Thank you very much for all help,

How long is it supposed to take? It seems to stay at 10% forever…
– Bertrand.

Hi Bertrand,
Thanks for test it.
Remove the options: Dipolar, Quadripolar Coeff. Check only Draw Results.
And install it using administratives priv. because the Vista UAC doesn’t like backgroundworkers and fstreams :slight_smile:.
In my pc and others 7 (Xp’s), it takes 3min for all calculations (20000000 operations), but the progress bar doesn’t stop at 10%, it increments 1%/second.
So please try again.

Same result: it stays at 10% forever…
Edited: Anyway, I’ll try to make more test and I’ll let you know as soon as I can.
Cheers, Bertrand.