Deadlock with Single Threaded Application

I am using MS Visual C++ 6.0 (Professional edition) on Win XP 5.1 SP
2.

I am developing a Windows application that calls vanilla C/C++
classes.  I have gone to
Project:Settings:C/C++:Code Generation
and selected
Debug Single-Threaded
under
Use Run-Time Library

Despite the fact that  I use exactly the same code every time, the
program sometimes runs through to completeion w/o any problems and
sometimes hangs in random places.  Both of these outcomes occurs both
when I am doing other work on the PC and when I leave the PC with a
single application running.  I know that it is hanging when it is
still running long after it usually completes.  When I do a
Debug: Break
it is on some random (except usually string related) operation.  I set
a breakpoint on the very next line and call Go (F5) but it never gets
there.  The output gives me the error message:
BG: Break command failed within 3 seconds.
DBG: Potential deadlock. Soft broken.

OK, so how do I get this with a single-threaded application?

Many thanks in advance for any help,
Peter.

0
7/14/2007 3:00:35 PM
vc.mfc 33608 articles. 0 followers. Follow

17 Replies
736 Views

Similar Articles

[PageSpeed] 22

Are you calling any routines that access hardware or something like windows 
sockets or other network things?

Also, could be a memory problem.  Usually that would crash the program 
rather than hang it, but ...

I doubt that it is random.  You probably just haven't discovered the 
pattern.

Do you call any libraries that start their own theads and may be calling 
back to you?

Tom

"PeterOut" <MajorSetback@excite.com> wrote in message 
news:1184425235.110093.28500@g4g2000hsf.googlegroups.com...
>I am using MS Visual C++ 6.0 (Professional edition) on Win XP 5.1 SP
> 2.
>
> I am developing a Windows application that calls vanilla C/C++
> classes.  I have gone to
> Project:Settings:C/C++:Code Generation
> and selected
> Debug Single-Threaded
> under
> Use Run-Time Library
>
> Despite the fact that  I use exactly the same code every time, the
> program sometimes runs through to completeion w/o any problems and
> sometimes hangs in random places.  Both of these outcomes occurs both
> when I am doing other work on the PC and when I leave the PC with a
> single application running.  I know that it is hanging when it is
> still running long after it usually completes.  When I do a
> Debug: Break
> it is on some random (except usually string related) operation.  I set
> a breakpoint on the very next line and call Go (F5) but it never gets
> there.  The output gives me the error message:
> BG: Break command failed within 3 seconds.
> DBG: Potential deadlock. Soft broken.
>
> OK, so how do I get this with a single-threaded application?
>
> Many thanks in advance for any help,
> Peter.
> 

0
tom.nospam (3240)
7/14/2007 4:15:21 PM
On Jul 14, 12:15 pm, "Tom Serface" <tom.nos...@camaswood.com> wrote:
> Are you calling any routines that access hardware or something like windows
> sockets or other network things?

No

> Also, could be a memory problem.  Usually that would crash the program
> rather than hang it, but ...

That is a possibility.  I was having the problem earlier in the
program but no longer seem to have it there since I reworked the C
code to avoid possible memory overwrites.  I use the word "seem" since
the problem usually doesn't happen at all, making it difficult to
track down when it does.  It seems that I can do exactly the same
thing.  Sometimes it hangs.  Sometimes not.

> I doubt that it is random.  You probably just haven't discovered the
> pattern.

That could be the case.  I will try running it a few times and try to
discern a pattern

>
> Do you call any libraries that start their own theads and may be calling
> back to you?

I have an MFC graphical front end but the classes themselves are
vanilla C++.  The GUI just calls the C++ main function which calls a
bunch of other vanilla C++ functions.

Thanks very much for your reply,
Peter.

0
7/14/2007 4:49:57 PM
On Sat, 14 Jul 2007 08:00:35 -0700, PeterOut <MajorSetback@excite.com> wrote:

>I am using MS Visual C++ 6.0 (Professional edition) on Win XP 5.1 SP
>2.
>
>I am developing a Windows application that calls vanilla C/C++
>classes.  I have gone to
>Project:Settings:C/C++:Code Generation
>and selected
>Debug Single-Threaded
>under
>Use Run-Time Library
>
>Despite the fact that  I use exactly the same code every time, the
>program sometimes runs through to completeion w/o any problems and
>sometimes hangs in random places.  Both of these outcomes occurs both
>when I am doing other work on the PC and when I leave the PC with a
>single application running.  I know that it is hanging when it is
>still running long after it usually completes.  When I do a
>Debug: Break
>it is on some random (except usually string related) operation.  I set
>a breakpoint on the very next line and call Go (F5) but it never gets
>there.  The output gives me the error message:
>BG: Break command failed within 3 seconds.
>DBG: Potential deadlock. Soft broken.
>
>OK, so how do I get this with a single-threaded application?
****
This message can also occur when you are hung in the kernel waiting for something.  Have
you considered single-stepping instead of using F5 to run?  

