Subj : Re: troubles locating bug To : borland.public.cpp.borlandcpp From : Gerhard Wolfstieg Date : Sun Nov 30 2003 05:45 pm Michael Beer wrote: > hello, > i work on a small editor for objects in a 2d- space, where every object > has its own properties. for manipulating those properties, i use a > non-modal dialogue. the problem i am writing about occurs when trying to > load that data from a file,that are the coordinates of the objects and > their properties. after loading the data klicking on any menu or dialogue > button causes termination of the program. in order to locate the code > lines responsible for it, i was recommended to use memproof. If you have bc 5.01, I don't understand why the advise was not to use CodeGuard. With this tool you can get non cryptic logs with source lines for many types of bugs. Something better does not exist. gw > That are the > results: while initializing the program, several dlls are loaded( seem to > be standart dlls included in all programs created with bcw 5.01 - i did > not include any at least) , and during that process there occur 2 messages > like: exception 1234 BREAKPOINT 1234 is that a possible source of that > error or just reporting 2 set breakpoints? then, after marking one file in > the standart file open/save dialogue and hitting the ok button, the > following message is reported eternally( until user interruption via > memproof): > > Exception C0000005 ACCESS_VIOLATION at 00248552 > ---- Exception stack trace ---- > 00248552 - _malloc in (0) > 00248E41 - in (0) > 00248E60 - in (0) > 002E6C68 - TEdit.LockBuffer in (0) > 002E729C - TEdit.IsValid in (0) > 002E6618 - TEdit.EvGetDlgCode in (0) > 002A16AB - U_LPARAM_Dispatch in (0) > 002A8420 - TEventHandler.Dispatch in (0) > 002D04A3 - TWindow.WindowProc in (0) > 002D05A3 - TWindow.HandleMessage in (0) > 002D062A - TWindow.ReceiveMessage in (0) > 002D05CB - TWindow.StdWndProc in (0) > 77E03EB0 - SetTimer in (0) > 77E055B5 - DefWindowProcW in (0) > 77E05A3B - SendMessageW in (0) > 77E17E17 - AttachThreadInput in (0) > 77E13BA7 - GetCursorFrameInfo in (0) > > how can i find out which of my source code lines cause that error? which > function threw that exception? if it has been a library function, how > could i fix the problem? is it possible, that the2 exceptions thrown > during initializing the program could prepare that error, and how could i > react then? if there is no way to figure out the location of the bug in my > source code with this information, what could i do to receive the > necessary information? is there any method to find those bugs? > > thank you > michael .