Pelles C forum

Pelles C => General discussions => Topic started by: vic_mc on November 26, 2012, 11:40:51 pm

Title: strange app shutdown
Post by: vic_mc on November 26, 2012, 11:40:51 pm
I have 2 computers, one Dell notebook and 1 Acer desktop.  I created a app using BCX/PellesC and works fine on the Dell and copied over to the Acer and works fine until when I shut it down and I get a Windows error that the app has quit working, please shut it down?

Never see anything like it and have now idea what is problem.  Anyone got any ideas?

Thanks,

Vic
Title: Re: strange app shutdown
Post by: CommonTater on November 26, 2012, 11:50:56 pm
We're going to need a lot more information than that...

Console or GUI?
How are you shutting it down?
What versions of Windows are your machines running?

and so on.
Title: Re: strange app shutdown
Post by: vic_mc on November 27, 2012, 12:17:11 am
Sorry, I realized need more info,

Both Vista Home Premium, Service Pack 2, same versions, etc., GUI and tried console window too. shuts down with exit menu item and both close on x right top and close on top left of window.  I have compiled with same PellesC, same version, same BCX version, still same problems.

Vic
Title: Re: strange app shutdown
Post by: CommonTater on November 27, 2012, 05:43:09 am
Beats me... I've never had a problem like that...
Title: Re: strange app shutdown
Post by: Stefan Pendl on November 27, 2012, 10:24:49 am
Seems there is something corrupting the return value or any memory your application uses.

In some cases Windows might expect your application to be an installer, but it doesn't create an uninstall entry, so it assumes there was something wrong.

What does the Windows event log tell you?
Title: Re: strange app shutdown
Post by: vic_mc on November 27, 2012, 02:46:35 pm
Thanks Stefan for replying.  Here is the log, but how can read and understand it?

Fault bucket 3275205062, type 1
Event Name: APPCRASH
Response: None
Cab Id: 0

Problem signature:
P1: xIDE.exe
P2: 0.0.3.0
P3: 50b38296
P4: xIDE.exe
P5: 0.0.3.0
P6: 50b38296
P7: c0000005
P8: 0003f2c4
P9:
P10:

Attached files:
C:\Users\SlickII\AppData\Local\Temp\WER12AF.tmp.version.txt

These files may be available here:
C:\Users\SlickII\AppData\Local\Microsoft\Windows\WER\ReportArchive\Report18333e32
Title: Re: strange app shutdown
Post by: CommonTater on November 27, 2012, 03:36:21 pm
Notice P7 ... C0000005 ...  that is the error code for attmpting to access protected memory...

These errors usually come up when trying to do stuff with NULL or uninitialized pointers or writing 128 characters to a 64 character buffer... 

http://blogs.msdn.com/b/calvin_hsia/archive/2004/06/30/170344.aspx

Check the final steps of your program as it closes down...

I'd also guess the Acer has "Data Execution Prevention" enabled for all programs but the Dell does not...
Control Panel -> System -> Advanced System Properties -> Advanced -> Performance -> Settings -> Data Execution Prevention ... 

Title: Re: strange app shutdown
Post by: vic_mc on November 27, 2012, 04:23:07 pm
Thanks, Tator, I'll check that.

Vic
Title: Re: strange app shutdown
Post by: CommonTater on November 27, 2012, 05:07:54 pm
Thanks, Tator, I'll check that.

Vic

FWIW ... you actually want it on... especially when debugging code.
Title: Re: strange app shutdown
Post by: vic_mc on November 27, 2012, 05:40:35 pm
Turned on for both computers...

Vic
Title: Re: strange app shutdown
Post by: Stefan Pendl on November 27, 2012, 09:19:43 pm
I would enable DEP only for essential Windows programs and services.

I never had a need to enable it for anything else.
Title: Re: strange app shutdown
Post by: CommonTater on November 27, 2012, 09:57:14 pm
I would enable DEP only for essential Windows programs and services.

I never had a need to enable it for anything else.

Although it has little impact on well behaved software... DEP is one dandy good way to find stuff like software that modifies itself and overruns buffers... Almost better than some of the common AV scanners.  There's no harm in running with it off if you're reasonably sure your system is stable.

Title: Re: strange app shutdown
Post by: Stefan Pendl on November 28, 2012, 10:06:51 am
In many cases the CPU has already DEP capabilities build in, so software DEP is no longer needed.