I’m working on a program which worked fine right up until yesterday. It
uses a library which I’ve written to access files in a particular
I added a function to the library yesterday and everything builds fine,
I even turned compiler warnings up to full to check for subtle problems.
However when I include the new library function in my test program it
crashes (‘access violation’) at the first printf. If I don’t use the
new function there’s no crash.
I’ve checked that it is printf that’s crashing, if I comment out the
first one the crash happens at the next (which is just printf("\n")),
according to Watcom’s debugger no printf code even starts to execute,
the crash is at the call to printf.
I had a look at the assembly as it executed and the crash occurs in the
‘push 00012084’ instruction which is executed immediately before ‘call
As a further question: why can’t I see the local variables in main() in
Watcom debugger. Other functions all have visible local variables but
main() just has an empty locals window.