Sign in to follow this  
shabtronic

Help BCB 6.00

Recommended Posts

shabtronic    153

Hi All

I've got a problem with the Latest version of angelscript and borlands BCB 6.00 - I got it to compile (there were a few compile issues - but very easily fixed). It all worked fine - Building angelscript code exectuing e.t.c. - The problem happens when using the STDSTRING extension,

using strings in script works fine and it compiles and runs - the problem is that my EXE hangs when exiting back to windows - I've tried to track down the issue - but no joy yet - anybody got any similar issues?

 

I've tried the following scenarios:

 

RegisterScriptArray(Angel,true);
RegisterStdString(Angel);
 
Exe hangs when exiting back to window - even if my script code has no string usage
 
RegisterScriptArray(Angel,true);
//RegisterStdString(Angel);
 
Exe is fine and exits back to windows properly
 
//RegisterScriptArray(Angel,true);
RegisterStdString(Angel);

 

Exe hangs when exiting back to window - even if my script code has no string usage
 
I'm thinking it's some kind of STL Issue - but who knows?
 
 
here's the call stack from the hang
********************************
005599F2 _STL::__node_alloc<1, 0>::_M_deallocate
00532B94 _STL::__node_alloc<1, 0>::_M_deallocate
004ABC13 TForm2::~TForm2
004AD53B TForm2::~TForm2
00534D54 _STL::__node_alloc<1, 0>::_M_deallocate
0053409C _STL::__node_alloc<1, 0>::_M_deallocate
00533FFF _STL::__node_alloc<1, 0>::_M_deallocate
005196C3 __init_exit_proc
00519712 __cleanup
005189D4 _exit
005198E8 __startup
*******************************

many thanks

 

Shabby

 

p.s. anybody else trying to uses BCB 6.00 you have to change any of the macros that have a ; after them, bcb wont compile class with ; and no definitions.

 

from:

protected:
DECLARECRITICALSECTION(cs);

to:

protected:
DECLARECRITICALSECTION(cs)

 

and some of the object pointers have to be explicitly cast before the compile will swallow them (forget which ones - easy fix tho).

Edited by shabtronic

Share this post


Link to post
Share on other sites
WitchLord    4677

I think BCB may be choking on the string pool in scriptstdstring.cpp, though I have no idea why it would have trouble with it.

 

Try changing the AS_USE_STRINGPOOL in scriptstdstring.h to 0 to turn off the string pooling.

 

Regards,

Andreas

Share this post


Link to post
Share on other sites
shabtronic    153

Hi Andreas

 

Yes I tried that eariler, I changed the AS_USE_STRINGPOOL define, no joy tho :(

 

btw - thx for your awesome work Angelscript, my fav scripting lang by far!

 

 

 

Shabby

Share this post


Link to post
Share on other sites
shabtronic    153

Update to my problem

 

Investigating the problem further - it seems it's related to stl stringstream - it gets stuck in some sort of deallocation 

 

so I commented out anything to do with stringstream - which is a lot of the stdstring extension - and I get no hang - yaay!! but I also no fully working string - booo!!

 

I really don't understand the under the hood stl code - it's all voodoo to me, looks like the stream code is used for int/float to string conversion so I can easily work around it.

 

I'm guessing that it's a Borland compiler/STL port issue - I actually tested this and is completely a STL port issue (with a standalone exe - no angelscript) - nothing to do with angelscript :)

 

and easy fix for any other crazy folk using BCB 6 - is to enable

 

 # define _STLP_DEBUG_UNINITIALIZED 1

 

in STL's STL_USER_CONFIG.h 

 

no more windows hang - yaaay :)

Edited by shabtronic

Share this post


Link to post
Share on other sites
WitchLord    4677

This is exactly the reason why I'm staying away from STL within the core engine. :)

 

I'm glad you managed to figure out the solution. I'll keep a link to this thread for future reference.

 

 

However, BCB6 is more than 10 years old already. Any particular reason why you're still using it?

Share this post


Link to post
Share on other sites
shabtronic    153

Hi Andreas

 

>>However, BCB6 is more than 10 years old already. Any particular reason why you're still using it?

 

I know :) - I use BCB 6.00 for my really fast R&D work - the compiler is uber fast and the VCL component architecture is wicked and the portable install size is 30mb - for me it's the fastest way to do disposable native c++ R&D work.

Quite tragically I have to totally ditch it soon tho - since the debugger doesn't work in x64 :( 

 

Shabby

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this