Why do you think there is any benefit whatsoever in using the single-threaded library?  It
has truly marginal value, and largely should be ignored.
****
>
>Many thanks in advance for any help,
>Peter.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
7/14/2007 5:06:33 PM
Since there is virtually no value to using the single-threaded library, restore the
multithreaded library and see if the problem still exists.  If it goes away, you are doing
something that involves threads, whether you are doing it overtly or not, and therefore
you would need the multithreaded library.

Do not add unnecessary complexity to your life.  The single-threaded library should have
been killed off years ago, and is best avoided.  
					joe

On Sat, 14 Jul 2007 09:49:57 -0700, PeterOut <MajorSetback@excite.com> wrote:

>On Jul 14, 12:15 pm, "Tom Serface" <tom.nos...@camaswood.com> wrote:
>> Are you calling any routines that access hardware or something like windows
>> sockets or other network things?
>
>No
>
>> Also, could be a memory problem.  Usually that would crash the program
>> rather than hang it, but ...
>
>That is a possibility.  I was having the problem earlier in the
>program but no longer seem to have it there since I reworked the C
>code to avoid possible memory overwrites.  I use the word "seem" since
>the problem usually doesn't happen at all, making it difficult to
>track down when it does.  It seems that I can do exactly the same
>thing.  Sometimes it hangs.  Sometimes not.
>
>> I doubt that it is random.  You probably just haven't discovered the
>> pattern.
>
>That could be the case.  I will try running it a few times and try to
>discern a pattern
>
>>
>> Do you call any libraries that start their own theads and may be calling
>> back to you?
>
>I have an MFC graphical front end but the classes themselves are
>vanilla C++.  The GUI just calls the C++ main function which calls a
>bunch of other vanilla C++ functions.
>
>Thanks very much for your reply,
>Peter.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
7/14/2007 5:09:29 PM
To set a breakpoint, the debugger has to stop (break) the process.
The debugger is trying to do break first, to interrupt the process at well 
known good point, such as system call. If it's not able to do break in a 
reasonable time, it just suspends the process (does what it calls break, but 
I would call it hard break).

"PeterOut" <MajorSetback@excite.com> wrote in message 
news:1184425235.110093.28500@g4g2000hsf.googlegroups.com...
>I am using MS Visual C++ 6.0 (Professional edition) on Win XP 5.1 SP
> 2.
>
> I am developing a Windows application that calls vanilla C/C++
> classes.  I have gone to
> Project:Settings:C/C++:Code Generation
> and selected
> Debug Single-Threaded
> under
> Use Run-Time Library
>
> Despite the fact that  I use exactly the same code every time, the
> program sometimes runs through to completeion w/o any problems and
> sometimes hangs in random places.  Both of these outcomes occurs both
> when I am doing other work on the PC and when I leave the PC with a
> single application running.  I know that it is hanging when it is
> still running long after it usually completes.  When I do a
> Debug: Break
> it is on some random (except usually string related) operation.  I set
> a breakpoint on the very next line and call Go (F5) but it never gets
> there.  The output gives me the error message:
> BG: Break command failed within 3 seconds.
> DBG: Potential deadlock. Soft broken.
>
> OK, so how do I get this with a single-threaded application?
>
> Many thanks in advance for any help,
> Peter.
> 


0
alegr (1131)
7/14/2007 7:03:23 PM
On Jul 14, 1:06 pm, Joseph M. Newcomer <newco...@flounder.com> wrote:
> This message can also occur when you are hung in the kernel waiting for something.  Have
> you considered single-stepping instead of using F5 to run?  

It notice this problem when the program has been running for an
unusually long time.  (With exactly the same code and input, it
sometimes happens and sometimes does not.)  When I call "Break" I end
up in some assemply code.  Whether  I single step with F10 or run with
F5, it doesn't move and I get the deadlock message.

>
> Why do you think there is any benefit whatsoever in using the single-threaded library?

I read about multithreading.  It seems like it's main advantage is to
have several threads operating independently.  My program is
sequential.  Every step is dependent upon the previous step.  From
what I have read, multithreading gives the added complexity of
deadlocks, etc.  There is the additional problem of the overhead in
starting the thread but wanting to avoid a source of deadlocks,
coupled with sequential code, is the main reason I would prefer to use
single thread.

Thanks,
Peter.

0
7/19/2007 12:38:40 AM
On Jul 14, 1:09 pm, Joseph M. Newcomer <newco...@flounder.com> wrote:
> Since there is virtually no value to using the single-threaded library, restore the
> multithreaded library and see if the problem still exists.  If it goes away, you are doing
> something that involves threads, whether you are doing it overtly or not, and therefore
> you would need the multithreaded library.
>

