Cocos2d-x和橘子果酱-CCCallFuncO的麻烦 [英] Cocos2d-x and Marmalade - Troubles with CCCallFuncO

查看:156
本文介绍了Cocos2d-x和橘子果酱-CCCallFuncO的麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在工作的Cocos2d-x项目,该项目是用XCode开发的,基于版本cocos2d-1.0.1-x-0.13.0-beta

I have a working Cocos2d-x project, developed in XCode and based on the version cocos2d-1.0.1-x-0.13.0-beta

现在,我必须使其与Marmalade一起使用(在Windows pc上使用VS Express),并且它是我的新手.我设法建立了项目,并且源代码可以很好地编译,但是当我启动项目时,当调用CCCallFuncO时,我得到了一个神秘的异常:

Now I have to make it work with Marmalade (using VS Express on a Windows pc), and I'm completely new to it. I managed to set up the project and the source code compiles just fine, but when I launch the project I get a cryptic exception when a CCCallFuncO is invocated:

DEFAULT: s3eDeviceHandleException: 1 0x00000000 0x00000000
Memory exception (11) attempting to access: 00000000
S3E runtime is not handling this exception
First-chance exception at 0x00000000 in s3e_simulator_debug.exe: 0xC0000005: Access violation.
Unhandled exception at 0x00000000 in s3e_simulator_debug.exe: 0xC0000005: Access violation reading location 0x00000000.

这发生在CCActionInstant类内部,在CCCallFuncO :: execute方法中,在指令上:

This occurres inside the class CCActionInstant, within the method CCCallFuncO::execute, on the instruction:

(m_pSelectorTarget->*m_pCallFuncO)(m_pObject);

据我所知,所有涉及的对象都是正确无误的,这证明了XCode内部使用完全相同的代码且没有果酱的情况,它是完全有效且有意义的.

As far as I can tell all the involved objects are correct and sound, proof is it totally works and makes sense with the very same code inside XCode and without Marmalade.

这两种环境之间可能引起此问题的区别是什么? 谁拥有果酱的经验,可以给我一个线索,我应该寻找什么?

What is the difference between these two enviroment that could cause this issue? Any of you with Marmalade experience can give me a clue about what should I look for?

推荐答案

我正在回答自己的问题,只是为了让其他开发人员知道我是如何解决此问题的.

I'm answering my own question just to let other developers know how I made this problem go away.

原来,Marmalade模拟器的问题与代码无关. 如果您遇到类似于我的问题-类似地,我是说您尝试在果酱模拟器上运行您的应用时遇到非常明确的异常-在尝试其他方法之前,我建议您删除果酱子文件夹并重新生成项目从.mkb文件. 显然,这消除了一些缓存和预编译对象,这些缓存和预编译对象可能与您的实际代码不同步. 删除橘子果酱子文件夹将强制编译器重新创建所有内容.

It turned out that the problem with the Marmalade simulator had nothing to do with the code. If you encounter a problem similar to mine - and by similar I mean you get a very unspecified exception when trying to run your app on the marmalade simulator - before trying anything else I can suggest you to remove the marmalade sub-folder and regenerate the project from the .mkb file. This apparently wipes away some cache and pre-compiled object which could be out of synch with your actual code. Removing the marmalade sub-folder forces the compiler to recreate all anew.

这篇关于Cocos2d-x和橘子果酱-CCCallFuncO的麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