emilk / loguru

A lightweight C++ logging library
The Unlicense
1.77k stars 256 forks source link

Sanity check error #186

Open Peter2121 opened 2 years ago

Peter2121 commented 2 years ago

Hi, I'm trying to initialize loguru using init with '-v WARNING', but it is not agree with it. I get the following error on initialization: loguru.cpp:586 FATL| CHECK FAILED: argv[argc] == nullptr (N/A == N/A) Expected proper argc/argv The variables received by init are as follows: image If I comment this check out - everything works as expected. Anyway, I think you should not check argv[argc] but argv[argc-1] here, but it still fails if I change the line like this. Probably, something goes wrong in your macros...

virtuosonic commented 4 months ago

Quoting cppreference

argv - Pointer to the first element of an array of argc + 1 pointers, of which the last one is null and the previous ones, if any, point to null-terminated multibyte strings that represent the arguments passed to the program from the execution environment.

What is the code that gives you this error? I had this same warning using an old version of wxwidgets and it was a bug in that library, it got fixed later.