平台:mac
版本:1.7.0 rc1
let xhr = new XMLHttpRequest();
执行这句代码后就没有后续了,程序卡住了,我在这句代码前面和后面各写了一个cc.log(),但是只有前面的执行了
手动顶
send的那一行代码发过来瞧瞧?已经掉过附近的坑。
我写的是es5,不是TS
看了一下,我不是用new的,我用的是 cc.loader.getXMLHttpRequest();
你试试
还没到send,执行了new之后就没了
也不行,同样就没有下一句了
@dumganhar看下
模拟器调试的时候会崩溃,不调试不崩溃,send的时候不要带参数,即不能send(null);
send(null)的写法会引发jsb的bug,现象是没有反应,因为请求没有发出去。1.7beta7版本是这样,现在发现1.7rc2这个问题已经修正。

完整日志提供一个。或者demo
2017-11-18 17:27:47.768403+0700 GAME-mobile[13090:934821] [DYMTLInitPlatform] platform initialization successful
2017-11-18 17:27:48.161138+0700 GAME-mobile[13090:934590] info: CocosAnalytics ==> enableLoggin
{
gl.supports_OES_map_buffer: true
gl.supports_vertex_array_object: true
cocos2d.x.version: 1.7.0
gl.vendor: Apple Inc.
gl.supports_PVRTC: true
gl.renderer: Apple A8X GPU
cocos2d.x.compiled_with_profiler: false
gl.version: OpenGL ES 2.0 Apple A8X GPU - 111.40
gl.max_texture_size: 4096
gl.supports_ETC1: false
gl.supports_BGRA8888: false
cocos2d.x.build_type: DEBUG
gl.max_texture_units: 8
gl.max_samples_allowed: 4
gl.supports_OES_packed_depth_stencil: true
gl.supports_NPOT: true
gl.supports_discard_framebuffer: true
cocos2d.x.compiled_with_gl_state_cache: true
gl.supports_OES_depth24: true
}
Initializing JavaScriptCore
cocos2d: fullPathForFilename: No file found at script/jsb_prepare.jsc. Possible missing file.
cocos2d: fullPathForFilename: No file found at script/jsb_boot.jsc. Possible missing file.
JS: Cocos2d-x-lite v1.7.0
2017-11-18 17:27:49.540081+0700 GAME-mobile[13090:934590] cocos2d: surface size: 2048x1536
cocos2d: QuadCommand: resizing index size from [-1] to [2560]
2017-11-18 17:27:49.626722+0700 GAME-mobile[13090:934590] cocos2d: surface size: 2048x1536
2017-11-18 17:27:49.649937+0700 GAME-mobile[13090:934590] refreshPreferences: HangTracerEnabled: 0
2017-11-18 17:27:49.650012+0700 GAME-mobile[13090:934590] refreshPreferences: HangTracerDuration: 500
2017-11-18 17:27:49.650040+0700 GAME-mobile[13090:934590] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:0
JS: LoadScene e83TlR6zxBlJ47BN2Ezpem: 98.40800000000002ms
JS: InitScene: 3.421999999999798ms
JS: AutoRelease: 0.34999999999990905ms
JS: Destroy: 0.12599999999997635ms
JS: Success to load scene: db://assets/scene/launch.fire
JS: AttachPersist: 0.009999999999990905ms
JS: Activate: 6.639000000000124ms
JS: LoadScene 56UinExqFJiIFyZKJNoxgh: 14.287999999999556ms
JS: InitScene: 42.764000000000124ms
JS: AutoRelease: 0.9140000000006694ms
JS: Destroy: 5.496999999999389ms
JS: AttachPersist: 0.006999999999607098ms
2017-11-18 17:27:52.945692+0700 GAME-mobile[13090:934590] [MC] Lazy loading NSBundle MobileCoreServices.framework
2017-11-18 17:27:52.947490+0700 GAME-mobile[13090:934590] [MC] Loaded MobileCoreServices.framework
2017-11-18 17:27:52.976961+0700 GAME-mobile[13090:934590] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
[Edit text] content size = (160.000000, 40.000000)
[Edit text] content size = (160.000000, 40.000000)
[Edit text] content size = (245.000000, 40.000000)
[Edit text] content size = (160.000000, 40.000000)
[Edit text] content size = (160.000000, 40.000000)
[Edit text] content size = (245.000000, 40.000000)
JS: --M-a-i-n–S-t-a-r-t–
JS: os: iOS
JS: language: zh
JS: browser: null
JS: isMobile: true
JS: isNative: true
JS: isBrowser: undefined
JS: update: false
JS: searchPaths(1st time is null): null
JS: —I----N----F----O—
libpng warning: iCCP: known incorrect sRGB profile
JS: – set decimal config –
JS: – set decimal config done –
JS: Activate: 762.8990000000003ms
JS: == 启动界面载入 (首个页面) ==
[Edit text] content size = (245.000000, 40.000000)
[Edit text] content size = (245.000000, 40.000000)
JS: update1
JS: update2
JS: update3
谢谢提供日志。但是基于这个日志我还是无法分析。
能麻烦整理一个小demo出来么?我这会尽快查一下。
好吧,项目组其他成员不小心把Native Network模块没打包进去
我晕。。。
我晕~


