Rohit, Another thing has sprung to mind. I remember having trouble with a custom component that I had built that allocated a timer. The resulting bugs were strange to say the least. Even though my component did not need (or indeed ever use) a window handle, I only managed to fix it conclusively by delaying the allocation of the timer proc, and the call to SetTimer until AFTER the wotsit that owned my component had finished its construction and had allocated its own window handle.
It was a bit of an ugly hack, but it got rid of the AVs, freezes and stack corruptions. Since AllocateHWnd needs a WndProc which is itself allocated by a call to MakeObjectInstance, you may be finding the same bug that I found. I am sorry that I can not be more specific, but once I made my code work, I stopped trying to find out why it hadn't worked initially. Maybe this helps, maybe not. Either way it gives you an excuse to lose even more hair. HTH Nearly bald Trevor ----- Original Message ----- From: "Rohit Gupta" <[EMAIL PROTECTED]> > Back to square 1. :-( > > We are having severe problems with our apps either freezing and > crashing a rather too regularly. It appears to be memory trashing. > We can replicate in a rather simplish app so we dont think we have > stuffed up... But everything and everybody's code is suspect.... > thats IBO, Borland and Windows. > > The frequency of error is proportional to number of threads, number > of memory allocations. Often it is so severe that the exception has > an exception and the stack is definitely trashed at this point. > > _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