With both single- and multi-threaded, is sometimes hangs and sometimes
does not despite the fact that I use exactly the same code with
exactly the same input.

Thanks,
Peter.

0
7/19/2007 1:09:13 AM
"PeterOut" <MajorSetback@excite.com> wrote in message 
news:1184807353.517497.281770@i13g2000prf.googlegroups.com...
> With both single- and multi-threaded, is sometimes hangs and sometimes
> does not despite the fact that I use exactly the same code with
> exactly the same input.
>

Multi-threads are susceptible to a particular kind of hang known as 
"deadlock".  Each thread is waiting for a resource owned by the other one, 
and thus will never stop waiting.

Single threads can also hang, but not because of this.  I think you need to 
differentiate a hang from deadlock, otherwise you will not make sense to 
those who think you are talking about deadlock.

-- David


0
dc2983 (3206)
7/19/2007 1:22:02 AM
"PeterOut" <MajorSetback@excite.com> wrote in message 
news:1184425235.110093.28500@g4g2000hsf.googlegroups.com...
>I am using MS Visual C++ 6.0 (Professional edition) on Win XP 5.1 SP
> 2.
>
> I am developing a Windows application that calls vanilla C/C++
> classes.  I have gone to
> Project:Settings:C/C++:Code Generation
> and selected
> Debug Single-Threaded
> under
> Use Run-Time Library

You do realize that this in no way makes your application single-threaded, 
right?  It just guarantees bad behavior if you use the CRT from more than 
one thread. 


0
rbv (46)
7/19/2007 6:23:39 PM
On Jul 19, 2:23 pm, "Ben Voigt [C++ MVP]" <r...@nospam.nospam> wrote:
> "PeterOut" <MajorSetb...@excite.com> wrote in message
>
> news:1184425235.110093.28500@g4g2000hsf.googlegroups.com...
>
> >I am using MS Visual C++ 6.0 (Professional edition) on Win XP 5.1 SP
> > 2.
>
> > I am developing a Windows application that calls vanilla C/C++
> > classes.  I have gone to
> > Project:Settings:C/C++:Code Generation
> > and selected
> > Debug Single-Threaded
> > under
> > Use Run-Time Library
>
> You do realize that this in no way makes your application single-threaded,
> right?  It just guarantees bad behavior if you use the CRT from more than
> one thread.

To be honest, I did not realize this.  Does this mean that there is no
way to make the application single-threaded?  I guess CRT does not
mean "cathode ray tube".  Is it the chip level redundantly threaded
multiprocessor?

Thanks,
Peter.

0
7/20/2007 3:00:20 AM
PeterOut wrote:
>>You do realize that this in no way makes your application single-threaded,
>>right?  It just guarantees bad behavior if you use the CRT from more than
>>one thread.
> 
> 
> To be honest, I did not realize this.  Does this mean that there is no
> way to make the application single-threaded?  I guess CRT does not
> mean "cathode ray tube".  Is it the chip level redundantly threaded
> multiprocessor?

An application is single threaded if your code does not create any 
additional threads, and if your code does not use any libraries that 
create additional threads.  If you halt the program in the VC debugger 
the debugger will display a list of all your threads.

Neither the CRT (C runtime library) nor the CPU chip have anything to do 
with whether or not your app is single threaded.  That's up to your code.

-- 
Scott McPhillips [MVP VC++]

0
Scott
7/20/2007 3:15:23 AM
On Jul 19, 11:15 pm, "Scott McPhillips [MVP]" <org-dot-mvps-at-
scottmcp> wrote:
> An application is single threaded if your code does not create any
> additional threads, and if your code does not use any libraries that
> create additional threads.  If you halt the program in the VC debugger
> the debugger will display a list of all your threads.
>

I looked at the threads where my code is hanging and there was only
one listed.

Thread ID   Suspend        Priority        Location
*00000bf4       1                  9
[CMDIFrameWnd:DefWindowProcA]

Here is the call stack.
NTDLL! 7c90eb95()
USER32! 7e43083f()
USER32! 7e44f720()
CMDIFrameWnd::DefWindowProcA(unsigned int 70, unsigned int 0, long
1244760) line 198
CWnd::WindowProc(unsigned int 70, unsigned int 0, long 1244760) line
1586 + 26 bytes
AfxCallWndProc(CWnd * 0x01401390 {CMainFrame hWnd=???}, HWND__ *
0x00640220, unsigned int 70, unsigned int 0, long 1244760) line 215 +
26 bytes
AfxWndProc(HWND__ * 0x00640220, unsigned int 70, unsigned int 0, long
1244760) line 368
USER32! 7e418734()
USER32! 7e41d05b()
USER32! 7e41b4c0()
USER32! 7e41cf9e()
NTDLL! 7c90eae3()
CWinThread::PumpMessage() line 814 + 19 bytes
CWinThread::Run() line 480 + 11 bytes
CWinApp::Run() line 400
AfxWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char *
0x00141f0d, int 1) line 49 + 11 bytes
WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char *
0x00141f0d, int 1) line 30
WinMainCRTStartup() line 198 + 54 bytes
KERNEL32! 7c816fd

