Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

bug: native.showPopup function is adding 2 empty tables to lua stack
Started by RedBeach Oct 18 2017 06:09 PM

5 replies to this topic
luastack luac luacapi tables empty stack bug lua enterprise native
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

RedBeach

[GLOBAL: userInfoPane.html]
RedBeach
  • Corona Geek

  • 1,132 posts
  • Corona SDK

I think there is a bug inside the native.showPopup.  After you call it (let's say asking for "mail" or even "requestAppPermission") I noticed the 2 empty tables are being added to the lua stack and they stay there forever.

 

That is causing issues with my Android Broadcast receiver functions that I have that calls a lua function. Since there are 2 empty tables taking the index 1 and 2, the callback lua function is added to index 3 and therefore is not called.

 

So for now I am having to clear the lua stack manually (using luaState.setTop(0)), but I do think that Corona would want to fix that bug.

 



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,588 posts
  • Corona SDK

Be sure to file a bug.  While they may see it here, the best way is via the bug tool.

 

I'd provide just a basic sample with a native popup, since this is one of those cases where it isn't specific to your app.

 

Cheers,

Ed

 

PS - If you already did, that's cool.  I just wanted to be sure you got this into the bug pipeline.



[TOPIC: post.html]
#3

RedBeach

[GLOBAL: userInfoPane.html]
RedBeach
  • Corona Geek

  • 1,132 posts
  • Corona SDK

I tried but after filling the form I get..

Attached Files



[TOPIC: post.html]
#4

Bektur

[GLOBAL: userInfoPane.html]
Bektur
  • Contributor

  • 150 posts
  • Corona Staff

Bug submission page works for me on Chrome (Mac), please try again.



[TOPIC: post.html]
#5

RedBeach

[GLOBAL: userInfoPane.html]
RedBeach
  • Corona Geek

  • 1,132 posts
  • Corona SDK

I was on Chome (Mac).

 

That was the page that I got after submitting the bug report.

 

UPDATE: Tried again and same error after submitting the form. Maybe my code example is too big? (~8mb)



[TOPIC: post.html]
#6

Bektur

[GLOBAL: userInfoPane.html]
Bektur
  • Contributor

  • 150 posts
  • Corona Staff

Yes, large attachment is a problem. I asked the team to look into it.




[topic_controls]
[/topic_controls]