A bunch of small bugs :)

  • At CCTextureCache, the Volatexture::removeTexture method isn’t called anywhere.

  • In CCFileUtils_android.cpp, with the Android implementation of CCFileUtils::getWriteablePath, the ‘tmp’ variable only has its first array element deleted, while getPackageNameJNI() returns an array of chars. Shouldn’t it use ‘free’ or ‘delete []’ to deallocate the memory instead?

  • In the Android library code, there’s a typo at Cocos2dxActivity::setPackgeName(…) <— should be setPackageName :slight_smile:

  • The recently added support for making the onscreen keyboard pop up is pure awesomeness, but there’s a bug with it: if you’re using the home button to switch to the home screen, longpress home button and continue to run the app (thus switching back to it), the keyboard will pop up, even though it’s not supposed to do that because there’s no text input field anywhere.

It’s a little uneasy for the user because he or she will have to make the keyboard go away when switching from another app back into a Cocos2d-x app.

Thanks! We will deal with them in these days!

@Strawberry Milkshake,
-The Volatexture::removeTexture method is called in the destructor of class CCTexture2D.

oops, I can’t reproduce the pop up keyboard - home key switching bug on my HUAWEI U8800, android 2.2.
Strawberry, what’s your device type & android version?

`Bin Zhang: woops, you’re right! I totally missed that one, sorry :blush:

`Walzer Wang:

I’m using a HTC Desire with Android 2.2. Haven’t checked it on the emulator though, so it could be HTC-specific bug.

Cocos2d-x version is the latest from Git, of course.

Okay, just tested on the emulator with Android 2.2. It appears to be a HTC-specific bug indeed :frowning:

I have created an issue #494 to fix the error function name,
and #495 to resolve memory leak.

Thank you.

Ming, we should test CCTextFieldTTF more on different android versions & devices, and make it perfect.

@Strawberry Milkshake
We reproduce the bug of TextField you mentioned on moto xoom. #497 is created for this.
By the way, #494 & #495 are fixed today. I just merge the commits a few minutes ago.

Awesome! You guys are fast! :slight_smile:

ha, #497 is fixed at last night. You can get the edge version and have a try.

You and Minggo and Bin have just become my personal heroes

(translation: yes, looks like it’s fixed :slight_smile: )

Sorry to revive an old thread, but I am having this issue on my Samsung Galaxy Tab 10.1.

I am using CCTextFieldTTF as in the TextInputTest to display the keyboard and enter text. If I open the app and open/close the textinput, then minimize by pressing the home button and then switching back, the textinput will appear again for no reason.

On my Samsung Galaxy s3 I don’t have the problem, instead I have another problem. If I minimize the app while a textinput is visible and then switch back to the app, the textinput will be gone.

I’m not sure what could be causing this and any help would be very much appreciated. I am using Cocos2d-x 2.0.1.

One error/message I am getting related to the Tab problem is this:

"PhoneWindow - couldn't save which view has focus because the focused view org.cocos2dx.lib.Cocos2dxEditText@408580d8 has no id."

Is there something special I need to add to the main.xml file?

Right now I have:

Anyone have any ideas/suggestions?