And here is some of the assemly code.

7C90EB93   nop
7C90EB94   ret
7C90EB95   lea         esp,[esp]
7C90EB9C   lea         esp,[esp]
7C90EBA0   nop
7C90EBA1   nop

It is hanging at
7C90EB95   lea         esp,[esp]

Here are the error messages.
DBG: Break command failed within 3 seconds.
DBG: Potential deadlock. Soft broken.
DBG: Break command failed within 3 seconds.
DBG: Potential deadlock. Soft broken.
DBG: Break command failed within 3 seconds.
DBG: Potential deadlock. Soft broken.

Thanks,
Peter.

0
7/21/2007 2:28:52 AM
This is WM_WINDOWPOSCHANGING.

MAKE SURE your message handlers are defined exactly as the documentation 
says, especially ON_MESSAGE. If number of arguments doesn't match, you'll 
get all kinds of funny behaviors.

"PeterOut" <MajorSetback@excite.com> wrote in message 
news:1184984932.308402.301860@22g2000hsm.googlegroups.com...
> On Jul 19, 11:15 pm, "Scott McPhillips [MVP]" <org-dot-mvps-at-
> scottmcp> wrote:
>> An application is single threaded if your code does not create any
>> additional threads, and if your code does not use any libraries that
>> create additional threads.  If you halt the program in the VC debugger
>> the debugger will display a list of all your threads.
>>
>
> I looked at the threads where my code is hanging and there was only
> one listed.
>
> Thread ID   Suspend        Priority        Location
> *00000bf4       1                  9
> [CMDIFrameWnd:DefWindowProcA]
>
> Here is the call stack.
> NTDLL! 7c90eb95()
> USER32! 7e43083f()
> USER32! 7e44f720()
> CMDIFrameWnd::DefWindowProcA(unsigned int 70, unsigned int 0, long
> 1244760) line 198
> CWnd::WindowProc(unsigned int 70, unsigned int 0, long 1244760) line
> 1586 + 26 bytes
> AfxCallWndProc(CWnd * 0x01401390 {CMainFrame hWnd=???}, HWND__ *
> 0x00640220, unsigned int 70, unsigned int 0, long 1244760) line 215 +
> 26 bytes
> AfxWndProc(HWND__ * 0x00640220, unsigned int 70, unsigned int 0, long
> 1244760) line 368
> USER32! 7e418734()
> USER32! 7e41d05b()
> USER32! 7e41b4c0()
> USER32! 7e41cf9e()
> NTDLL! 7c90eae3()
> CWinThread::PumpMessage() line 814 + 19 bytes
> CWinThread::Run() line 480 + 11 bytes
> CWinApp::Run() line 400
> AfxWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char *
> 0x00141f0d, int 1) line 49 + 11 bytes
> WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char *
> 0x00141f0d, int 1) line 30
> WinMainCRTStartup() line 198 + 54 bytes
> KERNEL32! 7c816fd
>
> And here is some of the assemly code.
>
> 7C90EB93   nop
> 7C90EB94   ret
> 7C90EB95   lea         esp,[esp]
> 7C90EB9C   lea         esp,[esp]
> 7C90EBA0   nop
> 7C90EBA1   nop
>
> It is hanging at
> 7C90EB95   lea         esp,[esp]
>
> Here are the error messages.
> DBG: Break command failed within 3 seconds.
> DBG: Potential deadlock. Soft broken.
> DBG: Break command failed within 3 seconds.
> DBG: Potential deadlock. Soft broken.
> DBG: Break command failed within 3 seconds.
> DBG: Potential deadlock. Soft broken.
>
> Thanks,
> Peter.
> 


0
alegr (1131)
7/21/2007 3:22:08 AM
On Jul 20, 11:22 pm, "Alexander Grigoriev" <al...@earthlink.net>
wrote:
> This is WM_WINDOWPOSCHANGING.
>
> MAKE SURE your message handlers are defined exactly as the documentation
> says, especially ON_MESSAGE. If number of arguments doesn't match, you'll
> get all kinds of funny behaviors.
>
> "PeterOut" <MajorSetb...@excite.com> wrote in message
>

I searched for those message tokens (WM_WINDOWPOSCHANGING and
ON_MESSAGE) and did not find them anywhere in my code.  What makes
this a difficult problem to deal with is that, even with exactly the
same code and input, sometimes it happens and sometimes it does not.
So far, it has not happened when I have left the program running
overnight (although I may not have tried that enough times to discern
a pattern).  It seems to happen after I have called break.  There
again, I hit break when it seems to be taking a long time to run.  I
think I will output status reports to a file so that I can see if it
hangs without my meddling.

