前两天我尝试导出u3d的webGL项目,用火狐浏览器打开,打不开,出现如下错误:
An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was:
uncaught exception: abort(-1) at jsStackTrace@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:22814
stackTrace@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:22997
abort@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:48759
__Z26RegisterClass_MovieTexturev [RegisterClass_MovieTexture()]@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:320476
zqi@blob:null/ee7e2c84-6036-4343-adae-3353ad18a087:22:1
mAb@blob:null/ee7e2c84-6036-4343-adae-3353ad18a087:10:1
Wyb@blob:null/ee7e2c84-6036-4343-adae-3353ad18a087:10:1
xJc@blob:null/ee7e2c84-6036-4343-adae-3353ad18a087:15:1
callMain@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:46880
doRun@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:47707
run/<@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:47875
An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was:
uncaught exception: abort(-1) at jsStackTrace@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:22814
stackTrace@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:22997
abort@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:48759
__Z26RegisterClass_MovieTexturev [RegisterClass_MovieTexture()]@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:320476
zqi@blob:null/ee7e2c84-6036-4343-adae-3353ad18a087:22:1
mAb@blob:null/ee7e2c84-6036-4343-adae-3353ad18a087:10:1
Wyb@blob:null/ee7e2c84-6036-4343-adae-3353ad18a087:10:1
xJc@blob:null/ee7e2c84-6036-4343-adae-3353ad18a087:15:1
callMain@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:46880
doRun@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:47707
run/<@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:47875
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.
原本以为是webGL或者火狐的某些设置可能不小心修改了,可是重装了他们还是不行,网上没有相同答案,有问答也是全英的,看得我要死了。
后来认真看了一下错误,忽然发现关键句了!就是我在上面标注了红色的那一句:__Z26RegisterClass_MovieTexturev [RegisterClass_MovieTexture()]@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:320476。movieTexture相关的,有点熟悉。回看项目,发现有个叫MovieTexture的文件夹,里面是存放着几个.mp4视频文件。把里面的视频全删了,再导出一次,正常打开,成功解决!
结论:
1、这次可能是因为webGL无法识别视频文件导致,删除项目里所有的视频文件即可解决。
2、问题就在错误信息中,认真看看,如果发现哪一句跟你的项目最有关系的,那一句应该就是解决错误的关键句,比如我的项目时movieTexture那一句。