Fix for Rayman 2 crash on Woods of Light and other levels - make DEP exception

Talk about Rayman himself and Rayman games!

Moderator: English moderators

Post Reply
deton24
Dora Dodemer
Posts: 748
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 5526

Fix for Rayman 2 crash on Woods of Light and other levels - make DEP exception

Post by deton24 » Fri Apr 05, 2019 8:35 pm

Hi. I recently encountered crashes during loading of certain levels in Rayman 2.
E.g. in Woods of Light, Fairly Glade, Whale Bay;
While Prologue, Sanctuary of Stone and Fire, Echoing Caves cinematic, The Menhir Hills PT1, worked.

The problem touched few other people, and while starting new game, it crashed on Woods of Light for all.
No matter of used game version (Uplay, GOG), renderer (DX6, Glide), sound drivers (w/ w/o dsound, w/ w/o A3D)
OS: W10 x64 (and posibly 8.x too)

Creating DEP exceeption helped to get rid of it.

I enabled debugger just in time in Visual Studio, and it showed:

Unhandled exception at 0x1DF31FF8 in Rayman2.exe: 0xC0000005: Access violation executing location 0x1DF31FF8

Nieobsłużony wyjątek w lokalizacji 0x1A7C1FF8 w Rayman2.exe: 0xC0000005: Naruszenie zasad dostępu podczas wykonywania w lokalizacji 0x1A7C1FF8.: wystąpił wyjątek

In programming jargon 0xC0000005 means more or less, access violation.

After some research i found some posts about 0xC0000005:
"0xC0000005 is the code for an access violation. It happens when you access (read or write) an address that is not mapped to any physical memory or is protected (tried to write to read-only memory, for example). In this case your program tried to access 0x02fffdd8. The address 0x02fffdd8 is most likely just past the end of a heap block or just before a large mapped buffer.:"

On other issue:
"The problem here, as explained in other comments, is that the pointer is being dereference without being properly initialized. Operating systems like Linux keep the lowest addresses (eg first 32MB: 0x00_0000 -0x200_0000) out of the virtual address space of a process. This is done because dereferencing zeroed non-initialized pointers is a common mistake, like in this case. So when this type of mistake happens, instead of actually reading a random variable that happens to be at address 0x0 (but not the memory address the pointer would be intended for if initialized properly), the pointer would be reading from a memory address outside of the process's virtual address space. This causes a page fault, which results in a segmentation fault, and a signal is sent to the process to kill it. That's why you are getting the access violation error."

I'm curious why the problem suddenly appeared. Everything worked before.

Seems like no one resolved the problem in other threads in the net, so I leaving the info.

Cheers

Post Reply