You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For certain specific data, the first snippet will traceback, the next two will run with no traceback:
#snippet 1: crash with tracebackimportcocoscocos.director.director.init()
sp=cocos.sprite.Sprite("Untitled.png")
tmx_data=cocos.tiles.load_tmx("untitled.tmx")
# snippet 2: no tracebackimportcocoscocos.director.director.init()
cocos.sprite.Sprite("Untitled.png")
tmx_data=cocos.tiles.load_tmx("untitled.tmx")
# snippet 3: no tracebackimportcocoscocos.director.director.init()
tmx_data=cocos.tiles.load_tmx("untitled.tmx")
sp=cocos.sprite.Sprite("Untitled.png")
The traceback, as seen in my system is
Traceback (most recent call last):
File "helloworld.py", line 4, in <module>
tmx_data = cocos.tiles.load_tmx("untitled.tmx")
File "E:\tmp\cocos2d-0.6.4\cocos\tiles.py", line 327, in load_tmx
column_padding=spacing)
File "E:\tmp\cocos2d-0.6.4\cocos\tiles.py", line 634, in from_atlas
gl.glBindTexture(tile_image.texture.target, id)
File "E:\tmp\py35_pyglet_1.24\pyglet\gl\lib.py", line 104, in errcheck
raise GLException(msg)
pyglet.gl.lib.GLException: b'operaci\xf3n no v\xe1lida'
(last line maps to 'pyglet.gl.lib.GLException: invalid operation')
additional info:
windows (64 bits), cocos2d 0.6.4 and pyglet 1.2.4 with Python version 3.5.2 32 bit , py 2.7.12 32bit and py 2.7.12 64bit (original report)
In the first snippet, I guess that by keeping a reference to the sprite the current cocos/pyglet code tries to put the sprite texture and the tiles textures in the same atlas, but the cocos/pyglet code can't fit all in the same texture.
In the 2nd snippet presumably the sprite is garbage collected, the atlas is cleared or garbage collected, so only the tiles texture need to fit in the atlas,
The 3rd snippet lets load_tmx start with an empty atlas, allowing to set all tiles textures, then the sprite texture is fit in the same atlas or in a new atlas if needed.
Added bugdemo in repo los-cocos/etc_code , at directory cocos#291-load_tmx_atlas_traceback
note: as pyglet dev after 1.2.4 changed atlas size, it is better to test with pyglet release 1.2.4 to reproduce;
even if the new atlas size gives no traceback, the underlying problem would be there.
Thanks Zorrent12 for the original report and bugdemo.
The text was updated successfully, but these errors were encountered:
reported in the ML at
https://groups.google.com/forum/#!topic/cocos-discuss/fjnyBKXhSqc
For certain specific data, the first snippet will traceback, the next two will run with no traceback:
The traceback, as seen in my system is
(last line maps to 'pyglet.gl.lib.GLException: invalid operation')
additional info:
Conjecture:
In the first snippet, I guess that by keeping a reference to the sprite the current cocos/pyglet code tries to put the sprite texture and the tiles textures in the same atlas, but the cocos/pyglet code can't fit all in the same texture.
In the 2nd snippet presumably the sprite is garbage collected, the atlas is cleared or garbage collected, so only the tiles texture need to fit in the atlas,
The 3rd snippet lets load_tmx start with an empty atlas, allowing to set all tiles textures, then the sprite texture is fit in the same atlas or in a new atlas if needed.
Added bugdemo in repo los-cocos/etc_code , at directory cocos#291-load_tmx_atlas_traceback
note: as pyglet dev after 1.2.4 changed atlas size, it is better to test with pyglet release 1.2.4 to reproduce;
even if the new atlas size gives no traceback, the underlying problem would be there.
Thanks Zorrent12 for the original report and bugdemo.
The text was updated successfully, but these errors were encountered: