LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Profiler crash

Hello all,
I'm trying to use the profiler for the 1st time on a rather big application
and it crashes almost immediately, during the init sequence of the program:
"An unexpected fatal error occurred in the Execution Profiler"

The crash is random and always happen on different lines.
The program resumes running afterwards after I aknowledge the popup, but I
don't get any profiling statistics at the end.

Later on when I hit CVIProfSetCurrentThreadProfiling (0);
I get:
NON-FATAL RUN-TIME ERROR: "l:\dim_v17r5\DimGpio\DimCviClient.c", line
1375, col 5, thread id 0x00000BE4: Library function error (return value ==
-5 [0xfffffffb]). An unexpected fatal error occurred in the Execution
Profiler.


Using the profiler on a simple program works as expected.
--
Guillaume Dargaud
http://www.gdargaud.net/
0 Kudos
Message 1 of 5
(3,076 Views)
Note: the crash happens even if I call CVIProfSetCurrentThreadProfiling(0)
at the beginning of the program and never activate it afterwards.
--
Guillaume Dargaud
http://www.gdargaud.net/
0 Kudos
Message 2 of 5
(3,073 Views)

Does it crash if you do NOT call CVIProfSetCurrentThreadProfiling in your program?

 

You mentioned that the crash happens in an initialization function. Does this function execute in DllMain or in any other special context?

 

Remove or exclude all code from the project other than the initialization code and the code it calls, and see if the crash still occurs. And, if it crashes, is this code something you can post, so I can try running it?

0 Kudos
Message 3 of 5
(3,064 Views)
Mohan wrote:

> Does it crash if you do NOT call
> CVIProfSetCurrentThreadProfiling in your program?

Yup.

> You mentioned that the crash happens in an initialization function. Does
> this function execute in DllMain or in any other special context?  
> Remove or exclude all code from the project other than the initialization
> code and the code it calls, and see if the crash still occurs. And, if it
> crashes, is this code something you can post, so I can try running it?

It's the init sequence which does a lot of things (dynamic creation of user
interface, etc). I'll see if I can break it down to bare elements.
--
Guillaume Dargaud
http://www.gdargaud.net/
0 Kudos
Message 4 of 5
(3,048 Views)

I hoped that this problem would go away in CVI 2012, but no dice.

 

I just spent a few hours trying to get the profiler to run without success.

My main() calls a lot of init functions and the message "An unexpected fatal error occurred in the Execution Profiler" pops up at random if the main is long enough:

void main(void) {

InitA();

InitB();

} // Profiler works

 

If I go to InitA/B/.../Z() it always fails, If I have InitE() it sometimes fails, sometimes runs. Obviously I'm simplifying a lot.

Those init() load panels and do a lot of other stuff but I can't isolate it to a particular function.

 

Now when I get that Popup, I can [Stop] the program without having to acknowledge the popup and each time it's on a different line.

 

This is what I get in the CVIDebugLog.txt:

 

[10:28:12.406] [WARNING] [OpenSharedMemory] [..\jeff\debugger\cvidebugwin32.c:1434] Err = -1283
[10:28:14.950] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:14.966] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:14.966] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:15.000] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:15.000] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:15.017] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:15.051] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:15.051] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:15.051] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:15.253] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:15.455] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:15.522] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:15.674] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:15.741] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:16.078] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:16.129] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:16.280] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:16.280] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:19.565] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:19.633] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101
[10:28:20.340] [WARNING] [LoadResIdList] [..\james\ui_file.c:711] Err = -101

 

 

 

It's not such a critical issue because I can use Valgrind+callgrind or the old gprof, but it still would be nice to have an integrated working profiler.

0 Kudos
Message 5 of 5
(2,946 Views)