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

long string could not display in the label (Texture2D: Error uploading compressed texture level: 0 . glError: 0x0501) #17946

Closed
knuth opened this issue Jun 19, 2017 · 4 comments
Milestone

Comments

@knuth
Copy link

knuth commented Jun 19, 2017

  • cocos2d-x version: 3.15
  • devices test on:
  • developing environments
    • NDK version:
    • Xcode version: 8.3.3
    • VS version:
    • browser type and version:

Steps to Reproduce:

  1. create a new lua project using cocos2d-x 3.15 (old version has the same issue)
  2. in the MainScene:onCreate() function, input the following code:
-----code begin----
   -- add label
    local str = "Developer/CoreSimulator/Devices/2062FCB0-D48C-4EF6-9F79-183861FCE72E/data/Containers/Bundle/Application/18FB6F4E-51E2-49CE-9000-AE5D95AC4502/star-battleapp/src/app//Developer/CoreSimulator/Devices/2062FCB0-D48C-4EF6-9F79-183861FCE72E/data/Containers/Bundle/Application/A875FC8F-20A2-4FCD-B90E-D719DF26880A/star-battle.app"
    --str = "This is a short text" --works well for the short string
    local lable = cc.Label:createWithSystemFont(str, "Arial", 30)
        :move(display.cx, display.cy + 200)
        :addTo(self)
    local size = lable:getContentSize()
    print(size.width, size.height)
-----code end----

Result: nothing is shown up, and the size of the label is (0,0).
I see "cocos2d: Texture2D: Error uploading compressed texture level: 0 . glError: 0x0501" in Xcode log.

@zilongshanren
Copy link
Member

@knuth thanks, I will take a look at this issue later.

@er-bpradip
Copy link

I am also facing same problem. @knuth Is this problem solved? Please let me know the solution if the issue is solved.

@gbrsh
Copy link

gbrsh commented Mar 1, 2018

Same problem here when trying to set a long string in ui::Text.

@drelaptop
Copy link
Contributor

fix by strip the extra text, refer to #19174

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

No branches or pull requests

6 participants