Languages

Menu
Sites
Language
Cocos2d-html5 white screen issue.

I have cocos2d html5 game. It runs good on PC, all browsers, without errors, but on Tizen it shows only white screen.
It looks like all update loop works right, but something is wrong with drawing. Stats info and background flash for a moment at starting, but then only empty white screen is shown. No javascript errors.

This behavior begins since 2.2 version. With 2.1.5 I have not this issue.

Can anybody help me?

Responses

6 Replies
Denis Mazilov

>>This behavior begins since 2.2 version. With 2.1.5 I have not this issue.

It is about cocos 2d version.
 

Raghavendra Reddy Shiva

Where are you running your application on, emulator, simulator or Tizen device ? Can you also confirm, if it's the same behaviour with simulator and emulator or Tizen device( 2.2.1/2.2/2.1 image ?)  ? 

Please try on the latest Tizen SDK 2.2.1 ,if not used. If using Tizen device, flash with latest 2.2.1 image.

Denis Mazilov

Behavior with web simulator is same to PC browsers, all works right.

There is problem only with Tizen device. I tried both 2.2 and 2.2.1 versions of Tizen SDK and device image.

Raghavendra Reddy Shiva

Ok. Looks like the canvas 2d drawing is broken in some cases.

Is the application an open source apps (free demo apps) ? If so, please share the app details, it'll help in debugging the issue further.

Please provide the "sdb dlog" messages. Will have to create a JIRA bug for this issue.

Denis Mazilov

I have just inspected cocos2d-html repo (https://github.com/cocos2d/cocos2d-html5/).

Commit 27f140a13bcd2c4920 added in cocos2d/platform/CCApplication.js some code

if(cc.Browser.isMobile){
    ...
    cc._addBottomTag();
}

...

cc._addBottomTag = function () {
    var bottom = document.createElement("div");
    bottom.id = "bottom";
    bottom.style.border = bottom.style.margin = bottom.style.padding = bottom.style.height = bottom.style.lineHeight = bottom.style.fontSize = "0px";
    document.body.appendChild(bottom);
    window.location.href="#bottom";
};

This code is executed only for mobile browsers and causes mentioned issue.

Raghavendra Reddy Shiva

Yeah, just checked the code and it is the cause for the white screen. Not sure, the intention behind adding a "div" at the bottom for the mobile.

Just untagging the div from the window could be a work around for now, but this should be fixed.