scriptstring problems

Started by
1 comment, last by AlphaDog 18 years, 2 months ago
I was having some problems with scriptstring assignments throwing 'Null pointer access' exceptions in some of my scripts and decided to try to isolate the problem , and started with running the test_scriptstring.cpp in test_feature. The test failed with 'TestScriptString: ExecuteString() failed' When I dug a little deeper I found that int r = engine->ExecuteString(0, "print(a == \"a\" ? \"t\" : \"f\")"); was the line that failed. So I passed in a reference to a pointer to a context and printed the exception: func: void @ExecuteString() modl: sect: @ExecuteString line: 1 desc: Null pointer access Is anyone else seeing this, or does it have something to do with my build. I'm using '2.5.1 WIP 1' but I got the same results in 2.5.0. And I am building it on MSVC 8.0 and running on WinXP SP2. Can anyone test this to see if they are seeing the same behavior. I'm wondering if it has something to do with hidden temporaries, because something like: int r = engine->ExecuteString(0, "print(\"test\"+\"test\");"); Causes the same exception.. But something like this: int r = engine->ExecuteString(0, "print(10+\"test\");"); Does not.. Thanks, ~Scott
[size=1]'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'
Advertisement
This looks like the exact same bug that I fixed with version 2.5.0b. Have you tried that version yet?

Microsoft changed the implementation of std::string for MSVC8, and this allowed me to find and correct this bug in AngelScript.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Thanks again Andreas, that was it 2.5.0b solved the problem..

~Scott
[size=1]'Behold! It is not over unknown seas but back over well-known years that your quest must go; back to the bright strange things of infancy and the quick sun-drenched glimpses of magic that old scenes brought to wide young eyes.'

This topic is closed to new replies.

Advertisement