在使用jsb.FileUtils.writeStringToFile和jsb.FileUtils.getStringFromFile时候发生错误,有大佬知道什么原因吗?
visual studio错误信息:
D/WebSocket.cpp (1193): Safely done, msg(36)!
D/WebSocket.cpp (1196): msg(36) append: 0 + 8 = 8
D/WebSocket.cpp (1197): msg(36) was totally sent!
D/WebSocket.cpp (1213): -----------------------------------------------------------
V/AudioPlayer (146): AudioPlayer::play2d, _alSource: 2, player id=50
D/WebSocket.cpp (1234): Receiving data:index:47, len=8
D/WebSocket.cpp (1268): Notify data len 8 to Cocos thread.
V/AudioPlayer (68): ~AudioPlayer() (0F5284C8), id=50
V/AudioPlayer (82): AudioPlayer::destroy begin, id=50
V/AudioPlayer (127): Before alSourceStop
V/AudioPlayer (129): Before alSourcei
V/AudioPlayer (135): AudioPlayer::destroy end, id=50
V/AudioPlayer (146): AudioPlayer::play2d, _alSource: 2, player id=51
V/AudioPlayer (146): AudioPlayer::play2d, _alSource: 3, player id=52
D/WebSocket.cpp (1193): Safely done, msg(37)!
D/WebSocket.cpp (1196): msg(37) append: 0 + 8 = 8
D/WebSocket.cpp (1197): msg(37) was totally sent!
D/WebSocket.cpp (1213): -----------------------------------------------------------
D/WebSocket.cpp (1234): Receiving data:index:48, len=8
D/WebSocket.cpp (1234): Receiving data:index:49, len=12
D/WebSocket.cpp (1268): Notify data len 8 to Cocos thread.
D/WebSocket.cpp (1268): Notify data len 12 to Cocos thread.
V/AudioPlayer (146): AudioPlayer::play2d, _alSource: 4, player id=53
D/WebSocket.cpp (1193): Safely done, msg(38)!
D/WebSocket.cpp (1196): msg(38) append: 0 + 8 = 8
D/WebSocket.cpp (1197): msg(38) was totally sent!
D/WebSocket.cpp (1213): -----------------------------------------------------------
V/AudioPlayer (68): ~AudioPlayer() (0F528EA0), id=51
V/AudioPlayer (82): AudioPlayer::destroy begin, id=51
V/AudioPlayer (127): Before alSourceStop
V/AudioPlayer (129): Before alSourcei
V/AudioPlayer (135): AudioPlayer::destroy end, id=51
D/WebSocket.cpp (1234): Receiving data:index:50, len=8
D/WebSocket.cpp (1268): Notify data len 8 to Cocos thread.
V/AudioPlayer (68): ~AudioPlayer() (0F528180), id=52
V/AudioPlayer (82): AudioPlayer::destroy begin, id=52
V/AudioPlayer (127): Before alSourceStop
V/AudioPlayer (129): Before alSourcei
V/AudioPlayer (135): AudioPlayer::destroy end, id=52
V/AudioPlayer (68): ~AudioPlayer() (0F5284C8), id=53
V/AudioPlayer (82): AudioPlayer::destroy begin, id=53
V/AudioPlayer (127): Before alSourceStop
V/AudioPlayer (129): Before alSourcei
V/AudioPlayer (135): AudioPlayer::destroy end, id=53
D/WebSocket.cpp (1193): Safely done, msg(39)!
D/WebSocket.cpp (1196): msg(39) append: 0 + 8 = 8
D/WebSocket.cpp (1197): msg(39) was totally sent!
D/WebSocket.cpp (1213): -----------------------------------------------------------
V/AudioPlayer (146): AudioPlayer::play2d, _alSource: 2, player id=54
D/WebSocket.cpp (1234): Receiving data:index:51, len=8
D/WebSocket.cpp (1268): Notify data len 8 to Cocos thread.
V/AudioPlayer (68): ~AudioPlayer() (0F528C70), id=54
V/AudioPlayer (82): AudioPlayer::destroy begin, id=54
V/AudioPlayer (127): Before alSourceStop
V/AudioPlayer (129): Before alSourcei
V/AudioPlayer (135): AudioPlayer::destroy end, id=54
D/WebSocket.cpp (1193): Safely done, msg(40)!
D/WebSocket.cpp (1196): msg(40) append: 0 + 8 = 8
D/WebSocket.cpp (1197): msg(40) was totally sent!
D/WebSocket.cpp (1213): -----------------------------------------------------------
V/AudioPlayer (146): AudioPlayer::play2d, _alSource: 2, player id=55
V/AudioPlayer (146): AudioPlayer::play2d, _alSource: 3, player id=56
D/WebSocket.cpp (1234): Receiving data:index:52, len=8
D/WebSocket.cpp (1234): Receiving data:index:53, len=12
D/WebSocket.cpp (1268): Notify data len 8 to Cocos thread.
D/WebSocket.cpp (1268): Notify data len 12 to Cocos thread.
D/WebSocket.cpp (1193): Safely done, msg(41)!
D/WebSocket.cpp (1196): msg(41) append: 0 + 8 = 8
D/WebSocket.cpp (1197): msg(41) was totally sent!
D/WebSocket.cpp (1213): -----------------------------------------------------------
E/jswrapper (348): ERROR: Uncaught SyntaxError: Unexpected end of JSON input, location: undefined:0:0
STACK:
[0]saveRecords@assets/resources/index.15a1a.jsc:916
[1]onEnable@assets/resources/index.15a1a.jsc:883
[2]invokeOnEnable@src/cocos2d-jsb.fa288.js:21603
[3]invoke@src/cocos2d-jsb.fa288.js:21531
[4]activateNode@src/cocos2d-jsb.fa288.js:31752
[5]set@src/cocos2d-jsb.fa288.js:43275
[6]Sure_move@assets/resources/index.15a1a.jsc:494
[7]anonymous@assets/resources/index.15a1a.jsc:308
[8]252.c.emit@src/cocos2d-jsb.fa288.js:36576
[9]n.onmessage@assets/resources/index.15a1a.jsc:1014
Uncaught Exception:
- location : (see stack)
- msg : Uncaught SyntaxError: Unexpected end of JSON input
- detail :
[0]saveRecords@assets/resources/index.15a1a.jsc:916
[1]onEnable@assets/resources/index.15a1a.jsc:883
[2]invokeOnEnable@src/cocos2d-jsb.fa288.js:21603
[3]invoke@src/cocos2d-jsb.fa288.js:21531
[4]activateNode@src/cocos2d-jsb.fa288.js:31752
[5]set@src/cocos2d-jsb.fa288.js:43275
[6]Sure_move@assets/resources/index.15a1a.jsc:494
[7]anonymous@assets/resources/index.15a1a.jsc:308
[8]252.c.emit@src/cocos2d-jsb.fa288.js:36576
[9]n.onmessage@assets/resources/index.15a1a.jsc:1014
D/jswrapper (162): JS: [ERROR]: (see stack) Uncaught SyntaxError: Unexpected end of JSON input [0]saveRecords@assets/resources/index.15a1a.jsc:916
[1]onEnable@assets/resources/index.15a1a.jsc:883
[2]invokeOnEnable@src/cocos2d-jsb.fa288.js:21603
[3]invoke@src/cocos2d-jsb.fa288.js:21531
[4]activateNode@src/cocos2d-jsb.fa288.js:31752
[5]set@src/cocos2d-jsb.fa288.js:43275
[6]Sure_move@assets/resources/index.15a1a.jsc:494
[7]anonymous@assets/resources/index.15a1a.jsc:308
[8]252.c.emit@src/cocos2d-jsb.fa288.js:36576
[9]n.onmessage@assets/resources/index.15a1a.jsc:1014
E/jswrapper (574): [ERROR] (c:\cocosdashboard_1.0.17\resources\.editors\creator\2.4.6\resources\cocos2d-x\cocos\scripting\js-bindings\jswrapper\v8\object.cpp, 574): Invoking function (1723E448) failed!
V/AudioPlayer (146): AudioPlayer::play2d, _alSource: 4, player id=57
V/AudioPlayer (68): ~AudioPlayer() (0F528C70), id=55
V/AudioPlayer (82): AudioPlayer::destroy begin, id=55
V/AudioPlayer (127): Before alSourceStop
V/AudioPlayer (129): Before alSourcei
V/AudioPlayer (135): AudioPlayer::destroy end, id=55
D/WebSocket.cpp (1234): Receiving data:index:54, len=8
D/WebSocket.cpp (1268): Notify data len 8 to Cocos thread.
V/AudioPlayer (68): ~AudioPlayer() (0F528D88), id=56
V/AudioPlayer (82): AudioPlayer::destroy begin, id=56
V/AudioPlayer (127): Before alSourceStop
V/AudioPlayer (129): Before alSourcei
V/AudioPlayer (135): AudioPlayer::destroy end, id=56
V/AudioPlayer (68): ~AudioPlayer() (17503C08), id=57
V/AudioPlayer (82): AudioPlayer::destroy begin, id=57
V/AudioPlayer (127): Before alSourceStop
V/AudioPlayer (129): Before alSourcei
V/AudioPlayer (135): AudioPlayer::destroy end, id=57
线程 0x5328 已退出,返回值为 0 (0x0)。
线程 0x5710 已退出,返回值为 0 (0x0)。
线程 0x888 已退出,返回值为 0 (0x0)。
线程 0x3780 已退出,返回值为 0 (0x0)。
线程 0x5e74 已退出,返回值为 0 (0x0)。
线程 0x3414 已退出,返回值为 0 (0x0)。