Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Simulator gets stuck once a while for 5 seconds right after it's launched (since G2)
Started by joe528 Feb 12 2014 07:47 PM

18 replies to this topic
[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

joe528

[GLOBAL: userInfoPane.html]
joe528
  • Contributor

  • 800 posts
  • Corona SDK

Since I started to use Corona builds with G2, I immediately found that the Simulator (Mac) gets stuck while starting up sometimes, here are the symptoms:

 

(1) It happens right after I start the Simulator (with some code, no matter what kind of code) and I try to click something in the Simulator (for my app UI operation)

 

(2) It does not happen every time, it only happens 1 out of 6-7 times when launched

 

(3) It gets stuck for about 5 seconds (the cursor in Mac becomes the circle spinning). I have to wait for 5 seconds because it's not responsive and after that, everything goes normal

 

(4) It NEVER happens in G1 before

 

I have been quiet about this issue because it only happens 1 out of 6-7 times, and for just 5 seconds, I thought I could live with it.

 

And I thought it might get fixed soon... but it just happens everyday and becomes "a bit" annoying... 

 

Is it just me seeing this issue? any +1?



[TOPIC: post.html]
#2

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

I've never seen this issue on my Mac.

I've been using G2 including the early betas without seeing what you're describing.

 

My setup:

iMac 27" Intel Core i7 3.4GHz

AMD Radeon HD 6970M 2GB

8GB RAM

OSX Mavericks 10.9.1

Xcode 5.0.2



[TOPIC: post.html]
#3

joe528

[GLOBAL: userInfoPane.html]
joe528
  • Contributor

  • 800 posts
  • Corona SDK

My Mac setup is almost the same as yours except mine is i5 2.7GHz

 

I think probably it's related to the widget... both of my app that I am building recently have widgets in the start up screen, one is using a scrollView while the other is using tableView

 

It really gets stuck now & then... Already 3 times today for me



[TOPIC: post.html]
#4

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

Strange. I have apps with table views, but I haven't seen this issue so far when testing the app in the Simulator.

I haven't used scroll views in any of my apps yet though...

 

It sounds very weird.

Do you think there could be some 3rd party software running in the background that could interfere with the Simulator launch?



[TOPIC: post.html]
#5

joe528

[GLOBAL: userInfoPane.html]
joe528
  • Contributor

  • 800 posts
  • Corona SDK

My second project is a very small project, no plugins in build.settings

 

with only 1000 lines of code

 

and it still gets stuck

 

Besides, I have another laptop, Mac Retina 15", and I see this same problem while using this laptop too.



[TOPIC: post.html]
#6

joe528

[GLOBAL: userInfoPane.html]
joe528
  • Contributor

  • 800 posts
  • Corona SDK

Or probably my editor? I am using ZeroBrane

 

I use this editor for both computers... otherwise there shouldn't be other 3rd party software in the background because for my laptop, I don't open many other software except browsers...



[TOPIC: post.html]
#7

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

That could be it. 

I'm using Corona Editor with Sublime Text 3 nowadays with no problems. 

 

I was using Lua Glider before, but editing was way too slow in general. I didn't experience the same issue as you do though. For me it was the editor in Lua Glider that was just too sluggish.



[TOPIC: post.html]
#8

joe528

[GLOBAL: userInfoPane.html]
joe528
  • Contributor

  • 800 posts
  • Corona SDK

The first editor I was using is Lua Glider too, but it gets stuck somehow and I could never recover it. I wrote to Glider and they offered some fix, but after a few tries, it's still stuck, so I totally gave up.

 

ZeroBrane has the advantage to be light-weight, which is the reason I like. But it does have some problem in CPU usage, taking 6% while it's idle.

 

Maybe I should move on to Sublime then. I just haven't tried to figure out how to pop up the output window stuff.



[TOPIC: post.html]
#9

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

It takes a while getting used to, but I've grown to like it.

I'm using Sublime Text 3. Even though it's officially in beta it's very stable (it's been in beta for quite some time).

 

Once the Corona Editor plugin is installed you can open the folder with your project files. Locate your main.lua and press Command-Fn-F10 which starts the Simulator. It also automatically opens an output viewport at the bottom of the main editing window so you can monitor print() statements / errors that are output by your app.



[TOPIC: post.html]
#10

joe528

