|
|
|
Thousands of people use my program, and about every week a crash report is sent to me with the same details. Here's a picture showing the info from WinDbg: http://www.igx89.com/crash1.jpg[^]
(LogString is bound to an Edit Control using DDX_Text)
I can't figure out why that crash would be happening, and would greatly appreciate any help given to me.
|
|
|
|
|
ive had some problems concatnating cstrings in some programs... i never figured out y, but it happened very often, cause it was in a function used many times per second. The same code in another part of the program worked fine! The stupid part was that if i added some code in the same funtion, the problem disapeared! Seemed like a compiler error, maybe because of optimizations
|
|
|
|
|
The second use of + on that line appears to have faulted - you haven't shown the disassembly of ATL::operator+ , but if my copy of VS.NET has generated similar code, it looks like you've trashed the second argument, LogString . You probably have a wild write somewhere in your program.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
The only place where that variable is accessed is in the DDX call and in the function shown, so the variable should always be valid. I could probably work around the problem by using strcpy and strcat functions instead, but I'd rather discover the root of the problem so I don't have to worry about bugs like this popping up again in the future.
|
|
|
|
|
I assume LogString is a member of the CFLModManager class.
I don't think your problem is with a legitimate access; I think something else is corrupting the object. Possibilities I can think of are: you're using the CFLModManager object after it's been deleted (if you're using new/delete to manage the object), or from another thread or routine outside the scope of the function that declares the object (if it's a local variable), or that you have an unbounded ('wild') write somewhere which is overwriting the memory used by the LogString object.
The first two cases are relatively easy to check for. The last really requires examining every memory access in the program that could possibly coincide with the life-time of the dialog box. You can help yourself out a little by putting a data breakpoint on the LogString member and see when it changes. Specifically, it appears to be the m_pszData member that's been corrupted.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Yes, it's a member of the main dialog class, CFLModManager. I don't see how the first case would be possible; the second case might, I guess, but I just have one other thread, and it just communicates using SendMessage to the main thread's window. I'll try changing it to PostMessage (not sure if that'll do anything), and increasing a couple buffers that aren't CString's (I doubt they're overflowing, but just to be sure).
What makes this crash so hard to debug is that I can't duplicate the crash, and it rarely happens to my users; ~1 crash a week (auto-reported) out of 10,000+ downloads. Fortunately, because it's so rare, it won't be that big of deal if I can't fix it; I don't think it's happened to the same person more than once.
|
|
|
|
|
Is your Log() function called from its own thread or from multiple threads ?
One chance for the err can be :
In your code each time you concat CString the heap has to be locked/unlocked multiple times.If this is hapenning from multiple threads it again induces context switching.
Note:
CString is not supposed to be shared between threads.
It's not a bug, it's an undocumented feature. suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
Hi all,
My application needs to know if it's running through remote desktop, to optimize graphics and stuff for low bandwitdh connections.
Question:
How do i automatically detect that the user is running my app through remote desktop?
Thanks in advance!!
|
|
|
|
|
Maybe this function works:
GetSystemMetrics( SM_REMOTESESSION );
which returns a bool indicating wherever the user is using RD... havent been able to test it yet...
|
|
|
|
|
works, but the compiler refused to accept the SM_REMOTESESSION value, even including "winuser.h", where it is defined. So, i just passed the value 0x1000
I know its a bad policy, but im not going to waste a lot of time with compiler sh$t.
|
|
|
|
|
Define WINVER to be 0x0500 before including any headers (typically in StdAfx.h), and ensure you're using a relatively recent Platform SDK (the headers included with VC6 don't have this definition).
You can consider this a 'safety guard' to stop you accidentally using a feature not supported on older systems.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I think you have the right idea, but be careful, it just means it probably isn't supported on older verions (e.g., Windows Nt 4.0.) You could follow the suggestion to change your platform version and recompile, but I'm not sure if that means your app will fail to work on older platforms. I haven't risked it.
"Fish and guests stink in three days." - Benjamin Franlkin
|
|
|
|
|
No problem! My app is only supposed to work on win2000+.
I know that in previous versions that might not work...
|
|
|
|
|
|
The URL and text do not match.
Have you considered the possibility that no one here knows of a solution for you? It's just a thought to consider.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
toxcct wrote:
ahahah, yes it does
No, the text was http://www.codeproject.com/script/comments/forums.asp?forumid=1647&fr=351&select=816840&msg=816840#xx813863xx while the URL was simply http://www.codeproject.com/script/comments/. Click on it and you'll see the problem. Your browser should open to an about:blank window.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
ok, but if you read my post to the end, you might understand (i hope) where vietdelphi was wrong :p
TOXCCT >>> GEII power
|
|
|
|
|
Connection.Execute has a known memory leak problem. However this is corrected with new MDAC. Download latest MDAC from microsoft and check whether it disappears
It's not a bug, it's an undocumented feature. suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
Thanx you for all. And Sorry!
I´ll try with MDAC 2.8
|
|
|
|
|
ElitePCGaming is the best pc gaming site you will ever lays your eyes on... and they have no idea who i am, just call me an anonymous spammer! for 2 dollars ill spam your site too!
ElitePCGamer rocks your socks off
|
|
|
|
|
Sad thing is...this technique just worked on me
I can't help it...it's like a car accident...I just had to look...
To be honest it was a nice site, but i'm not a gamer so it's ultimately pointless for me...
Quick question though...if no one knows who you are how am I suppoesed to give you 2 bux??? Why don't you send me your details like address, fname, lname, CC number, etc...
Cheers
How do I print my voice mail?
|
|
|
|
|
Hope I don't thing any Intresting there!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|