Comments (6)
@chenquanjun
我用你的代码,在3.3final上尝试,没有出现,
你的是必现吗?确定是在3.3final上?
from v3quick.
from v3quick.
0x0104F441 处的第一机会异常(在 Quick3d.exe 中): 0xC0000005: 读取位置 0xFEEEFEF2 时发生访问冲突。
0x0104F441 处有未经处理的异常(在 Quick3d.exe 中): 0xC0000005: 读取位置 0xFEEEFEF2 时发生访问冲突。
from v3quick.
看了一下代码,触发崩溃的条件是整个场景中只有一个触摸对象。
这里只有一个按钮,在点击回调里面设置按钮不可触摸,最后会调用destroyInstance方法。
void LuaTouchEventManager::onTouchesEnded(const std::vector<Touch*>& touches, Event *event)
{
for (auto it = touches.begin(); it != touches.end(); ++it)
{
m_touchingIds.erase(((Touch*)*it)->getID());
}
if (m_touchingIds.size())
{
dispatchingTouchEvent(touches, event, CCTOUCHREMOVED);
}
else
{
dispatchingTouchEvent(touches, event, CCTOUCHENDED); //执行完毕后Instance已经被析构
// remove all touching nodes
//CCLOG("TOUCH ENDED, REMOVE ALL TOUCH TARGETS");
_touchingTargets.clear(); //_touchingTargets已经被析构,再调用clear会出错
}
}
void LuaTouchEventManager::removeTouchableNode(LuaEventNode *node)
{
//...省略代码...
if (_touchableNodes.size() == 0 && m_touchDispatchingEnabled) //因为只有一个按钮而且按钮已经被禁用触摸
{
disableTouchDispatching();
destroyInstance(); //执行此代码
}
}
from v3quick.
已修复。谢谢反馈!
from v3quick.
貌似 这里还是会有问题
if (touchMode == LuaEventNode::modeTouchesAllAtOnce)
{
node->ccTouchesBegan(touches, event);
}
else
{
ret = node->ccTouchBegan(touchTarget->findTouch(touches), event);
}
if (ret)
{
_touchingTargets.pushBack(touchTarget);
//CCLOG("ADD TOUCH TARGET [%p]", touchTarget->getNode()->getNode());
}
在ccTouchBegan中执行了setEnabeld(false)了之后,就导致整个对象被delete了。那个_touchingTargets其实就已经是被释放了的,应该会出问题的
from v3quick.
Related Issues (20)
- 报告一下JNI在Android L上新增加的一个崩溃错误(按理说应该提到cocos2d-x上的) HOT 9
- 全局变量,spc HOT 4
- display.newColorLayer(color)
- UIInput TextField param 'x' and 'y' have to set value
- EventProtocol:hasEventListener problem
- 刚刚从升级3.3rc 升级到3.3final版本,lua加密的代码运行不了。 HOT 2
- Sprite3D display different in Player3 and PrebuiltRuntimeLua
- Stencil buffer is not enabled HOT 1
- 什么时候发布兼容 Cocos 3.4的版本,什么时候换回 LuaJIT HOT 1
- touch事件分发的和穿透bug HOT 4
- quick cocos2dx 3.3Final版本触屏死机bug HOT 3
- websocket关于windows平台的bug HOT 3
- 3.5 iap没导出么
- ActionTimeline::startWithTarget是不是有BUG?
- UI组件clone()方法无法正确返回 HOT 1
- 貌似项目工程不在某盘的跟目录无法打包,有啥解决办法么
- mac模拟器console窗口文字区不响应 鼠标选中等事件
- github上的V3分支PLAYER自行编译后无法导入项目,一导入就卡死 HOT 1
- luasock(tcp) recvall非阻塞问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v3quick.