[GLOBAL: userInfoPane.html]
joe528
  • Contributor

  • 800 posts
  • Corona SDK

Thanks man

 

I will give it a try



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,476 posts
  • Enterprise

At least try and run the Corona simulator directly instead of from ZeroBane to eliminate it from the issue.

 

Rob



[TOPIC: post.html]
#12

paulclinger

[GLOBAL: userInfoPane.html]
paulclinger
  • Enthusiast

  • 85 posts
  • Corona SDK

> Since I started to use Corona builds with G2

 

@Joa528, what is G2? I've never seen this issue, but I may be running a different version of Corona. I'll be glad to check, just want to make sure I try to reproduce your setup.

 

It would be interesting to look at dtrace to see what the application is doing during that time. You can launch the simulator from ZBS and run dtrace on that process in a terminal window. I'd also be interested to check if you get this issue with the latest ZBS as it could be that the same fix would resolve this as well (if it's indeed ZBS-related). Thank you! Paul.



[TOPIC: post.html]
#13

joe528

[GLOBAL: userInfoPane.html]
joe528
  • Contributor

  • 800 posts
  • Corona SDK

@paulclinger

 

G2 means Graphic 2.0... If you use Corona build later than 2013.2000, you are having G2.

 

"Graphics 2.0 Daily Builds start with #2013.2000, and build #2013.2076 is the first official Public Release."



[TOPIC: post.html]
#14

paulclinger

[GLOBAL: userInfoPane.html]
paulclinger
  • Enthusiast

  • 85 posts
  • Corona SDK

@joe528, so, you simply start debugging from ZBS and the Simulator gets stuck? Or are there any other steps you do? Anything in ZBS config files that may be of relevance? I've tried at least 20 times using 2013.2100 and haven't seen a single delay. I'm waiting for one other 10.9.2 computer to try and will let you know if I can reproduce, but any additional information may be useful. Thank you.



[TOPIC: post.html]
#15

joe528

[GLOBAL: userInfoPane.html]
joe528
  • Contributor

  • 800 posts
  • Corona SDK

@paulclinger

 

I press the start button in ZBS to start the Simulator.

 

The simulator always start immediately. And then you have to use your mouse to click on the Simulator (some app UI), and then sometimes it gets stuck here. 

 

When I mean it gets stuck, only the Simulator is not responding at this moment for 6-8 seconds. All other Mac applications (including ZBS) are functional.



[TOPIC: post.html]
#16

paulclinger

[GLOBAL: userInfoPane.html]
paulclinger
  • Enthusiast

  • 85 posts
  • Corona SDK

@joe528, thank you, that helps. Do you see anything in the Output window of ZBS during that time? Has the debugging already started? If you add "print 'something'" after "require('mobdebug').start()", does it get printed before the simulator stops responding?



[TOPIC: post.html]
#17

joe528

[GLOBAL: userInfoPane.html]
joe528
  • Contributor

  • 800 posts
  • Corona SDK

@paulclinger

 

I don't even use "require("mobdebug").start()" in my code when having the problem.

 

As far as if it's still printing something, I think it's not.

 

I will let you know when I see it again.

 

However, it seems not happening as often as before. Only once yesterday. I deliberately tried to reproduce it just now, but I couldn't after 10 tries.



[TOPIC: post.html]
#18

paulclinger

[GLOBAL: userInfoPane.html]
paulclinger
  • Enthusiast

  • 85 posts
  • Corona SDK

I haven't been able to reproduce so far either. If this doesn't involve debugging, I can't even imagine what it can be. It's good that it's less frequent now, but it makes it more difficult to figure out what may be going on. I can only suggest to try using strace to check what the simulator may be "doing" while waiting. Another option is to take your code and try to reproduce the issue with it, it you are willing to email it to me (I've done this on several occasions).



[TOPIC: post.html]
#19

joe528

[GLOBAL: userInfoPane.html]
joe528
  • Contributor

  • 800 posts
  • Corona SDK

@paulclinger

 

the code doesn't matter. It happens for all kinds of code, even with a very small project. For example, yesterday, I was reporting a bug to Corona and the project contains only 20 lines of code and I saw the problem happens once.

 

By the way, through our discussion, I cannot say 100% it's editor causing this problem.

 

I will keep observing and keep you updated if I have new information.

 

Really thanks for your help. 




[topic_controls]
[/topic_controls]