Created
January 16, 2014 09:09
-
-
Save Vavius/8451928 to your computer and use it in GitHub Desktop.
Moai new GC related crash sample. Create a local prop (it will be collected on the first step!) and set its index or invoke any other method that calls ScheduleUpdate(). Crash in DepNodeUpdate when trying to access EVENT_UPDATE listener.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------- | |
-- Copyright (c) 2010-2011 Zipline Games, Inc. | |
-- All Rights Reserved. | |
-- http://getmoai.com | |
---------------------------------------------------------------- | |
MOAISim.openWindow ( "test", 320, 480 ) | |
viewport = MOAIViewport.new () | |
viewport:setSize ( 320, 480 ) | |
viewport:setScale ( 320, -480 ) | |
layer = MOAILayer2D.new () | |
layer:setViewport ( viewport ) | |
MOAISim.pushRenderPass ( layer ) | |
gfxQuad = MOAIGfxQuad2D.new () | |
gfxQuad:setTexture ( "moai.png" ) | |
gfxQuad:setRect ( -128, -128, 128, 128 ) | |
gfxQuad:setUVRect ( 0, 0, 1, 1 ) | |
prop = MOAIProp2D.new () | |
prop:setDeck ( gfxQuad ) | |
layer:insertProp ( prop ) | |
local prop2 = MOAIProp2D.new () | |
prop2:setDeck ( gfxQuad ) | |
prop2:setIndex ( 1 ) | |
prop:moveRot ( 360, 1.5 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment