Advertisement

assert in asCCompiler::Dereference

Started by January 03, 2005 05:49 AM
2 comments, last by abrken 19 years, 10 months ago
Hello, This is an assert that I felt into. First, I felt into this assert because my script plugin wasn't loading and so, some class weren't referenced. Loading a script (that was using those class of course !), I get an assert failure on an equal statement. this assert occurs in file as_compiler.cpp in function asCCompiler::Dereference in the last else that raised an assert. The type->dataType.GetSizeInMemoryDWords() returned 4. This is the script that is causing the assert :

	CStringArray	csaCommunicators;
	CString 	csBornetteId,
						csBornettes0,
						csBornettes1;
	int				iLoop;

	for (iLoop = 0; iLoop < barBornettes.GetSize(); iLoop++) {
		CBornette *pBornette = g_BornetteGestionnaire.GetBornette(barBornettes.GetAt(iLoop));
	
		if (pBornette != 0) {
			if (pBornette->GetCommunicatorId() == csaCommunicators.GetAt(0)) {
			}
		}
	}

the assert happen at the "if (pBornette->Get ...." Note that csaCommunicator.GetAt(0) return a CString (declared as CString GetAt(int) ). Also note that angelscript is telling this at compilation time :

MaNouvellePage_MOUSE_0 (42, 3) : Error   : Identifier 'CBornette' is not a data type
MaNouvellePage_MOUSE_0 (42, 26) : Error   : 'g_BornetteGestionnaire' is not declared
MaNouvellePage_MOUSE_0 (42, 48) : Error   : Illegal operation on 'int&'
MaNouvellePage_MOUSE_0 (42, 26) : Error   : Can't implicitly convert from 'const int' to 'int*'.
MaNouvellePage_MOUSE_0 (45, 17) : Error   : Illegal operation on 'int*&'
//
// The exception is then raised and ignored, the compilation continue
//
MaNouvellePage_MOUSE_0 (45, 39) : Error   : Both expressions must have the same type

Of course, if the plugin is correctly loaded, the assert dissepear. I have made the test first in 1.10.1b then I have test it with 1.10.1c with the same result. Thank's for any reply. AbrKen.
I'll look into this. Thanks for letting me know.

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

Advertisement
I'd just like to let you know that I didn't forget about this bug. I've now found and fixed it.

I will upload version 1.10.1d as soon as possible with this bug fix as well as others found during the development of 2.0.0. Some of the issues found during the development can't be fixed and will be noted as known issues (they are minor and can be worked around). It will all be available on the site soon.

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

Very good news !

Actually I'm ill and not working on computer anymore but soon I'll be back to test 1.10.1d next week.

It's good to see that your'r supporting so well the 1.x version of angelscript.

Regards,
AbrKen.

This topic is closed to new replies.

Advertisement