1.9.3使用cc.class后release版本真机测试报错

昨天发现1.8.2在destroyTexture的时候,出现一个很大的坑,没法填(同时for循环release大量object的时候会crash)。后来实在没办法,改用1.9.3尝试,结果一切正常,浩浩荡荡走上更改引擎版本的道路。(以下忽略搬运项目时的SDK等代码几百万行……)

不会有问题的版本:1.8.2
有问题的版本:1.9.3

测试情况:
WEB情况–>正常
模拟器情况–>正常
调试模式真机情况–>正常

IOS+安卓 非调试模式下报以下错误:

ERROR: TypeError: (d.instance = this)._super is not a function. (In ‘(d.instance = this)._super()’, ‘(d.instance = this)._super’ is null), location: src/project.js:

下周上线,感觉自己快要被祭天了,求救求救!!:joy:


贴上basePage代码:

var gconfig = require(“gameConfig”);
var app = require(“app”);

var basePage = cc.Class({
extends: cc.Component,

properties: {
    closeBtn: cc.Button,
    bgNode: cc.Node,
},

statics: {
    instance: null,
    prefabPath: "",
    showPage: function(pparams, pparent){
        }
    }
    },
},

onLoad: function (){
    this.creatMask();
    this.handleUI();
},

onEnable: function(){
},

handleUI: function(){
},

// 创建遮罩
creatMask: function(bclose, popacity){
},

setParams: function(pparams){
},

onClose: function(){
},

onDestroy: function(){
    --G.gPrefabZindex;
},

});
module.exports = basePage;


使用时的方法:

var basePage = require(“basePage”);

var noticePage = cc.Class({
extends: basePage,

properties: {
    contentLabel: cc.Label,
},

statics: {
    prefabPath: "noticepage",
},

onLoad () {
    noticePage.instance = this;
    this._super();
},


handleUI () {
    this._super();
},

@jare 求助

请打开 src/project.js,搜索看看出错的是什么代码

您好,错误代码的片段截图如下:

这个代码的源码是怎样的呢?感觉像是 this 没定义,看看调用栈吧,应该是 onLoad 的调用姿势不对

Jare大神你好!
@jare 已提交代码

开启调试模式后,debug版本:

release版本:

是因为relaese版本精简了脚本代码?

是精简了代码,onLoad 是如何调用的呢?感觉像是 this 没定义,看看调用栈吧,应该是 onLoad 的调用姿势不对