Jump to content
  • Advertisement
Sign in to follow this  
Violet CLM

Crash On Closing Modules With Shared And Funcdef

This topic is 708 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

Given the following file header.as,

funcdef void functype();
shared class classname {}

and two separate script modules that are both loaded by the application, in this order,

#include "header.as"
#include "header.as"
classname classinstance;

my application consistently crashes when the modules are closed. (Pasting the contents of header.as into each module instead of using #include doesn't make any difference, but this felt clearer.) Removing any of the lines prevents the crash. Loading (and therefore probably closing) the modules in the other order prevents the crash.

Edited by Violet CLM

Share this post


Link to post
Share on other sites
Advertisement

What do you mean by closing a module? Do you mean discarding?

 

Are you compiling the two scripts into two modules with different names, or are you reusing the module to compile one after the other?

 

Which version of AngelScript are you currently using?

Share this post


Link to post
Share on other sites

Yes, discarding:

if (ASengine)
  while (ASengine->GetModuleCount())
    ASengine->GetModuleByIndex(0)->Discard();

They are separate modules, as I said. Multiple calls are made to CScriptBuilder::StartNewModule.

 

2.31.1.

 

 

ETA: I tried running the application in debug mode and got two asserts, I guess during compilation: asASSERT(func->objectType == intfType); at line 2541 of as_builder.cpp, and asASSERT((asUINT)intfFunc->vfTableIdx == j); at line 3002 of the same file.

Edited by Violet CLM

Share this post


Link to post
Share on other sites

Hmm. I think the crash is gone now, but I'm getting other asserts in a complicated set of circumstances... I'll let you know when I figure out what's going on/a minimal test case.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!