New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CocosStudio .csb reading bug. #17869

Closed
sbrednikhin opened this Issue May 26, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@sbrednikhin
Contributor

sbrednikhin commented May 26, 2017

  • cocos2d-x version: 3.15
  • devices test on: win32
  • developing environments
    • VS version: 2013

Steps to Reproduce:

  1. In cocos empty test add content of archive https://www.dropbox.com/s/zut1fdlsvbxid39/cocos_studio_outline_crash.zip?dl=0
    into Resources folder (there is scene with label with enabled outline).
  2. In cocos empty test add
    const flatbuffers::CSParseBinary * content_binary = nullptr;
    cocos2d::Data data = FileUtils::getInstance()->getDataFromFile( "Scene.csb" );
    const flatbuffers::CSParseBinary * flat_buffer = flatbuffers::GetCSParseBinary( data.getBytes() );
    cocos2d::Node* scene = CSLoader::getInstance()->nodeWithFlatBuffers(flat_buffer->nodeTree());
    this->addChild( scene );
    into
    HelloWorld::init()

Add some includes :
#include "cocostudio/FlatBuffersSerialize.h"
#include "cocostudio/CSParseBinary_generated.h"
#include "cocostudio/ActionTimeline/CSLoader.h"
3. Comment #include "ExtensionMacros.h" in FlatBufferSerialize.h
4. compile and run

Will crash at reading .csb file.
Caused by updating flatbuffer to 1.5 version with generating new headers by existing fbs files.

I understand that you closed support of CocosStudio without promise of backward capability, but I don't understand why you need to update flatbuffer. It's used in CocosStudio reader only ( There is no other usages, I'v checked ). If you don't want to support it anymore - remove it. If you still support it keep it working.

@minggo

This comment has been minimized.

Show comment
Hide comment
@minggo

minggo Jun 8, 2017

Contributor

flatbuffer is asked to be updated by this issue. I don't know it will break compatibility, because cpp-tests also uses .csb files and there is not problem.

Contributor

minggo commented Jun 8, 2017

flatbuffer is asked to be updated by this issue. I don't know it will break compatibility, because cpp-tests also uses .csb files and there is not problem.

@minggo

This comment has been minimized.

Show comment
Hide comment
@minggo

minggo Jun 8, 2017

Contributor

As many developers meet the issue, i think i have to revert the PR of updating flatbuffer. Sorry about that.

Contributor

minggo commented Jun 8, 2017

As many developers meet the issue, i think i have to revert the PR of updating flatbuffer. Sorry about that.

@minggo minggo added this to the 3.16 milestone Jun 8, 2017

@minggo minggo self-assigned this Jun 8, 2017

@minggo

This comment has been minimized.

Show comment
Hide comment
@minggo

minggo Jun 15, 2017

Contributor

sent #17930 to revert updating flatbuffers

Contributor

minggo commented Jun 15, 2017

sent #17930 to revert updating flatbuffers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment