Advertisement

Compiler Segfault When trying to assign value to array.

Started by June 27, 2010 12:59 PM
2 comments, last by _orm_ 14 years, 5 months ago
Easiest way to explain it is to put it into context.

class irc_event{	irc_event(irc_connection@ c) // this class automatically chops up the message	{		@conn=@c;                                // apparently the following code will make AngelScript segfault rather than throw an error		prefix=command=raw_string=params="NULL";	}		void set_prefix(string@ i)      {prefix=i;}	void set_command(string@[] i)   {command=i;}	void set_raw_string(string@ i)  {raw_string=i;}	void set_params(string@ i)      {params=i;}	string@ get_prefix()    {return prefix;     }	string@[] get_command() {return command;    }	string@ get_raw_string(){return raw_string; }	string@ get_params()    {return params;     }	irc_connection@ get_connection(){return conn;}   	irc_connection@ conn;	string prefix;	string@[] command;	string raw_string;	string params;}


Here is what GDB gave me.
Program received signal SIGSEGV, Segmentation fault.0x00000000004c35ab in asCCompiler::Error (this=0x7fffffffd940, msg=0x7b1fd0 "Can't implicitly convert from 'string' to 'string@[]'.", node=0x0) at ../../source/as_compiler.cpp:28302830		script->ConvertPosToRowCol(node->tokenPos, &r, &c);
I'll look into this. Thanks.

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
Fixed in revision 611. Thanks.

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

[entry:]void run(){	println("This should not segfault.");	string@[] arr;	arr="derp";}


Output:
>>> bugcheckASCRIPT-INFO: Compiling void run()  Section: /home/orm/.arad/scripts/commands/bugcheck.ang Line: 2 Col: 1ASCRIPT-ERROR: Can't implicitly convert from 'string@&' to 'string@[]&'.  Section: /home/orm/.arad/scripts/commands/bugcheck.ang Line: 6 Col: 6>e> Please correct the errors in the script and try again.>e> Command failed to build.>e> Not a valid command.


Fix confirmed.

This topic is closed to new replies.

Advertisement