quickV3.3Final display.addSpriteFrames报错

在使用display.addSpriteFrames方法时报以下错误:
error:
cc.SpriteFrameCache:addSpriteFramesWithFile argument #3 is ‘cc.Texture2D’; ‘string’ expected.

有时在执行这个方法时会闪退,而且是经常。除了这个错误信息外,就没其他错误提示了。

用Xcode调试会卡在这里

bool LuaEventNode::isRunning() const
{
    if (_node)
    {
        return _node->isRunning();
    }
    return false;
}


```

闪退应该与这个无关,你看下其它地方的代码

display.addSpriteFrames这个方法是成功了的,
会出这个错,是自动绑定的问题,不影响功能

function display.addSpriteFrames(plistFilename, image, handler)
    local async = type(handler) == "function"
    local asyncHandler = nil
    if async then
        asyncHandler = function()
            local texture = sharedTextureCache:getTextureForKey(image)
            assert(texture, string.format("The texture %s, %s is unavailable.", plistFilename, image))
            print("====== display.addSpriteFrames async 1")
            sharedSpriteFrameCache:addSpriteFrames(plistFilename, image)
            print("====== display.addSpriteFrames async 2")
        end
    end


```

这次确定是sharedSpriteFrameCache:addSpriteFrames(plistFilename, image)卡在这了。
====== display.addSpriteFrames async 1有打印出来但下一句Log没打印出来

卡在了sharedSpriteFrameCache:addSpriteFrames(plistFilename, image),如楼上!

就上面报的那个错误而言
cc.SpriteFrameCache:addSpriteFramesWithFile argument #3 is ‘cc.Texture2D’; ‘string’ expected.
是不用管的,这是自己动绑定的问题,功能没问题的

对你的情况,你可以调一下这个函数
lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile,
看是否走成功了

— Begin quote from ____

引用第5楼htlxyz于2015-01-19 09:36发表的 :
就上面报的那个错误而言
cc.SpriteFrameCache:addSpriteFramesWithFile argument #3 is ‘cc.Texture2D’; ‘string’ expected.
是不用管的,这是自己动绑定的问题,功能没问题的

对你的情况,你可以调一下这个函数
http://www.cocoachina.com/bbs/job.php?action=topost&tid=282045&pid=1224136

— End quote

这个函数是执行成功了的。

遇到同样地问题,闪退的地方也一样,楼主解决了吗?

闪退是因为创建了带触摸事件的节点