473,799 Members | 3,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Thread deadlock inside CString::AllocB uffer and sudden crashes


Jochen Kalmbach [MVP] wrote:
*Hallo rajayan!
Now that we are towards the fag end of the project, we are getting
occasiona
lly hit by sudden crashes where our top level exception handler is
not
even
able to come into play and create the required .dmp file. We also
are
seeing
deadlock cases like the link I have mentioned above.

Any chance you are using Terminate-/Suspend-/ResumeThread?

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/ *

Thank you for your reply. Yes we do. Could you please elaborate. Are
you referring to the CString::AllocB uffer related hangs or sudden
crashes

--
rajayan
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

May 1 '07 #1
1 2571
Hi rajayan!
>>Any chance you are using Terminate-/Suspend-/ResumeThread?

Thank you for your reply. Yes we do. Could you please elaborate. Are
you referring to the CString::AllocB uffer related hangs or sudden
crashes
Never ever call Terminate/SuspendThread!! !
Redesign your app!

See: Why you should never call Suspend/TerminateThread (Part I-III)
http://blog.kalmbachnet.de/?postid=6
http://blog.kalmbachnet.de/?postid=16
http://blog.kalmbachnet.de/?postid=17

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
May 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2496
by: Robert Wille | last post by:
I have an application that uses Postgres 7.2.3. It appears to deadlock fromtime to time. I'm not absolutely sure that it deadlocks, but I'm pretty sure because all of a sudden all my updates block, and my postgres processes are all idle. The strange thing is that my application never concurrently modifies any row (although it does modify multiple rows in the same table within a given transaction), so I don't know how this could happen, unless...
5
2003
by: Victor | last post by:
Hi everybody! VS.NET 2003 C++ MFC-SDI-Standard project. I would like to show some current info in the status bar of the SDI-Window. As long as I use the following code CStatusBar* pStatus = (CStatusBar*)AfxGetApp()->m_pMainWnd->GetDescendantWindow(AFX_IDW_STATUS_BAR);
11
9175
by: seattleboatguy | last post by:
I am trying to send a message from a visual c++ user-thread to the main window, so the main window can update text on the window to reflect what the user-thread is doing. I have tried 2 different approaches, and both fail. I don't know what to try next. +++++++++++++++++++++++++++++++++++++++++++++++++++++ APPROACH #1: (this approach makes the most sence to me) Configure the first parameter of the thread's PostMessage() to talk to the...
6
5817
by: Extremest | last post by:
I am new to threading and trying to figure some things out. Are all variables in a thread set to only that thread? Meaning if I create 2 instances of a class and then put each one in a different thread and run them will the local variables in functions be shared or will they be thread safe?
6
2366
by: robert | last post by:
I get python crashes and (in better cases) strange Python exceptions when (in most cases) importing and using cookielib lazy on demand in a thread. It is mainly with cookielib, but remember the problem also with other imports (e.g. urllib2 etc.). And again very often in all these cases where I get weired Python exceptions, the problem is around re-functions - usually during re.compile calls during import (see some of the exceptions below). But...
0
351
by: rajayan | last post by:
Jochen Kalmbach wrote: Thank you for your reply. Yes we do. Could you please elaborate. Are you referring to the CString::AllocBuffer related hangs or sudden crashes --
9
1867
by: cgwalters | last post by:
Hi, I've recently been working on an application which does quite a bit of searching through large data structures and string matching, and I was thinking that it would help to put some of this CPU-intensive work in another thread, but of course this won't work because of Python's GIL. There's a lot of past discussion on this, and I want to bring it up again because with the work on Python 3000, I think it is worth trying
4
1889
by: Jack | last post by:
Hi, In multi-thread programming, if I using smart pointers to store pointers to the same dynamically allocated objects, can memory leak be avoided? For example, two threads share the same dynamically allocated objects using smart pointer. The reference to the shared object is 2. If one thread crashes before decreasing the reference, then eventually the reference will still be 1, so the object will not be deleted. So this
1
2301
by: [david] | last post by:
What am I doing wrong? I'm trying to capture stdErr in a multi-threaded program. This code crashes wxPython with /Py Assertion Error: C++ assertion "m_count=-1 || m_count=-2" failed/ What I'm trying to do is redirect stderr and stdout to a wxPython text control. In an ideal world, when the worker thread crashes, I should get a stderr message, with no effect on the main thread.
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9546
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10260
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9078
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5590
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.