|
Hi All,
I'm Having trouble with this message "User breakpoint at 0x.." (some memory location) during the debugging of my project, even when i do not have any breakpoints in my project, and lands me between mysterious assembly code.
Does anyone understand what this message means???And if yes, then how to get rid of this??? This has been very aggravating for me for the last couple of days. It would not let me debug my actual program.
Any suggestions are welcome. Thanks for your time.
Sean
|
|
|
|
|
This is the message you get when the instruction pointer lands on an int 3. This is a single-step trap, or user breakpoint, which you can code in VC with _asm int 3; .
Typically, debug builds use padding to allow space for things to grow, enabling incremental linking and such. And what sort of data would they use for such 'padding'? You guessed it, int 3!
You may even not have stumbled into this kind of padding - I think there is code in some of the debug heap allocations that will force one of these. I'd suggest viewing the call stack <alt-f7> and seeing just how you got there.
Wish I could remember an example. Two things you might try are rebuild all and seeing if a release build has the same problem.
|
|
|
|
|
as far as i know when this happens to me it means that i've caused a memory access violation by writing over memory i haven't allocated or trying to free a null pointer before it is allocated to a block of memory
in release builds you get a system message and the app closes ... check your allocations and make sure you're not writing to more than you have allocated ... also check all your pointers are assigned to a valid memory block before accessing what they are supposed to point at
usually in the output window you get a "first chance exception" message generated too
have fun
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Hi Sean,
When writing code in VC++ you can manually insert DebugBreak()'s. This can be very useful at times for unexpected situations like MessageBox("Should not get here ") and other crap things.
However it sounds like you have one of these being included somewhere in your code. The most likely case is a debug library, if you are using supplied libraries and are including the debug version you should also include the .pdb and the source code. If you don't have these then either the DebugBreak was left in by accident and you should just use the Release version. There is a chance that it was put there on purpose so just to be sure you should bring up the CallStack window and look back to where your code ends (and the assembly starts) and verify your parameters.
If you don't have a Release build and can not arrange to get one then you can attempt to hack the binary. This is a LAST RESORT. You can open the lib in VS however you are going to have to locate the DebugBreak and replace those instructions with noops. But make sure you COPY the lib first!!
The other possible location is in included code. Sometimes VS needs to have the code added to the project before it automatically goes there. If you can navigate down your include tree and add all these things then you might get taken to the line of code. Then you can either fix the problem (what ever it is) or comment out the DebugBreak() and making a note to restore it later!
Jules
|
|
|
|
|
Thankyou everyone for the comments and suggestions.
After reading all of your comments, looking more carefully at my call stack and the situations when i hit this "User breakpoint..", I removed all the PostMessage() WINAPI function calls in my project and the "User Breakpoint..." problem is GONE. Maybe i was calling this function with bad Data.
It seems to me that the "User Breakpoints" are set in the Windows .lib or .dll files(ntdll, kernel32, user32 etc.) in the form of DebugBreak() statements. Am I Right???
But what i still do not understand is why are these DebugBreak() statements present in the Windows API? How can i look at the .lib or .dlls to find these DebugBreak() statements?
Thanks Again for your time.
|
|
|
|
|
Does anyone know how to actually see how much memory Win2k and all processes are using? I like task manager however when I add up the "Mem Usage" column it never equals the "Mem Usage:" in the Task Manager Status Bar. So my question again is, if Task Manager says in the Status Bar "Mem Usage: 135424K / 307728K" where can I go to see who's hogging the memory? I've played with pview.exe and it's ok but very cryptic. I know something in Win2k has a massive memory leak especially since installing MS.Net Beta 1. And I'm tired of rebooting to reclaim my memory. I've also tried utilities like MemTurbo2.0 but that just seems to take the ram it freed up and put's it in the swap file. Any help here would be nice.
|
|
|
|
|
i'm on thinnish ice here but my understanding of the task manager memory view only reflects static memory allocations for each of the apps it lists ... if an app allocs memory dynamically it won't show in that list all of the time ... if i got this wrong someone please correct me
also using a beta 1 of anything is guaranteed to have problems and memory leaks is one of the usual suspects ... specially considering the automatic garbage collection features that might just be as finely tuned as they could be at this release version
you should also check what apps you have running at startup and try not running each of them to see if the memory usage goes down drastically ... it might just be that some other company's software has bugs in it besides microsoft ... stranger things have happened
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Thanks for your response. I'd agree with you about beta 1 if I were only seeing the problem when or after I ran it. However that's not the case. The only other part of beta 1 that may be causing the problem is that it had some huge "windows component update". That my definitely be causing the problem. I've also looked at my startup apps etc and see no problems. so i guess by your response you dont know how to see how much memory is allocated and who is allocating it? That's what I want to drill down on. If i can see that it's some some m$ thing then i have to rebuild, if it's something else i can just uninstall. what's weird is it's unpredictable so far. when i boot i'm using around 95mb of ram, a little while later i'm up to 130mb, a while later i'm at 170mb and it's time to reboot.
|
|
|
|
|
Something to keep in mind is that the apps are not the only thing using memory. The OS itself uses memory.
If you look on the performance tab of the NT TaskManager, you'll see a few things that are important:
Physical Memory-> File Cache. This is the amount of physical memory allocated to file cache. This number is not included in the MemUseage because. Also, look at Kernel Memory. This is the memory being used by the kernel and all installed drivers. This must be included in your memory calculations.
For instance, on my system, total memory allocated is 73928K. Kernel memory is 29868, and the apps listed in TaskManager add up to 43168. Together, these numbers add up to a number very close to all memory allocated. The remaining memory is the memory below 1MB system area (which is still retained for compatibility reasons.
|
|
|
|
|
Actually, my first response was not quite correct.
In the Task Manager Performance tab, You'll see several things.
Commit Charge is the total amount of *VIRTUAL* memory allocated, which is also the number in Mem Useage. Virtual Memory does not include non-pageable memory. Thus under Kernel Memory, you see Paged and Nonpaged. Paged memory is included in the Virtual Memory count, Nonpaged is not, nor is the memory listed in Physical Memory (Including File or System Cache).
Now, you'll notice a discrepancy between adding up all your processes and your paged kernel memory. This number might indicate more or less memory than you actually have allocated. The reason for this is that there are other factors which influence total virtual memory allocations. For instance, you might have shared memory. This memory is counted twice in the process list, but only once for total Commits. Or there is sometimes memory which is not allocated to a specific process or the kernel.
In any event, you can't accurately monitor memory from Task Manager for a variety of reasons. You should use Performance Monitor under the Process section.
|
|
|
|
|
I had use properties sheet and properties page to create a Tab thing, but I can't change the tab's name!!! Anyone know how to change tab's name??by code?
|
|
|
|
|
Take a look at Zafir Anjum's article 'Changing the Tab Label' on http://codeguru.earthweb.com/propertysheet/change_tab_label.shtml. Hope this will help you.
Olaf
|
|
|
|
|
Anyone know how to change the dialog's caption by code????
|
|
|
|
|
Euh... SetWindowText ?
|
|
|
|
|
I am writing an ISAPI extension that will take one image and overlay another on top of it and stream it to the browser. Does any one have any ideas as to how to go about this.
I have the Image streaming to the browser with no problems.
I am opening the image file and reading it into a CByteArray and streaming to the browser.
If any one has any helpful ideas I would be most appreciative.
Thanks in advance,
SR
|
|
|
|
|
what kind of image overlaying do you want to do? are you combining say 2 jpg's? do you need tranparency or blending? these and other questions make a difference but ...
basically create a mem dc for each image and blend or whatever them into a third mem dc before streaming them ... there are libraries out there to do this stuff but its not so hard to do a fairly good job relatively easily ... directx has some very cool blending stuff in it but you'd have to have it installed on the server which maybe you dont
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
I have an application that has two Document Type that are very similiar. Without adding additional Frame resources is there a way when creating a document to tell the Document to use a different icon other than supplied in the frame?
|
|
|
|
|
I would like to select a row and popup a context menu when the user right-clicks any row. I can get the menu to popup, but selecting the row first is proving to be a bit tricky.
Any help or ideas would be highly appreciated.
Thanks,
Jason
|
|
|
|
|
I have used the code of p.j.naughter for sending mail
can some one help me with setting the content-type to text/html
Thanks in Advance
Regards
Alpesh Makwana
|
|
|
|
|
Hi,
I want to get current domain name. I work in visual c++ 6.0
Can anybody help me, please?
Best regards
|
|
|
|
|
Hi,
Currently I'm using a CListCtrl with about 4 columns. When I select an item, only the first colomn of that row changes color. I'd like the whole row to be selected. How do I do that? Do I have to create a new control or did I just mis a style property?
Thanx,
WimB
|
|
|
|
|
Try this:
mylistctrl.SetExtendedStyle( mylistctrl.GetExtendedStyle() | LVS_EX_FULLROWSELECT ); HTH,
Thomas
I am a signature virus!
Help me spread and copy me to your sig!
|
|
|
|
|
That depends entirely on which version of the common controls you're using.
If you can guarantee (or at least require) that they install IE4 first, then you can use the LVS_EX_FULLROWSELECT style, but if it has to run on even the first version of Windows 95 without upgrades, then you must create an owner drawn listbox.
|
|
|
|
|
Does CoCreateInstance have a timeout feature? If my server is unavailable this call can take up to 2 minutes to return an error. I would like to return an error within 5 seconds or so.
Thanks
|
|
|
|
|
i would imagine the timeout is the network timeout for an unavailable resource as opposed to the cocreateinstance timeout ... as far as i know there is no way to speed up the os finding out what connections are or arent available ... if anyone knows better please correct me 'cos i'd love to know too
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|