Home > Software engineering >  Windos has been spatially-integrated SVS. Exe triggered a breakpoint
Windos has been spatially-integrated SVS. Exe triggered a breakpoint

Time:10-02

Program in the process of debugging, abnormal: when postmessge function called windos has been spatially-integrated SVS. Exe triggered a breakpoint, the reason may be that the heap is damaged, it shows that spatially-integrated SVS. Exe or its load any DLL have bugs,

 
* Csvs exposure Dlg Form=* (Csvs exposure Dlg) Context;
Unsigned char * ImageData;
Int imageID;
HDC HDC.
The CDC * dc;
If (Form==NULL)
{
Return SVGigE_INVALID_PARAMETERS;
}
If (Form - & gt; Camera - & gt; IsAcquisition==false)
Return SVGigE_IMAGE_SKIPPED_IN_CALLBACK;
//get the image data pointer
ImageData=https://bbs.csdn.net/topics/Image_getDataPointer (Image);//unsigned character pointer data
Form - & gt; Camera - & gt; ImageData_8bit=Image_getDataPointer (Image);
GVSP_PIXEL_TYPE PixelType=Image_getPixelType (Image);
ImageID=Image_getImageID (Image);//image ID
Form - & gt; PostMessage (WM_DISPLAY_IMAGE, 0, 0);
If (Form - & gt; Camera - & gt; ImageData=https://bbs.csdn.net/topics/=NULL)//image pointer null
{
If (Image_getSignalType (Image)==SVGigE_SIGNAL_CAMERA_CONNECTION_LOST)
{
AfxMessageBox (_T (" camera lost connection "));//The camera cable is disconnected while a connection to that camera is open, cable, cable, disconnected - separation,
Form - & gt; PostMessage (WM_DISPLAY_IMAGE, 0, IMAGE_NONE);
Return SVGigE_SUCCESS;
}
}

Great god under the analysis of reasons, very grateful!

CodePudding user response:

Direct PostMessage (WM_DISPLAY_IMAGE, 0, 0) a try? Not through the Form calls

CodePudding user response:

You this is in open thread, rather than in the main thread?

CodePudding user response:

See F5 to run, the interrupt stack hang bai, estimate is to obtain the image is the buffer to burst,

CodePudding user response:

Collapsed in the pop-up dialog box, press the corresponding button to enter debugging press Alt + 7 key to view the Call Stack, namely "the Call Stack" from the inside to the following out of from the inner to outer function Call history, double-click a row to the cursor to the Call of the source code or assembly instruction, don't understand when double click on the next line, until we can read ,

Determine whether cross-border access, can be in after the last element of an array of the corresponding address set read and write data breakpoints, if the address corresponding to other variables interfere with the judgment, can be more declare an array element, and set the read and write data breakpoints on the corresponding address of the more elements,
 # include & lt; Time. H> 
# include & lt; Stdlib. H>
# include & lt; Windows. H>
Int main () {
Int a, b [11].//was b [10], to decide which words of cross-border, intentionally statement for b [11]

Srand ((unsigned int) time (NULL));//press F11 twice, such as yellow right arrow pointing to the bank, the debugging, the new breakpoint, new data breakpoints, address: & amp; B [10], byte count: 4, sure,
While (1) {//press F5, will stop in the following sentence, as a value of 10, b has been modified to corresponding to 0. [10]. One of the four,
B (11) (a=rand () %]=0;
Sleep (100);
B (11) (a=rand () %]=1;
Sleep (100);
B (11) (a=rand () %]=2;
Sleep (100);
B (11) (a=rand () %]=3;
Sleep (100);
B (11) (a=rand () %]=4;
Sleep (100);
}
return 0;
}
  • Related