Thanks,
Peter.

0
7/21/2007 2:10:54 PM
See below...
On Wed, 18 Jul 2007 17:38:40 -0700, PeterOut <MajorSetback@excite.com> wrote:

>On Jul 14, 1:06 pm, Joseph M. Newcomer <newco...@flounder.com> wrote:
>> This message can also occur when you are hung in the kernel waiting for something.  Have
>> you considered single-stepping instead of using F5 to run?  
>
>It notice this problem when the program has been running for an
>unusually long time.  (With exactly the same code and input, it
>sometimes happens and sometimes does not.)  When I call "Break" I end
>up in some assemply code.  Whether  I single step with F10 or run with
>F5, it doesn't move and I get the deadlock message.
****
And what is the stack backtrace?  And, did you go to the Debug menu and show the threads
to see if more than one thread is involved, and if so, what is the stack backtrace for
EACH of the threads?
*****
>
>>
>> Why do you think there is any benefit whatsoever in using the single-threaded library?
>
>I read about multithreading.  It seems like it's main advantage is to
>have several threads operating independently.  My program is
>sequential.  Every step is dependent upon the previous step.  From
>what I have read, multithreading gives the added complexity of
>deadlocks, etc.  There is the additional problem of the overhead in
>starting the thread but wanting to avoid a source of deadlocks,
>coupled with sequential code, is the main reason I would prefer to use
>single thread.
*****
Yes, but are you sure that some library you never heard of, but which happens to be
included because you are including some other library,  is not using threads?  

Just because you are writing a single thread is not an excuse to use the single-thread
library.  
				joe
*****
>
>Thanks,
>Peter.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
7/22/2007 9:03:38 AM
"PeterOut" <MajorSetback@excite.com> wrote in message 
news:1184900420.133763.292680@22g2000hsm.googlegroups.com...
> On Jul 19, 2:23 pm, "Ben Voigt [C++ MVP]" <r...@nospam.nospam> wrote:
>> "PeterOut" <MajorSetb...@excite.com> wrote in message
>>
>> news:1184425235.110093.28500@g4g2000hsf.googlegroups.com...
>>
>> >I am using MS Visual C++ 6.0 (Professional edition) on Win XP 5.1 SP
>> > 2.
>>
>> > I am developing a Windows application that calls vanilla C/C++
>> > classes.  I have gone to
>> > Project:Settings:C/C++:Code Generation
>> > and selected
>> > Debug Single-Threaded
>> > under
>> > Use Run-Time Library
>>
>> You do realize that this in no way makes your application 
>> single-threaded,
>> right?  It just guarantees bad behavior if you use the CRT from more than
>> one thread.
>
> To be honest, I did not realize this.  Does this mean that there is no
> way to make the application single-threaded?  I guess CRT does not
> mean "cathode ray tube".  Is it the chip level redundantly threaded
> multiprocessor?

You can have a single threaded application, yes, but there is no way to 
"make" the application single threaded.  A call to CreateThread will make a 
new thread and there's very little you can do about it. 


0
rbv (46)
7/24/2007 11:08:04 PM
On Jul 20, 9:28 pm, PeterOut <MajorSetb...@excite.com> wrote:
> On Jul 19, 11:15 pm, "Scott McPhillips [MVP]" <org-dot-mvps-at-
>
> scottmcp> wrote:
> > An application is single threaded if your code does not create any
> > additional threads, and if your code does not use any libraries that
> > create additional threads.  If you halt the program in the VC debugger
> > the debugger will display a list of all your threads.
>
> I looked at the threads where my code is hanging and there was only
> one listed.
>
> Thread ID   Suspend        Priority        Location
> *00000bf4       1                  9
> [CMDIFrameWnd:DefWindowProcA]
>
> Here is the call stack.
> NTDLL! 7c90eb95()
> USER32! 7e43083f()
> USER32! 7e44f720()
> CMDIFrameWnd::DefWindowProcA(unsigned int 70, unsigned int 0, long
> 1244760) line 198
> CWnd::WindowProc(unsigned int 70, unsigned int 0, long 1244760) line
> 1586 + 26 bytes
> AfxCallWndProc(CWnd * 0x01401390 {CMainFrame hWnd=???}, HWND__ *
> 0x00640220, unsigned int 70, unsigned int 0, long 1244760) line 215 +
> 26 bytes
> AfxWndProc(HWND__ * 0x00640220, unsigned int 70, unsigned int 0, long
> 1244760) line 368
> USER32! 7e418734()
> USER32! 7e41d05b()
> USER32! 7e41b4c0()
> USER32! 7e41cf9e()
> NTDLL! 7c90eae3()
> CWinThread::PumpMessage() line 814 + 19 bytes
> CWinThread::Run() line 480 + 11 bytes
> CWinApp::Run() line 400
> AfxWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char *
> 0x00141f0d, int 1) line 49 + 11 bytes
> WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char *
> 0x00141f0d, int 1) line 30
> WinMainCRTStartup() line 198 + 54 bytes
> KERNEL32! 7c816fd
>
> And here is some of the assemly code.
>
> 7C90EB93   nop
> 7C90EB94   ret
> 7C90EB95   lea         esp,[esp]
> 7C90EB9C   lea         esp,[esp]
> 7C90EBA0   nop
> 7C90EBA1   nop
>
> It is hanging at
> 7C90EB95   lea         esp,[esp]
>
> Here are the error messages.
> DBG: Break command failed within 3 seconds.
> DBG: Potential deadlock. Soft broken.
> DBG: Break command failed within 3 seconds.
> DBG: Potential deadlock. Soft broken.
> DBG: Break command failed within 3 seconds.
> DBG: Potential deadlock. Soft broken.
>
> Thanks,
> Peter.

