Re: How come: crash/no crash?
- Posted by Brian Broker <brian_broker at yahoo.com> Dec 29, 2005
- 432 views
Al Getz wrote: > > Bernie Ryan wrote: > > > > Al Getz wrote: > > > > > > Hello, > > > > > > Recently i was working with a program that uses the Win API and a > > > point structure. In my haste, i allocated the point struct > > > incorrectly as: > > > > > > ppt=allocate(4) --should be at least (8) > > > > > > The point struct was then used in a Win API call which loads it: > > > > > > retv=winapi_function_call(ppt) > > > > > > then the result is read into a sequence with peek's. > > > > > > Strange thing is, under Win XP Pro (sp1 OR sp2) the above code > > > *NEVER* crashed, while under XP Home it *ALWAYS* crashed. > > > > > > Al: > > What probably is happening is when XP Pro runs the program it runs > > the program in memory where there is a spot in memory that is > > has nothing located in it. so it just overwrites those > > extra locations. > > > > When you use XP Home the program is writing over a protected area > > that is being used by the OS. > > > > Bernie > > > > My files in archive: > > w32engin.ew mixedlib.e eu_engin.e win32eru.exw > > > > Can be downloaded here: > > <a > > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a> > > Hi Bernie, > > > Yes, that's probably it :) > Win XP Pro probably allocated more memory than Home did so it didnt trigger > an error, but this is BS if you ask me. I think they should both work > the same or at least XP Pro should have triggered the error too, because > this program was considered "fully tested" before shipping and when someone > ran it on Home it crashed right away...that's just nuts. I ran this program > many times on my own machine too which told me it was working. > How can we stamp a program "Fully tested" if there's a bug in it that > doesnt show up sometimes? That's lousy if you ask me. I understand > it's the fault of Windows and not Euphoria too. > So the mem manager of XP Pro must be different than the mem manager > of XP Home...strange if you ask me. There are enough reasons not to > like Windows, i didnt need another one (hee hee). > > > Al > > > My bumper sticker: "I brake for LED's" It's certainly not fair to blame any OS for programming mistakes. However, it may not be a programming mistake at all. The system that's crashing may have DEP enabled and that will generate a machine-level exception by just running Euphoria's own Win32 demo programs. DEP is Data Execution Prevention. To check the settings, open the System control panel, click the Advanced tab, click Performance settings button, click Data Execution Prevention tab. If you don't want Euphoria to crash, you should either have the first radio selected (turn on DEP for essential Windows programs and services only) or you will need to create an exception for your program if the second radio is selected (turn on DEP for all programs and services except those I select). I recently ran into this issue again and it was nearly impossible to debug. -- Brian