Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
APPLICATION_SUSPEND strong bug ! — Gideros Forum

APPLICATION_SUSPEND strong bug !

YanYan Member
edited April 2018 in Bugs and issues
Just try this code in windows player or windows exported exe. After you focus out player and then return focus back to player, it goes hang and has glitches, you can try to push play button and it wouldnt work (because player gets hanget).

The problem seems render cant find active application and crashes. Fortunately, this not happens on Android exported apk.

application:setBackgroundColor<span class="br0">&#40;</span>0x000000<span class="br0">&#41;</span>
&nbsp;
<span class="kw1">function</span> getScreenShot<span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
	<span class="kw1">local</span> screenShotRender	<span class="sy0">=</span> RenderTarget.new<span class="br0">&#40;</span><span class="nu0">940</span>, <span class="nu0">560</span><span class="br0">&#41;</span>
	screenShotRender:draw<span class="br0">&#40;</span>stage<span class="br0">&#41;</span>
&nbsp;
	<span class="kw1">local</span> screenShot <span class="sy0">=</span> Bitmap.new<span class="br0">&#40;</span>screenShotRender<span class="br0">&#41;</span>
	screenShot:setColorTransform<span class="br0">&#40;</span><span class="nu0">0.3</span>, <span class="nu0">0.3</span>, <span class="nu0">0.3</span>, <span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
	<span class="kw1">return</span> screenShot
&nbsp;
<span class="kw1">end</span>
&nbsp;
stage:addEventListener<span class="br0">&#40;</span>Event.APPLICATION_SUSPEND, getScreenShot, self<span class="br0">&#41;</span>
&nbsp;
stage:addEventListener<span class="br0">&#40;</span>Event.ENTER_FRAME, <span class="kw1">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
		<span class="kw1">if</span> stage.text <span class="kw1">then</span>
&nbsp;
			stage.text:removeFromParent<span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
		<span class="kw1">end</span>
&nbsp;
		stage.text <span class="sy0">=</span> TextFiel
video.gif
1504 x 895 - 684K
vk.com/yan_alex

Comments

Sign In or Register to comment.