This error looks something like a message sent for a window which does
not exist or is corrupt at the moment while processing the message.
Using the debugger try to look at the classes which have the methods

CMDIFrameWnd::DefWindowProcA(unsigned int 70, unsigned int 0, long
1244760) line 198
CWnd::WindowProc(unsigned int 70, unsigned int 0, long 1244760) line
1586 + 26 bytes
Check if the classes are correct, if the handles are correct (use spy+
+ to check the controls or windows using those handles).

If some data looks wrong follow the damaged memory area (size
position), and try to guess what is damaging in that way. You can set
break points which trigger when a memory data is changed.

If the data looks fine but the handles does not exist, I would also
taking in account the possibility of message which deletes a window
before returning.

If all looks fine, handles and data, I would try to activate symbols
for debugging, (which will show you a little more about the system
functions you are calling).

Regards.

0
psalazar (1)
7/26/2007 3:38:21 PM
Reply:

Similar Artilces:

Red Bull 4-pk & Singles?
Hello, I sell an item such as Red Bull, it comes in either a 4-pk and or singles...when I set it up so that it was a parent child relationship, I set up the amount of 4-pks I had along with the amount of singles I had, as a case of 24 can either equal 24 loose cans or 6, 4-pks. Anyhow, when doing this RMS only allows for the 4-pks not telling me how many cases of loose I have, is there a way around this? -- Thank You,; Vince Vince, If I understand this correctly you want to know how many singles, 4 pks and, case you have. Now since the cases come into your store as 6 4 pks then the 4...

Single Server OWA/RPC?
Hi, We are in the design phase of our Exchange 2003 upgrade process. We are a small company with less than 200 users and want to know if we can use a single Exchange server to impliment both traditional messaging and also OWA and/or RPC over HTTP. All the setup guides I've seen so far mention configuring front end and back end servers, however I'd rather not have to deal with that given our small size and budget. We don't have any ISA servers and we handle port filtering and address translation via our Cisco PIX firewall. Can we enable OWA with such a simple setup? Thanks i...

generate a list from a single row of data
Using Excel 97, I have a spreadsheet of Project Reports, arranged across the sheet as follows : Column A thru I are templates, hidden from the Project Managers Column J I want to have a table of project names that are in the worksheet Column K is blank Column L is the labels/descriptions for rows going across the worksheet Rows 4 - 29 Various Dates/contacts etc. Rows 30--53 Month labels for 2 years of resource forecast data Column M, rows 4-29 blank rows 30-53 Project Manager absence (vacation/training) forecasts Column N is a Summary row of Project Managers forecast time for all projects ...

CrmSecurityService.exe
The following error is happening at the end of the install process for CRM: The instruction at "0x77fc8fe3" referenced memory at "0x00746e69". The memory could not be "written". Followed by: Failed to install Microsoft Customer Relationship Management Server. Failed to install MSI part of CRM Server setup. Unspecified error: (80004005) =================== I have searched all the forums and tried all the tricks posted for this message....no good! Any help would do. At this point, I am ready to go buy a copy of ACT and let that be it. I am so tired of the qua...

Single Report from teveral tables with a single to many relationsh
Novice builder so be gentle ;) Here is the problem. I have constructed a report that utilizes a main table that has a one to many with other tables. And example would be Customer database, linked to tables of sales contacts and notes. Pluse other tables that have multiple records. When a I generate the report, the Customer information will repeat for each record in the sales contacts, notes, and other tables. Therefore, though I wish to generate a single report with all information, I have 30 reports for a single individual. I know I could, in theory, get it to stop by i...

