GPF in CWnd::BringWindowToTop() in MDI App
SCS.010@mch.scn.de
Wednesday, January 29, 1997
Environment: VC++ 1.52, win 3.1
Hi everybody!
Could anyone help me with the following problem...
Mine is an MDI appn and I display child windows on receiving some data at
the backend. After I receive the data, I use the appropriate document
template to create a new frame and then call InitialUpdateFrame for the
created child window. This sometimes results in a GPF in the USER.EXE! The
behaviour is not consistent and it seems to be a timer problem. E.g. if I
have enabled trace messages and trace window is not present, GPF always
comes.
When I trace thro' the fn calls made, I see the following flow...
CDocTemplate::InitialUpdateFrame(...) -> CFrameWnd::ActivateFrame() ->
CWnd::BringWindowToTop() -> _AfxWndProc() -> _AfxCallWndProc() ->
CWnd::WindowProc() -> CMDIChildWnd::DefWindowProc(...) ->
::DefFrameProc(..) and then the crash in USER>EXE!!
The Dr Watson.log file gives an "exceeded segments bounds" entry.
If anyone has encountered something like this before or has an idea as to
why it might be happening, please let me know. I'll be grateful.
Eagerly waiting to hear from u guys...
bye,
Siddharth S
SCS Ltd,
Bangalore
Stephen Augustine -- stephen@cssiinc.com
Friday, January 31, 1997
Siddharth,
During the development of my application, also using VC++ 1.52 (in Windows
3.11), I have also been experiencing the exact problem that you describe -
once out of every 10 times or so the creation of any one of several possible
child windows causes a GPF in USER.EXE. Using the VC++ debugger and/or
CodeView for Windows also showed a crash at ::DefFrameProc(..). After
investigating my code thoroughly and trying pure MFC class objects (a
CMDIChildWnd with a CView and a CDocument) I began to think it had something
to do with compiler switches. My current notion is that this GPF is
generated due to the stack size being too small (the "exceeded segment
bounds" message might point to this). I successively increased the stack
size in the linker options (it's at 26000 now) and I have not had a crash
since then. Again - I'm not sure that this is the solution I am only sharing
what I have done. If anyone else has any other ideas it'd be great to hear them.
I hope this is helpful.
Stephen Augustine
saugustine@cssiinc.com
>Environment: VC++ 1.52, win 3.1
>
>Hi everybody!
>
>Could anyone help me with the following problem...
>
>Mine is an MDI appn and I display child windows on receiving some data at
>the backend. After I receive the data, I use the appropriate document
>template to create a new frame and then call InitialUpdateFrame for the
>created child window. This sometimes results in a GPF in the USER.EXE! The
>behaviour is not consistent and it seems to be a timer problem. E.g. if I
>have enabled trace messages and trace window is not present, GPF always
>comes.
>
>When I trace thro' the fn calls made, I see the following flow...
>
>CDocTemplate::InitialUpdateFrame(...) -> CFrameWnd::ActivateFrame() ->
>CWnd::BringWindowToTop() -> _AfxWndProc() -> _AfxCallWndProc() ->
>CWnd::WindowProc() -> CMDIChildWnd::DefWindowProc(...) ->
>::DefFrameProc(..) and then the crash in USER>EXE!!
>
>The Dr Watson.log file gives an "exceeded segments bounds" entry.
>
>If anyone has encountered something like this before or has an idea as to
>why it might be happening, please let me know. I'll be grateful.
>
>Eagerly waiting to hear from u guys...
>
>bye,
>Siddharth S
>SCS Ltd,
>Bangalore
>
| Вернуться в корень Архива
|