Xref: utzoo comp.lang.c:12178 comp.windows.misc:650 Path: utzoo!utgpu!water!watmath!clyde!att!alberta!ubc-cs!uw-beaver!cornell!mailrus!uwmcsd1!nic.MR.NET!umn-cs!kehyoe From: kehyoe@umn-cs.cs.umn.edu (Ong Keh Yoe) Newsgroups: comp.lang.c,comp.windows.misc Subject: Mysteries of Microsoft Windows and C Keywords: Microsoft, C, Windows, MSC, Bugs Message-ID: <7050@umn-cs.cs.umn.edu> Date: 28 Aug 88 20:26:56 GMT Organization: University of Minnesota, Computer Science Lines: 67 Hello, I am currently debugging a package written for Microsoft Windows written in Microsoft C. And I would like to know some information about applications for Windows. First, some information about the application that I am working on. The application calls a second application using a spawnlp. The spawnlp kills the parent using an option for spawnlp. The first application provides a graphical menu-driven environment. The second application on termination then spawnlps the first application. Information to be shared are written by each application to two designated files. Each file created by one of the two applications and destroyed by the second. So fileA is create by applicationOne but destroyed by applicationTwo. And fileB created by applicationTwo but destroyed by applicationOne. First, I would like to know if anyone has experienced that lack of memory has ever caused programs to terminate inexplicably. It seems that the memory can easily contain both applications. If the spawnlp kills it's parent, should the resources of the parent be automatically freed ? And if not, why not ? Just what does a spawnlp that kills it's parent do and are there dangerous side effects ? Second, the second application terminates properly and spawnlps the first application, but the window manager behaves strangely at this point (menus popup that are whited out, information displayed at the border of the window is garbage, etc), has anyone experienced this due to a lack of memory, errors in window management, interrupts, etc. Any information or experience on this is appreciated. Or is the problem the application itself, e.g. writing in memory reserved for the operating system ? Sometimes, the second application terminates properly and spawnlps the first application, but the system crashes (you have to do switch off/ switch on to restart). Third, is it possible to use Codeview to debug these applications without significantly affecting the bugs produced (if these are produced by lack of memory, then Codeview is bound to affect them, correct ?). What are the net's experiences using Codeview to debug Window applications written in Microsoft C ? Fourth, is the Microsoft window programming environment a stable environment ? Is it reliable ? What are the best tools and methods of tackling strange errors ? E.g. Using codeview, Going into Window source (is this possible ?) Debugging at assembly level, Setting some obscure debug flags on ? We seem to think we know where the error is, but the consequences of the error (or errors) is so random, and the conditions that cause it so random, we are not sure. Any suggestions ? Lastly, we used a batch file to run the two applications. First it runs one. When that terminates, it checks for the presence of a file and runs the second and vice versa. It stops when the specified file is not created. But, this also seems to bomb. Yet, when both applications are running independently, there is no problem. Any explanations ? I appreciate any response to the above queries. My net address presently is 'kehyoe@umn-cs.cs.umn.edu'. Or post any of the solutions to the net if you cannot contact me. I wonder how many of you netters I have bored to death already. I hope this topic interests enough people. Thanks Keh Yoe (the happy hacker)