3
votes

I am receiving an access violation after I recompile a certain unit (MyClass) unless I do a clean. The error is clearly a call to a null object (Write of address 00000000), but when I try to step to it, the compiler won't allow me to step into the code where I think the error is occurring. (Inside a method on the same object. When i trace into the method, there error after hitting trace into but before going to the line of code.) This happens in a used unit of MyClass, rather than MyClass itself.

The weird thing is that if I do a clean (or build) and then recompile, the program runs fine. Any reason this would happen?

Update

The application uses several threads created via the AsyncCalls library. I use several TEvent and TMultiReadExclusiveWriteSynchronizer objects to keep processes ordered and resources protected. Does any special care need to be taken when creating or freeing such objects?

1
may on the disk be mseveral copies of xxxxx.pas ? you can try to trace in CPU Window even if debug info was missedArioch 'The
Are you using multiple projects against the code base? Or change project options such as compiler directives?Steve
@Arioch'The I have verified that there are no duplicate XXX.pas in any of my source directories. What would I look for in the CPU window to be helpful?Eric G
@Steve Only one project on the code base. I don't recall making any changes except to turn off optimizations on the debug build.Eric G
nothinng, just if those functions are simple and mostly are using other functions, then asm code can be debugged too. Not that comfort as pascal code, yet possible. Since exe is monolithic it is very strange that only SOME units lack debuginfo. But i dunno what is special about them. As a blind shot you my find your exe in view / debug / modules and issue "reload symbols" on it. That sometimes helps with BPLs but never heard of such trouble with single EXEArioch 'The

1 Answers

1
votes

Please check the Output-Path in Project-Settings. Set an Output-Path (e.g. ".\$(Config)\_dcu") for compiled Units and then check again.