Click here to Skip to main content
15,903,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: lzma on GPU Pin
crotaphiticus8-May-11 12:33
crotaphiticus8-May-11 12:33 
Questionabout multi linked list Pin
quartaela7-May-11 9:44
quartaela7-May-11 9:44 
AnswerRe: about multi linked list Pin
Luc Pattyn7-May-11 10:26
sitebuilderLuc Pattyn7-May-11 10:26 
GeneralRe: about multi linked list Pin
quartaela7-May-11 11:09
quartaela7-May-11 11:09 
GeneralRe: about multi linked list Pin
barneyman7-May-11 15:53
barneyman7-May-11 15:53 
GeneralRe: about multi linked list Pin
quartaela8-May-11 3:41
quartaela8-May-11 3:41 
GeneralRe: about multi linked list Pin
barneyman8-May-11 3:51
barneyman8-May-11 3:51 
QuestionMSVCR100.dll error, debugger_hook_dummy = 0 Pin
mikael.peterson6-May-11 22:59
mikael.peterson6-May-11 22:59 
Hi
I'm experiencing problem with a program written in Visual c++ 2010 which I have a hard time to get my head around, hence the vague title.

My current setup consist of three computers: one laptop with 32 bit windows 7 that I use to execute programs on two stationary acquisition computers (let call them computer1 and computer2) with 64 bits Windows 7 SP1. They are connected via to each other via a router but not to the internet.

The software I'm developing is used to collect images from a number of ccd-cameras and processing them before saving them to disk (locally on the acquisition computers). Up to this Thursday the setup worked fine and I was able to initiate an acquisition on computer 1 and 2 (actually I've been using a setup with only the laptop and computer1 for a while without a problem and I recently added computer 2 to the setup and it worked well during some initial tests).

But suddenly the programs didn't work when starting them from remote. When I tried to execute the programs locally on computer 1 and 2 I got a fatal error with the following problem details:

Problem signature:
Problem Event Name: BEX64
Application Name: InSPECTAcq.exe
Application Version: 0.0.0.0
Application Timestamp: 4d3835c6
Fault Module Name: MSVCR100.dll
Fault Module Version: 10.0.30319.1
Fault Module Timestamp: 4ba220dc
Exception Offset: 000000000007038c
Exception Code: c0000417
Exception Data: 0000000000000000
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1053
Additional Information 1: f503
Additional Information 2: f50339e4695bb8971ce0650d6fc2205f
Additional Information 3: 1b95
Additional Information 4: 1b9522b9b1d4e5399b7b8e17148306fd

So I decided to recompile it to see if I could make some sense of it all. When I debug I get an debug assertation failure and I pointed towards line 65 in dgbhook.c.

void __cdecl _CRT_DEBUGGER_HOOK(int _Reserved)
	{
    		/* assign 0 to _debugger_hook_dummy so that the function is not folded in retail */
    		(_Reserved);
    		_debugger_hook_dummy = 0;
	}


In the call stack looks like follows

InSPECT_Labview_2.exe!__crt_debugger_hook(int _Reserved) Line 65 C
InSPECT_Labview_2.exe!_call_reportfault(int nDbgHookCode, unsigned long dwExceptionCode, unsigned long dwExceptionFlags) Line 170 C++
InSPECT_Labview_2.exe!_invoke_watson(const wchar_t * pszExpression, const wchar_t * pszFunction, const wchar_t * pszFile, unsigned int nLine, unsigned __int64 pReserved) Line 156 C++
InSPECT_Labview_2.exe!_invalid_parameter(const wchar_t * pszExpression, const wchar_t * pszFunction, const wchar_t * pszFile, unsigned int nLine, unsigned __int64 pReserved) Line 110 + 0xf bytes C++
InSPECT_Labview_2.exe!_invalid_parameter_noinfo() Line 122 C++
> InSPECT_Labview_2.exe!fwrite(const void * buffer, unsigned __int64 size, unsigned __int64 count, _iobuf * stream) Line 77 + 0x1c bytes C
InSPECT_Labview_2.exe!doCentriodCalc(AcqParameters * acqPara, int iCurrentCam) Line 488 C++
InSPECT_Labview_2.exe!grabFrame(FlyCaptureVideoMode * VIDEOMODE, FlyCaptureFrameRate * FRAMERATE, AcqParameters * acqPara) Line 176 + 0xb bytes C++
InSPECT_Labview_2.exe!main(int argc, char * * argv) Line 78 C++
InSPECT_Labview_2.exe!__tmainCRTStartup() Line 278 + 0x12 bytes C
kernel32.dll!0000000076c1652d()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
ntdll.dll!0000000076d4c521()

