MFC Application crashes in standard browse dialog box.
-
In my application, in browse dialog box i was doing all sort of random things. eg: Create file. rename file. visit network folders. show by list,details,icons. open unrecognised files etc. and somewhere my application crashes I am not what is the specific reason that causes this. The Report of Process dump is a below. Report for notepad2696.dmp Type of Analysis Performed Crash Analysis Machine Name XYZ Operating System Windows XP Service Pack 2 Number Of Processors 2 Process ID 2692 Process Image D:\myproj\notepad\nodepad.exe System Up-Time 01:30:05 Process Up-Time 01:27:36 Thread 0 - System ID 2696 Entry point nodepad+134e56 Create time 2008-07-22 3:01:31 PM Time spent in user mode 0 Days 0:0:4.796 Time spent in kernel mode 0 Days 0:0:15.140 Function Arg 1 Arg 2 Arg 3 Source ole32!CoSetErrorInfo+54 00000000 00000000 001a11c0 ole32!wCoUninitialize+134 0012d9fc 00000000 00163990 ole32!CoUninitialize+5b 001a11c0 0012dac0 00000000 comdlg32!NewGetFileName+24f 00000001 00000001 0012da70 comdlg32!NewGetOpenFileName+f 0012dac0 00000000 001a11c0 comdlg32!GetFileName+35d 0012dac0 763c7705 00000001 comdlg32!GenericGetFileNameA+475 0012ebe4 763c7705 7e41be71 comdlg32!GetOpenFileNameA+23 0012ebe4 00000001 0012f36c mfc42!CFileDialog::DoModal+96 00547820 00354c50 73dd25e8 Broker+233b9 0012f36c 00000234 00000000 mfc42!CCmdTarget::OnCmdMsg+10a 00000234 00000000 00000000 mfc42!CPropertySheet::OnCmdMsg+1d 00000234 00000000 00000000 mfc42!CWnd::OnCommand+53 00000000 00030446 0012f36c mfc42!CWnd::OnWndMsg+2f 00000111 00000234 00030446 mfc42!CWnd::WindowProc+24 00000111 00000234 00030446 mfc42!AfxCallWndProc+91 0012f36c 00000000 00000111 mfc42!AfxWndProc+36 0005040e 00000111 00000234 mfc42!AfxWndProcBase+39 0005040e 00000111 00000234 user32!InternalCallWinProc+28 73e68444 0005040e 00000111 user32!UserCallWinProcCheckWow+150 00000000 73e68444 0005040e user32!SendMessageWorker+4a5 00816a30 007b0960 00000234 user32!SendMessageW+7f 0005040e 00000111 00000234 user32!xxxButtonNotifyParent+41 00816fd8 00000000 00816fd8 user32!xxxBNReleaseCapture+f8 00193b98 00000001 00000
-
In my application, in browse dialog box i was doing all sort of random things. eg: Create file. rename file. visit network folders. show by list,details,icons. open unrecognised files etc. and somewhere my application crashes I am not what is the specific reason that causes this. The Report of Process dump is a below. Report for notepad2696.dmp Type of Analysis Performed Crash Analysis Machine Name XYZ Operating System Windows XP Service Pack 2 Number Of Processors 2 Process ID 2692 Process Image D:\myproj\notepad\nodepad.exe System Up-Time 01:30:05 Process Up-Time 01:27:36 Thread 0 - System ID 2696 Entry point nodepad+134e56 Create time 2008-07-22 3:01:31 PM Time spent in user mode 0 Days 0:0:4.796 Time spent in kernel mode 0 Days 0:0:15.140 Function Arg 1 Arg 2 Arg 3 Source ole32!CoSetErrorInfo+54 00000000 00000000 001a11c0 ole32!wCoUninitialize+134 0012d9fc 00000000 00163990 ole32!CoUninitialize+5b 001a11c0 0012dac0 00000000 comdlg32!NewGetFileName+24f 00000001 00000001 0012da70 comdlg32!NewGetOpenFileName+f 0012dac0 00000000 001a11c0 comdlg32!GetFileName+35d 0012dac0 763c7705 00000001 comdlg32!GenericGetFileNameA+475 0012ebe4 763c7705 7e41be71 comdlg32!GetOpenFileNameA+23 0012ebe4 00000001 0012f36c mfc42!CFileDialog::DoModal+96 00547820 00354c50 73dd25e8 Broker+233b9 0012f36c 00000234 00000000 mfc42!CCmdTarget::OnCmdMsg+10a 00000234 00000000 00000000 mfc42!CPropertySheet::OnCmdMsg+1d 00000234 00000000 00000000 mfc42!CWnd::OnCommand+53 00000000 00030446 0012f36c mfc42!CWnd::OnWndMsg+2f 00000111 00000234 00030446 mfc42!CWnd::WindowProc+24 00000111 00000234 00030446 mfc42!AfxCallWndProc+91 0012f36c 00000000 00000111 mfc42!AfxWndProc+36 0005040e 00000111 00000234 mfc42!AfxWndProcBase+39 0005040e 00000111 00000234 user32!InternalCallWinProc+28 73e68444 0005040e 00000111 user32!UserCallWinProcCheckWow+150 00000000 73e68444 0005040e user32!SendMessageWorker+4a5 00816a30 007b0960 00000234 user32!SendMessageW+7f 0005040e 00000111 00000234 user32!xxxButtonNotifyParent+41 00816fd8 00000000 00816fd8 user32!xxxBNReleaseCapture+f8 00193b98 00000001 00000
How are you creating the "browse dialog?" Does the "crash" happen while that dialog is open, or after it is dismissed?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
How are you creating the "browse dialog?" Does the "crash" happen while that dialog is open, or after it is dismissed?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
This is how i create the browse dialog box. void CBrowseDlg::OnBrowse[] [ CFileDialog objFileDlg[TRUE,NULL,NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, NULL]; if(IDOK == objFileDlg.DoModal[]] [ //update the filename and pass phrase m_csPvtKeyFile = objFileDlg.GetPathName[]; UpdateData[FALSE]; ] ] The Crash had happened while dialog box was open. I am unable to simulate this type of crash again. fortunately i had the process dump running. Does this way of creating file dialog inherently has some problem. or the Error is related to type of operation I do which is similar to browsing in My Computer, which i cannot do anything about. Apparently I had seen some discussion on similar kind of problem which was solved by window hotfix http://www.bokebb.com/dev/english/1960/posts/196055272.shtml While trying to replicate the problem I had come across another crash in the browse dialog box. which seems to be related to the winzip.dll Analysis Summary Type: Error Description : WARNING - DebugDiag was not able to locate debug symbols for WZSHLEX1.DLL, so the information below may be incomplete. In notepad2912.dmp the assembly instruction at WZSHLEX1+1028 in C:\Program Files\WinZip\WZSHLEX1.DLL from WinZip Computing, Inc. has caused an access violation exception (0xC0000005) when trying to read from memory location 0x01c906cb on thread 0 Please follow up with the vendor WinZip Computing, Inc. for C:\Program Files\WinZip\WZSHLEX1.DLL Recommendation : Information DebugDiag determined that this dump file (notepad2912.dmp) is a crash dump and did not perform any hang analysis. If you wish to enable combined crash and hang analysis for crash dumps, edit the CrashHangAnalysis.asp script (located in the DebugDiag\Scripts folder) and set the g_DoCombinedAnalysis constant to True. Analysis Details Table Of Contents notepad2912.dmp Faulting Thread Faulting Module Information Report for notepad2912.dmp Report for notepad2912.dmp Type of Analysis Performed Crash Analysis Machine Name XYZ Operating System Windows XP Service Pack 2 Number Of Processors 2 Process ID 2908 Process Image E:\myproj\notepad.exe System Up-Time 00:50:44 Process Up-Time 00:37:15 Thread 0 - System ID 2912 Entry point notepad!WinMainCRTStartup Create time 2008-07-23 10:49:
-
This is how i create the browse dialog box. void CBrowseDlg::OnBrowse[] [ CFileDialog objFileDlg[TRUE,NULL,NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, NULL]; if(IDOK == objFileDlg.DoModal[]] [ //update the filename and pass phrase m_csPvtKeyFile = objFileDlg.GetPathName[]; UpdateData[FALSE]; ] ] The Crash had happened while dialog box was open. I am unable to simulate this type of crash again. fortunately i had the process dump running. Does this way of creating file dialog inherently has some problem. or the Error is related to type of operation I do which is similar to browsing in My Computer, which i cannot do anything about. Apparently I had seen some discussion on similar kind of problem which was solved by window hotfix http://www.bokebb.com/dev/english/1960/posts/196055272.shtml While trying to replicate the problem I had come across another crash in the browse dialog box. which seems to be related to the winzip.dll Analysis Summary Type: Error Description : WARNING - DebugDiag was not able to locate debug symbols for WZSHLEX1.DLL, so the information below may be incomplete. In notepad2912.dmp the assembly instruction at WZSHLEX1+1028 in C:\Program Files\WinZip\WZSHLEX1.DLL from WinZip Computing, Inc. has caused an access violation exception (0xC0000005) when trying to read from memory location 0x01c906cb on thread 0 Please follow up with the vendor WinZip Computing, Inc. for C:\Program Files\WinZip\WZSHLEX1.DLL Recommendation : Information DebugDiag determined that this dump file (notepad2912.dmp) is a crash dump and did not perform any hang analysis. If you wish to enable combined crash and hang analysis for crash dumps, edit the CrashHangAnalysis.asp script (located in the DebugDiag\Scripts folder) and set the g_DoCombinedAnalysis constant to True. Analysis Details Table Of Contents notepad2912.dmp Faulting Thread Faulting Module Information Report for notepad2912.dmp Report for notepad2912.dmp Type of Analysis Performed Crash Analysis Machine Name XYZ Operating System Windows XP Service Pack 2 Number Of Processors 2 Process ID 2908 Process Image E:\myproj\notepad.exe System Up-Time 00:50:44 Process Up-Time 00:37:15 Thread 0 - System ID 2912 Entry point notepad!WinMainCRTStartup Create time 2008-07-23 10:49:
Why are you using [] instead of () and {}? Other than that, your code snippet worked fine for me.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Why are you using [] instead of () and {}? Other than that, your code snippet worked fine for me.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
The problem is solved after patching the OS with microsoft hotfixes