Access 2003
Hi all, This is not a question. Just for the record, I wanted to report that the Amy's solution at the bottom of this message still perfectly works for MS Access 2003 (MS Office 2003) on Windows XP Home edition. I couldn't find such a helpful solution anywhere else on the net. I'm writing this for those who may search the MS newsgroups for similar problem in future. Thanks a lot Amy Vargo. Sam ======================================================================== From: JBaker (johna.baker@belointeractive.com) Subject: Method 'CurrentDb' of object_'Application f...

After designing a single slide,it only partially paints on laptop
On the design page for PP 2007 it works well, but when I put it to "run" it only paints about 1/2 of the program. I have a new Toshiba laptop and have done other such Christmas designs on other machines. I am not certain about "resolution". On the menu bar it says resolution is 800X600. Does my monitor have to correspond to that resolution? What about those who receive it? thanks for your help. ...

Application Data redirection
I have a policy set to redirect users desktop and application data folders to a share. The test computer is windows XP running Office 2003. The odd thing is the folders are different on the servers vs what's on the local desktop. The server and desktop also have different files in the \Application Data\Microsoft\Outlook folder, which stores the users archive.pst file.\ The server has the following 2 files in the redirected folder Default Outlook Profile.xml Default Outlook Profile.srs The desktop has these files archive.pst extended.pst Is this behavior by default? Is there a way...

Problem killing a thread
Hello, I am creating a DLL that creates another thread and does its work. When I load the library, it calls CreateThread which spawns another thread. I am having a hard time terminating the thread. For some reason, when it runs DLL_PROCESS_DETACH, and executes TerminateThread, the thread does not terminate. Would anyone know what I could be doing wrong? It seems fairly simple. Thanks I have the following code: //////////////////////////////////////////////////////////////// long WINAPI Temp(long lParam) { int result; for(;;) { // my new thread } return 0; } BOOL APIENT...

script to count the number of mailboxes on all storage groups on a single mail server?
Gurus, Is there a script I can run which can count the number of mailboxes on all storage groups on a single mail server? i don't know about a script, but there are tools like csvde and ldifde that will allow you to create files with lots of fields that can be sorted on in Excel... "Spin" <Spin@spin.com> wrote in message news:3sfmg8Fo2luoU1@individual.net... > Gurus, > > Is there a script I can run which can count the number of mailboxes on all > storage groups on a single mail server? > > ...

Email Duplication for single user only
I have having a problem with a single user that is receiving a duplicated email off another user everytime its sent. This is the only one it happens too but it's consistent every time.The sender is only sending to one email address no aliases no cc, bcc etc. This is happening on MS outlook 02, pop3 accounts. within the network. ...

How to print one single record from a Report in Access 2007?
Is it possible to print a single record from a Report in Access 2007? Is it possible to print selected records (ex. Record 1,3, 7) from a Report in Access 2007? "hsmonsivais" wrote: > Is it possible to print a single record from a Report in Access 2007? > > Is it possible to print selected records (ex. Record 1,3, 7) from a Report > in Access 2007? By the way I am currently learning how to use Access. I would appreciate if the responses are not too technical. Thank You. ...

Problem with single user
Hi, I have a problem with a client where ibe user (out of 40 odd) can not receieve emails. She can send fine. Any mails that she receives stay in the Local Delivery queue. As I say, everyone else is fine. If I look at the event info in the tracking centre and view one of the emails I get the following: Message Submitted to Advanced Queueing Started Message Submission to Advanced Queue Message Submitted to Categorizer Message Categorized and Queued for Routing Message Queued for Local Delivery Message Delivered Locally to <email address> Message Scheduled to Retry Local Delivery...

Resizing an application
Hello, I want to put a limit on the minimum size that my application can be resized to. Any ideas on how to implement this? "Hamish" <h.dean@xtra.co.nz> wrote in message news:phLZd.10029$1S4.1061788@news.xtra.co.nz... > Hello, > > I want to put a limit on the minimum size that my application can be resized > to. Any ideas on how to implement this? > > Handle OnGetMinMaxInfo() in your mainframe and set the size there. See KB article HOWTO: How to Prevent Mainframe Window from Being ReSized http://support.microsoft.com/?id=133256 -...

AfxBeginThread hangs, but not when the application is being debugged
I have a very weird problem... In a dialog based app, when a button is clicked, I call AfxBeginThread() to create a new worker therad (not a UI one). The thread is created suspended, and after that started. The problem is that AfxBeginThread hangs every single time (both debug and release). It never returns. To make this even more weird, it never hangs while the debugger is attached, even though no breakpoints are set. I mention that I am absolutely sure that it is AfxBeginThread that hangs, I put some calls to MessageBox() and / or output to log files before and after it, so I am amsolutely ...

