请问版主,这类bug是什么原因

cocostudio解析库里,类似的代码。
std::string plist = DICTOOL->getStringValueFromArray_json(doc, TEXTURES, i);
std::string png = DICTOOL->getStringValueFromArray_json(doc, TEXTURES_PNG, i);

DICTOOL取得的数值都是NULL, std::string赋值直接崩溃。文件内容是有数据的。
cocos2d版本2.2.5 cocostudio 1.05.

还是给你们提提建议,功能不要赶的那么快,先把基本功能健壮性可用性搞好。看spine tiled功能单一不,但是做的都不错。

Cocos2d:

cocos2d.x.version: cocos2d-x 2.2.5
cocos2d.x.compiled_with_profiler: false
cocos2d.x.compiled_with_gl_state_cache: true
gl.vendor: Apple Computer, Inc.
gl.renderer: Apple Software Renderer
gl.version: OpenGL ES 2.0 APPLE-9.4.3
gl.max_texture_size: 4096
gl.max_texture_units: 8
gl.max_samples_allowed: 4
gl.supports_PVRTC: true
gl.supports_NPOT: true
gl.supports_BGRA8888: false
gl.supports_discard_framebuffer: true
gl.supports_vertex_array_object: true

libc++abi.dylib: terminating with uncaught exception of type std::logic_error: basic_string::_S_construct NULL not valid

你好,你用的是数据编辑器么?

不是数据编辑器。用的ui编辑器,一个界面,放一个按钮,一个listveiw,一个textView,3个控件。仅仅开始学习怎么用

怎么解决啊,就显示简单界面都不行,工作没法进行啊

