Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Fatal Error: Top level std::exception handler called. Caught exception: Use askUserMessage

Experimenter
Experimenter

Hi,

 

I am getting "Fatal Error: Top level std::exception handler called. Caught  exception: Use askUserMessage" during the 3rd iteration of QRY_execute fucntion call in my ITK routine.Any advise please?

 

P.S. I am resetting all the variables after each iternation. My routine looks like below

 

error = QRY_execute(tItemQry, 1, entries, values, &iNumQueryResults, &tQryResults);

 

/*Another Set of Codes....*/

 

tQryResults = NULL;

itemID = NULL;

tItemQry = NULLTAG;

MEM_free(values[0]);

MEM_free(values);

MEM_free(tQryResults);

 

 

Thanks,

Aditya

2 REPLIES 2

QRY_execute - ITK call results in Fatal Error

Experimenter
Experimenter

Quick Update:

 

The code segment works fine and does the job in "Debug" mode (F5 Key press) in Visual Studio and fails in the "Release" mode (Ctrl + F5); I read through some contents in the internet where it was mentioned it may be related to memory management and initialization. I am initializing and freeing up memory after each iteration but yet to figure out what the problem is!

 

I tried with

	try
	{
		error = QRY_execute(tItemQry, 1, &entries, &itemID, &iNumQueryResults, tItemTag);
	}
	catch (std::exception& e)
	{
		printf("Error = %s",e.what());
	}

 

 

And the exception handler prints Error = Use askUserMessage ( ) or askSyslogMessage ( )

 

Cheers,

Adi

Re: QRY_execute - ITK call results in Fatal Error

Experimenter
Experimenter

Update :

 

The error is associated with memory management of arrays and char pointers, so I got rid of all arrays I was using to hold my results and used vectors with struct instead, now everything works fine.

 

Cheers,

Adi