Re: Strange Cint error

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Fri, 18 Mar 2011 11:20:09 +0100


Hi Tom,

can you send us the file HistoRoot.C, or even better reduce it to a minimal version that reproduces the issue?

This:
Error: strrchr param[0]=0 must not be 0
is an error issues by CINT when interpreting code, i.e. it should be connected to your code.

Cheers, Axel.

On 3/11/11 6:54 PM, Tom Roberts wrote:
> I am trying to get a large macro to work (>2000 lines of C++) in both
> compiled and macro modes (~100X speed up when compiled). Until yesterday
> it was macro only; to get it to compile I had to add lots of #include-s,
> re-arrange the order of some class definitions, and clean up a few minor
> things, but no logic changes.
>
> It works fine when compiled:
>
> root -l HistoRoot.C+
>
> But fails as a macro:
>
> root -l HistoRoot.C
> Error: strrchr param[0]=0 must not be 0
>
> I traced the error message to this code - fails if STUB is defined
> (filename is a const char * argument of the enclosing function; this is
> the only use of strrchr in the file):
>
> //#define STUB
> #ifdef STUB
> const char *name = strrchr(filename,'/');
> #else //STUB
> const char *name=0;
> name = strrchr(filename,'/');
> #endif //STUB
>
>
> In compile (+) mode it opens its GUI window correctly, and the entire
> macro works properly. In macro mode, it does not open the GUI window,
> and calling the HistoRoot() function manually does nothing (no error).
>
>
> Any suggestions?
>
> Tom Roberts
>
>
Received on Fri Mar 18 2011 - 11:20:12 CET

This archive was generated by hypermail 2.2.0 : Fri Mar 18 2011 - 17:50:01 CET