Win98SE vs. Win2K error 
Author Message
 Win98SE vs. Win2K error

I have two apps that work fine in Win98SE+.  Both fail
with a bad memory access in Win2K.  However, this only
occurs is I'm executing the .exe file (debug or release).  
If I launch by using debug->go it runs.  

Basically, I can allocate a certain number of objects and
then I get the failure.  This is occuring during
initialization, not runtime, and all the objects are
initialized identically, yet I cann only allocate 1000
objects and then I get a mempory access failure. This
seems to be a memory allocation problem because as I
adjust the amount of memory per object by removing
variables from the objects being created, I change how
many total objects I can create.  Also, it is not a
particular variable as changing which variables I remove
doesn't change the result.  This cannot be a "running out
of total memory" problem because go->debug should actually
take more total memory than executing the ".exe".

Does this description make any sense and/or does it ring
any bells?

Thanks for any help,

Doug Donalson



Fri, 11 Mar 2005 14:11:55 GMT  
 Win98SE vs. Win2K error


Quote:
> I have two apps that work fine in Win98SE+.  Both fail
> with a bad memory access in Win2K.  However, this only
> occurs is I'm executing the .exe file (debug or release).
> If I launch by using debug->go it runs.

> Basically, I can allocate a certain number of objects and
> then I get the failure.  This is occuring during
> initialization, not runtime, and all the objects are
> initialized identically, yet I cann only allocate 1000
> objects and then I get a mempory access failure. This
> seems to be a memory allocation problem because as I
> adjust the amount of memory per object by removing
> variables from the objects being created, I change how
> many total objects I can create.  Also, it is not a
> particular variable as changing which variables I remove
> doesn't change the result.  This cannot be a "running out
> of total memory" problem because go->debug should actually
> take more total memory than executing the ".exe".

> Does this description make any sense and/or does it ring
> any bells?

Most probable cause of the error is an invalid pointer
access. Second most probably is invalid parameters
passed to API functions.

Win98SE, in order to allow older, badly behaved
apps to run, ignores a lot of bad pointer use and invalid
parameters passed to APIs, at the cost of system
instability.

WinNT validates more parameters and pointer use,
and shuts down those applications hard. Win2K
tightened up on the normal NT restrictions even
further. MS added additional parameter validation
and started validating parameters in kernel mode
drivers as well.

Since variables are initialized differently in debug
builds, the errors in the code are masked and
don't trigger an error.

Build the release version with debugging information
and try debugging on Win2k. FWIW, this is one
reason why MS recommends developers design
on NT/2K/XP rather than 9x versions of Windows.



Fri, 11 Mar 2005 18:09:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DLL Hell - Running apps on both Win2K and Win98SE

2. cannot run VC++ 6 on win2K/win98SE

3. DLL Hell - Running apps on both Win2K and Win98SE

4. Win2K vs Win98

5. Microsoft Communications control vs WIN2K????

6. TEXT CONSOLE MOUSE EVENTS WIN98 VS WIN2K

7. RegQueryValueEx WinME vs. Win2k

8. Keyboard hook Win98 vs Win2k

9. Win2K: static background color vs. CFormView background color

10. My MFC app having errors on win2k

11. not able to kill Exe server...giving access denied error in Win2K

12. Error 0x80070005 in Win2K service

 

 
Powered by phpBB® Forum Software