Projects > cpp > Issues > Bug #2612

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

Crash appears when extending cc.ScrollView in JS

Bug #2612 [Closed]
dumganhar 2013-08-20 08:36 . Updated almost 10 years ago

Fixed at https://github.com/cocos2d/cocos2d-x/pull/3442.

It’s because when extending cc.ScrollView in JS, cc.ScrollView.extend will create an object as prototype.

cc.Class.extend = function (prop) {
    var _super = this.prototype;

    // Instantiate a base class (but only create the instance,
    // don't run the init constructor)
    initializing = true;
    var prototype = new this(); // XXX, ScrollView in native will be just allocated, but without initialization. So the _touches is NULL.

We need to check whether the _touches is NULL in the destructor of ScrollView.

dumganhar 2013-08-21 02:17
  • Status changed from New to Resolved
dumganhar 2013-08-23 10:42
  • Status changed from Resolved to Closed
ionliga 2014-11-28 14:52

The optimization introduces a bug where the priority and Touch Mode will not get changed if the list is locked.
The most straight forward fix is to merge the pHandlersToAdd and pHandlersToRemove into a queue and process through all of them in the order they are received

Pokerstar88.com Agen Texas Poker dan Domino Online Indonesia Terpercaya | Agen Bola | Taruhan Bola | Agen Bola | Olb365.com Agen Judi Bola Online, Agen Judi Casino Online Indonesia Terpercaya | Jasa SEO | Agen Sbobet

Atom PDF

Status:Closed
Start date:2013-08-20
Priority:Normal
Due date:
Assignee:dumganhar
% Done:

0%

Category:all
Target version:3.0-alpha0