It seems like the debugger has some problem with the fwrite function on line 488. It is part of a series of fwrite function that look like this.

//Output Cluster to File
		fwrite(&current_frame, sizeof(signed int), 1, cluster_file[iCurrentCam]);
		fwrite(&cluster_dim, sizeof(signed int), 1, cluster_file[iCurrentCam]); 
		fwrite(&cluster_row_start, sizeof(signed int), 1, cluster_file[iCurrentCam]);
		fwrite(&cluster_col_start, sizeof(signed int), 1, cluster_file[iCurrentCam]);

		//Output Median Filtered Clusters to File
		fwrite(&current_frame, sizeof(signed int), 1, median_cluster_file[iCurrentCam]);
Line 488	fwrite(&cluster_dim, sizeof(signed int), 1, median_cluster_file[iCurrentCam]); 
		fwrite(&cluster_row_start, sizeof(signed int), 1, median_cluster_file[iCurrentCam]);
		fwrite(&cluster_col_start, sizeof(signed int), 1, median_cluster_file[iCurrentCam]);

		for(m = 0; m < cluster_dim; m++)
		{
			for(n = 0; n < cluster_dim; n++)
			{
				//Original Data
				cluster_pixel_int = (signed int)original_array[iCurrentCam][cluster_row_start + m][cluster_col_start + n];
				fwrite(&cluster_pixel_int, sizeof(signed int), 1, cluster_file[iCurrentCam]);
				//Median Filtered Data
				cluster_pixel_int = (signed int)smooth_array[cluster_row_start + m][cluster_col_start + n];
				fwrite(&cluster_pixel_int, sizeof(signed int), 1, median_cluster_file[iCurrentCam]);
			}
		}


This problem occurred simultaneously on both computers. Since MSVCR100.dll was mentioned I downloaded the redistributable package and installed it from Microsofts web page but it didn't make any difference. So I then tried to compile my source code on the 32-bit laptop and then it works just fine (!), both to compile and debug aswell as running the executable. This makes me believe that the problem isn't related to my code but rather to the OS. I haven't made any updates to any and the computers OS or to VS studios, and the computers aren't connected to internet which I guess rules out automatic updates.

I would be thankful if someone could help me solve this (deadline on tuesday! Shucks | :-\ ). This is my first post here at CP and if there is anything you want me to do different please let me know.

Best regards
/Mikael
AnswerRe: MSVCR100.dll error, debugger_hook_dummy = 0 Pin
Luc Pattyn7-May-11 2:28
sitebuilderLuc Pattyn7-May-11 2:28 
GeneralRe: MSVCR100.dll error, debugger_hook_dummy = 0 Pin
mikael.peterson7-May-11 23:18
mikael.peterson7-May-11 23:18 
AnswerRe: MSVCR100.dll error, debugger_hook_dummy = 0 Pin
kellymac10-Jan-12 12:20
kellymac10-Jan-12 12:20 
QuestionProblem Opening Email when using InvokeHelper in C++ Pin
Member 29729926-May-11 5:00
Member 29729926-May-11 5:00 
AnswerRe: Problem Opening Email when using InvokeHelper in C++ Pin
Richard MacCutchan6-May-11 5:36
mveRichard MacCutchan6-May-11 5:36 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729926-May-11 6:15
Member 29729926-May-11 6:15 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Richard MacCutchan6-May-11 23:01
mveRichard MacCutchan6-May-11 23:01 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729926-May-11 23:11
Member 29729926-May-11 23:11 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Richard MacCutchan7-May-11 0:33
mveRichard MacCutchan7-May-11 0:33 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729927-May-11 2:07
Member 29729927-May-11 2:07 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Richard MacCutchan7-May-11 5:22
mveRichard MacCutchan7-May-11 5:22 
AnswerRe: Problem Opening Email when using InvokeHelper in C++ Pin
barneyman7-May-11 15:23
barneyman7-May-11 15:23 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729928-May-11 6:12
Member 29729928-May-11 6:12 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
barneyman8-May-11 13:04
barneyman8-May-11 13:04 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729928-May-11 22:27
Member 29729928-May-11 22:27 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
barneyman8-May-11 22:37
barneyman8-May-11 22:37 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729928-May-11 22:50
Member 29729928-May-11 22:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.