c++ - Fatal signal 11 error in Cocos2d-x Android pass a variable to a global variable? -


I defined a global variable outside of the formatting in the .cpp file. Like the rule below, I want to pass a variable for the rules in SetRulesFunc . But I got the error

  Fatal signal 11 (SIGSEGV) 0xe72d2d24 (code = 1), thread 26592 (thread-61675)  

. Does this have the right to do? I found that if the extreme passage to pass the rules is small, then it is all right. But the error occurred when the variable was too late. I got the "libc deadly signal 11" error.

My environment: Cocos 2D-X 2.1.5, the use of Android application NDK

CLuaScriptReader.cpp

  #include "LuaScriptReader.h "String rules; CLuaScriptReader :: CluaScriptReader () {...} CLuaScriptReader :: SetRulesFunc (CCString * Rules) Cancel {CCLog ("SetRulesFunc (CCString * Rule)"); Rule = string (rule-> getCString ()); }  

Update: My full LuaScriptReader.cpp is. help please.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -