CustomReAlloc2 and Runtime error!

Hi Rooters,
This problem had been solved mostly by not linking libNew.lib while building the solution. I went through the previous discussions and tried a lot, but could not get through it. May be I am missing something.
We take data in labview and I am trying to run a code which converts this raw data into a format readable by ROOT. I am attaching the labview2root.cpp program (a part of the whole lot) which does it. It’s a part of a C++ project which generates an executable labview2root.exe at the end of building. Initially I was getting linking error messages which I got rid of by making some changes in project linker inputs as mentioned in
( … l#rootlibs).
I am using Microsoft Visual Studio 2005 and ROOT version 5.18/00. My settings in VC++ Directories in Tools/Options are (ROOTSYS)\bin, (ROOTSYS)\include and (ROOTSYS)\lib. In addition to that, labview2root project property pages have Additional Dependencies - (ROOTSYS)\lib*.lib and Ignore specific library - $(ROOTSYS)\libNew.lib.
With these settings, I was able to build the project and generate labview2root.exe in labview2root/Debug. I ran the consecutive data files and defined a *.root file to write the histograms in it. But at the end of it I faced the following error. The program was made to run in ROOT 5.10 from whom I inherited, so I am not sure if this is a version problem. I made the necessary changes to define the execution and data path. But whenever I am running the batch script from the command prompt, I am getting Runtime errors after the execution! This is the script in the DOS prompt after running test.bat :-

Please give me a proper .root Filename
read good

If you want to change the Parameters Enter:
If you want to run a file Enter Filename or press q to exit

Working on File: O:\labview2root\AR_07_11_06_0000

Time: 3.729s
Nbr Events: 277401 (74.3902kHz)
Nbr of total Events: 277401

If you want to change the Parameters Enter:
If you want to run a file Enter Filename or press q to exit

Ok, this was the last file…

Writing Histos to File: O:\labview2root\test_NEW_HISTOS.root

: passed oldsize 64, should be 665712583
Fatal in : unreasonable size (665712583)

=============== STACKTRACE ===============

================ Thread 0 ================

============= END STACKTRACE =============

After this a MS VC++ Runtime library window opens and states:-

Runtime Error!
This application has requested the runtime to
terminate it in an unusual way.

I do not know what is this error for? Please help me.

Thanks in advance,
MyLabview2root.cpp (3.76 KB)

According to the recipe given in:- … Debug.html

I did not try “To add the building of the ROOT dictionary to the project”. I don’t know if that is causing this problem?

Could you post the essential files

From the message, it looks like you are still linking with libNew. Could you remove this library and try again?


Thanks Rene for your advice.
I removed libNew.lib from C:\root\lib and everything works. I found out that although I was ignoring this specific library from labview2root project property pages, it still got linked.
I would like to know why this problem arises? What problems can I face later due to removal of this library file.



removing the library is the proper thing to do; it’s not meant to be used on Windows. We will probably not build it on Windows anymore. There are no side effects for your application.

Cheers, Axel.