Skip to content
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

Crash After Using ImageOptim on Resources Referenced in .ccb Files #433

Open
T-Spoon opened this issue Mar 26, 2014 · 4 comments
Open

Crash After Using ImageOptim on Resources Referenced in .ccb Files #433

T-Spoon opened this issue Mar 26, 2014 · 4 comments

Comments

@T-Spoon
Copy link

T-Spoon commented Mar 26, 2014

I'm using CocosBuilder 3.0 (Alpha 4), and it seems that after using ImageOptim on some images referenced in .ccb files the program crashes. To produce, I just open the .ccbproj and go to open a .ccb file.

If I checkout the version of the image before ImageOptim was used on it, it works fine (until it finds another file it has a problem with). If I checkout all the files then it works fine. I've tried deleting the cache too. No luck. It seems that not all of the images cause problems, as I can open some screens without problems.

The output from System.log is here: http://pastebin.com/7m589aFS

Is there some other log I can provide?

@T-Spoon
Copy link
Author

T-Spoon commented Mar 26, 2014

Here's a test case: https://anonfiles.com/file/88b27972523248708dac5a2953f2c8a6

If you open ScreenOriginal it's all good. Open ScreenCrash and you'll get the expected crash.

@BertMcDowell
Copy link

Unfortunately CoccosBuilder is no longer maintained. :(

I have my own branch of the project and can have a look at the issue over the weekend.

Cheers,
Bert

@T-Spoon
Copy link
Author

T-Spoon commented Mar 27, 2014

Ah I didn't even realise.

Oh well, it's not such a big deal anyway - the workaround I'm using is:

  1. Revert ImageOptim commit locally.
  2. Make changes to .ccb files as before.
  3. git stash the changes
  4. Do a git reset --hard HEAD^
  5. Unstash the changes and commit

There's not much work left to be done on this project, so this will get me to the end of it at least! So no need to worry yourself with it for my sake.

I imagine that SpriteBuilder will eventually add Cocos2dx compatibility.

Cheers,
Tspoon

@BertMcDowell
Copy link

Hey I had a look at this and it's down to ImageOptim converting it to a monochrome image and CocosBuilder not being able to re-size it due to failing to create a bitmap context to render into.

A fix can be found in here if you want it: BertMcDowell@8c0085d

Cheers,
Bert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants