Jump to content
  • Advertisement
Sign in to follow this  

Crash on restoring #2

This topic is 3027 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Revision 672.
Crash occurs on restoration of modules that use the same interface.

Access violation reading location 0x00000008.

Call stack:
FOserv_AS_672.exe!asCScriptFunction::AddReferences() + 0x3c
FOserv_AS_672.exe!asCRestore::Restore() + 0x54f
FOserv_AS_672.exe!asCModule::LoadByteCode() + 0x4c


0051A92B lea ecx,[ebx+24h]
0051A92E call asCDataType::IsObject (501B60h)
0051A933 test al,al
0051A935 je asCScriptFunction::AddReferences+41h (51A941h)
0051A937 mov ecx,dword ptr [ebx+28h]
0051A93A mov eax,dword ptr [ecx]
0051A93C mov edx,dword ptr [eax+8] ; crash here

Corresponding line in the source:

as_scriptfunction.cpp:436 parameterTypes


Similar thing occured with rev 670 and 669, with different place of crash. By adding some debug printing of function on which the crash occured, it appears that it's a problem with asCModule::ResolveInterfaceIds() (return type of my function gets scrambed after this is called in Restore()).

Reproducible example - two modules, both containing the same code:

interface ITest
ITest@ test();

class CTest : ITest
ITest@ test()
return this;

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!