Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Problem with Gtween and GiderosCodingEasy libraries — Gideros Forum

Problem with Gtween and GiderosCodingEasy libraries

bayopbayop Member
edited July 2013 in General questions
I'm a bit new to Gideros and Lua. I'm working on a game project and I used gween to animate some of the intro screen elements like so using the gtween module;
GTween.new(logo, 2, {y = -logo:getHeight() }, {ease = easing.outBounce, swapValues=true})
This seemed to be working fine until I needed to apply the GiderosCodingEasy module. After I included the module files, I started getting this error;

GiderosCodingEasy.lua:899: stack overflow
stack traceback:
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
...
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
GiderosCodingEasy.lua:899: in function '_new'
libs/GiderosCodingEasy.lua:899: in function
libs/gtween.lua:68: in function 'staticInit'
libs/gtween.lua:433: in main chunk

I tried to look through the lines in code reported in the stacktrace, but I'm struggling to understand what exactly went wrong. However, from what I can tell, it appears that the app is being thrown into an infinite loop in the Shape constructor due to conflicts in both libraries. The reported lines are reproduced below;

GTWEEN

68. function GTween.staticInit()
69. GTween.shape = Shape.new()
70. GTween.shape:addEventListener(Event.ENTER_FRAME, GTween.staticTick)
71. GTween.time = os.timer()
72. end

443. function GTween:invalidate()
444. self._inited = false;
445. if self._position > 0 then
446. self._position = 0
447. end
448. if self.autoPlay then
449. self:setPaused(false)
450. end
451. end

GIDEROSCODINGEASY

896. Shape._new = Shape.__new
...
898. function Shape.__new()
899. local shape = Shape._new()
900. shape._lastPoint = nil
901. shape._allPoints = {}
902. return shape
903. end

I strongly feel that line 896 in GiderosCodingEasy is somehow responsible for this...

Likes: CodeVanya

+1 -1 (+1 / -0 )Share on Facebook

Comments

Sign In or Register to comment.