{
“classname”: null,
“name”: null,
“animation”: {
“classname”: null,
“name”: “AnimationManager”,
“actionlist”: ]
},
“dataScale”: 1,
“designHeight”: 960,
“designWidth”: 640,
“textures”: ],
“texturesPng”:
“GUI/button.png”
],
“version”: “1.5.0.0”,
“widgetTree”: {
“classname”: “Panel”,
“name”: null,
“children”:
{
“classname”: “Button”,
“name”: null,
“children”: ],
“options”: {
“__type”: “ButtonSurrogate:#EditorCommon.JsonModel.Component.GUI”,
“classname”: “Button”,
“name”: “Start”,
“ZOrder”: 0,
“actiontag”: 6647531,
“anchorPointX”: 0.5,
“anchorPointY”: 0.5,
“classType”: “CocoStudio.EngineAdapterWrap.CSButton”,
“colorB”: 255,
“colorG”: 255,
“colorR”: 255,
“customProperty”: “”,
“flipX”: false,
“flipY”: false,
“height”: 40,
“ignoreSize”: false,
“layoutParameter”: null,
“opacity”: 255,
“positionPercentX”: 0.5364584,
“positionPercentY”: 0.08194445,
“positionType”: 0,
“rotation”: 0,
“scaleX”: 1,
“scaleY”: 1,
“sizePercentX”: 0.2828125,
“sizePercentY”: 0.0416666679,
“sizeType”: 0,
“tag”: 5,
“touchAble”: true,
“useMergedTexture”: false,
“visible”: true,
“width”: 181,
“x”: 343,
“y”: 78,
“capInsetsHeight”: 1,
“capInsetsWidth”: 1,
“capInsetsX”: 0,
“capInsetsY”: 0,
“disabled”: null,
“disabledData”: {
“path”: null,
“plistFile”: null,
“resourceType”: 0
},
“fontName”: “微软雅黑”,
“fontSize”: 30,
“fontType”: 0,
“normal”: null,
“normalData”: {
“path”: “GUI/button.png”,
“plistFile”: “”,
“resourceType”: 0
},
“pressed”: null,
“pressedData”: {
“path”: null,
“plistFile”: null,
“resourceType”: 0
},
“scale9Enable”: false,
“scale9Height”: 40,
“scale9Width”: 181,
“text”: “start games”,
“textColorB”: 255,
“textColorG”: 255,
“textColorR”: 255
}
},
{
“classname”: “ListView”,
“name”: null,
“children”: ],
“options”: {
“__type”: “ListViewSurrogate:#EditorCommon.JsonModel.Component.GUI”,
“classname”: “ListView”,
“name”: “ListView”,
“ZOrder”: 0,
“actiontag”: 32038241,
“anchorPointX”: 0,
“anchorPointY”: 0,
“classType”: “CocoStudio.EngineAdapterWrap.CSListView”,
“colorB”: 255,
“colorG”: 255,
“colorR”: 255,
“customProperty”: “”,
“flipX”: false,
“flipY”: false,
“height”: 200,
“ignoreSize”: false,
“layoutParameter”: null,
“opacity”: 255,
“positionPercentX”: 0.1704072,
“positionPercentY”: 0.6029356,
“positionType”: 0,
“rotation”: 0,
“scaleX”: 2.32432485,
“scaleY”: 1,
“sizePercentX”: 0.3125,
“sizePercentY”: 0.208333328,
“sizeType”: 0,
“tag”: 6,
“touchAble”: true,
“useMergedTexture”: false,
“visible”: true,
“width”: 200,
“x”: 109,
“y”: 578,
“backGroundImage”: null,
“backGroundImageData”: null,
“backGroundScale9Enable”: false,
“bgColorB”: 255,
“bgColorG”: 150,
“bgColorOpacity”: 100,
“bgColorR”: 150,
“bgEndColorB”: 255,
“bgEndColorG”: 150,
“bgEndColorR”: 150,
“bgStartColorB”: 255,
“bgStartColorG”: 255,
“bgStartColorR”: 255,
“bounceEnable”: false,
“capInsetsHeight”: 1,
“capInsetsWidth”: 1,
“capInsetsX”: 0,
“capInsetsY”: 0,
“clipAble”: true,
“colorType”: 1,
“direction”: 2,
“editorClipAble”: false,
“gravity”: 3,
“innerHeight”: 0,
“innerWidth”: 0,
“itemMargin”: 0,
“vectorX”: 0,
“vectorY”: -0.5
}
}
],
“options”: {
“__type”: “PanelSurrogate:#EditorCommon.JsonModel.Component.GUI”,
“classname”: “Panel”,
“name”: “Panel_1”,
“ZOrder”: 0,
“actiontag”: -1,
“anchorPointX”: 0,
“anchorPointY”: 0,
“classType”: “CocoStudio.EngineAdapterWrap.CSPanel”,
“colorB”: 255,
“colorG”: 255,
“colorR”: 255,
“customProperty”: “”,
“flipX”: false,
“flipY”: false,
“height”: 960,
“ignoreSize”: false,
“layoutParameter”: null,
“opacity”: 255,
“positionPercentX”: 0,
“positionPercentY”: 0,
“positionType”: 0,
“rotation”: 0,
“scaleX”: 1,
“scaleY”: 1,
“sizePercentX”: 1,
“sizePercentY”: 1,
“sizeType”: 0,
“tag”: 4,
“touchAble”: true,
“useMergedTexture”: false,
“visible”: true,
“width”: 640,
“x”: 0,
“y”: 0,
“adaptScreen”: false,
“backGroundImage”: null,
“backGroundImageData”: null,
“backGroundScale9Enable”: false,
“bgColorB”: 255,
“bgColorG”: 200,
“bgColorOpacity”: 0,
“bgColorR”: 150,
“bgEndColorB”: 255,
“bgEndColorG”: 200,
“bgEndColorR”: 150,
“bgStartColorB”: 255,
“bgStartColorG”: 255,
“bgStartColorR”: 255,
“capInsetsHeight”: 1,
“capInsetsWidth”: 1,
“capInsetsX”: 0,
“capInsetsY”: 0,
“clipAble”: false,
“colorType”: 1,
“layoutType”: 0,
“vectorX”: 0,
“vectorY”: -0.5
}
}
}

以上是导出的json源代码

版主不知道跑哪儿去了。发现点问题。CocoStudioSamples-master下载例子中的导出文件格式如下。xcode是可以正常运行的

我用的cocostudio输出错误格式如下。都是DemoLogin来测试的。这个xcode程序直接崩溃,格式不对,差别太大

看了下,我安装得cocostudio动画编辑器似乎是正确的,ui和 scene编辑器输出不正确

Hi,分别导出一份数据给我吧,我测试下我这里是否能正确解析。