automate 5 lines in a single column to 5 columns across
I want to build a database. I've extracted some text from my group's phone directory. It comes out in one column with name on the first line, address on the second line, city, state, zip on the third line and phone on the fourth line. I'm trying to figure out a way to automate getting the info broken up into columns. I want to create a formula that will allow me to highlight 4 or 5 lines and then break those lines into 4 or 5 columns. My list has hundeds of names so cut and paste is a bit tedious. Is there such a way to do this? This should work with a single-block selection Sub...

Destryoing modeless dialog in a modeless thread causes deadlock
Hello there, I've created a user-interface thread to manage modeless dialog. I use it to display comforting "Please wait..." messages to the user while worker threads do lengthy operations (in this case, tasking robotics, but that's not important). So, here's a use case: The user initiates a long process by selecting a menu item. In the main GUI message handler, a worker thread is created to do perform the operation. The message handler returns. The worker thread creates a user-interface thread, which creates a modeless dialog. Any time the worker thread needs t...

Accessing tables in MFC application
Hi, I have a MFC application built on VC++ 2005.There are a few data stored in the table format in the application. I do not have source code access of the application and is given to me as exe. I want to access the data stored in the table cells . How can i do it.Please help me with answers on how i can do it or with some tutorials I can look for. regards, jis Unless the program exports automation interfaces to allow access, I think it is reasonably safe to assume there is no solution to this problem. "Table format" says nothing useful. What does Spy++ say about the table? ...

single space
how do I get my reports to print single space instead of double space? thanks, Tina Excel does not have a single or double space feature. What application are you using for your reports? Gord Dibben MS Excel MVP On Fri, 6 Nov 2009 13:18:02 -0800, Tina B <TinaB@discussions.microsoft.com> wrote: >how do I get my reports to print single space instead of double space? > >thanks, > >Tina Replace all the double spaces with single space. Give Cntrl+H and in Find What Box press space bar two times and in Replace with box press space bar once and press Replace All. N...

Drag n' Drop emails to a Java application
Hi, We are developing a Java application where we want to import information received in e-mails. The email client are Outlook 2003 (at least for now). The best way would be to be able to drag the e-mail to the Java app and then access/parse the e-mail in the Java app. I have searched the web but can not find anything useful. Do I have to use COM and/or OLE for doing such operations? Please help me!! Best Regards Joacim ...

Need single column/row of numbers to print down then across pages in order
I have a very long list of phone numbers that occupies a1,a2, so on. approx. 45,000 records. I need to be able to print hard copies of these numbers so that it stays in order from page to page but is not just one column. (as to cut the # of pages from 300 to 50 or lesss) In other words, start in the top left corner of page through to bottom, next row, and so on. I thought there would be a way to set this up in printing options but to this point haven't figured it out. I have the same list (1 row again) also in Access if it would be easier. Would VERY much appreciate any clu...

Excel application as an ERP platform for medium size production plan
I am interested in getting inputs about the option to use Excel as an ERP application for my plan, getting orders from cutomers, production control and so on. This application should enable 20-30 users to be involved in the process. Does some one has any experience for this kind of Excel usage ? Thanks, Adi. I don't have any experience regarding Excel and this but I can't imagine Excel would be a good program for this, any database must be better for these kind of things Regards, Peo Sjoblom "Adi" wrote: > I am interested in getting inputs about the option to...

Office, Office Applications, Versions and Statistics.
Hello MS Office Forum, I'm seeking information on MS Office usage by version. Something like a pie graph with percentages MS Office 2007, 2003, 2002 (XP), 2000, and dare I say even 97? Also a breakdown of specific MS Office applications (Access, Excel, Word, and the rest of them) and versions. Any website were I can find these statistics? I am (still) trying Google searches, I am sure the statistics are somewhere, I can't bring the results up in Google with search criteria as; MS Office Version statistics MS Office Version usage statistics MS Office Version usage...

Single/Multiple Column Report
I've searched through some of the past posts on this subject but cant find anything that seems to work. I have some data that I want grouped together (Job Number, Item, Activity, Qty., Etc.). There are anywhere from 1 to 5 employee names for the grouped data. I need the employee names listed horizontally underneath their respective record. I've tried the subreport option but can't make it work. Any ideas? Thanks! Hi I can't see your app so it may not be as simple as I think ?? But If you have a relationship between the people and job numbers then link them in the quer...

Deadlock Problem
Dear All i m using SQL 2000 i have following table structure create table mytab (Fid varchar(16) Primary Key, Picture_1 image, Picture_2 image, Picture_3 image, Entry_time datetime) Data base is hosted on a server with 2 quad core processors and 8 gb Ram. more than 200 user insert data into the table through a front end application more than 30000 records enter daily in this table. data base is in Simple recovery mode. user experience deadlock during this operation. there is no data fragmentation in the table as it is removed daily. How can the performance be increase...