LiveCode Zombie Processes

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

LiveCode Zombie Processes

Post by WaltBrown » Wed Jul 02, 2014 1:14 pm

I am having an issue that when I quit LC, the application quits but the LC process stays active (as reported by the Windows Task Manager). The next time I attempt to open LC, a second zombie LC process appears but not the application. I have to go into Task Manager, end the LC processes manually, then I can restart LC. Has anyone else seen this? I am not certain it is pilot error but might be :-)
Thanks!
Walt Brown
Omnis traductor traditor

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: LiveCode Zombie Processes

Post by magice » Wed Jul 02, 2014 2:21 pm

That usually happens when you have a message pending when LC closes. see pendingMessages in the dictionary

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: LiveCode Zombie Processes

Post by [-hh] » Wed Jul 02, 2014 4:35 pm

..........
Last edited by [-hh] on Wed Aug 13, 2014 3:34 pm, edited 1 time in total.
shiftLock happens

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: LiveCode Zombie Processes

Post by jacque » Wed Jul 02, 2014 6:59 pm

LC will not quit until all open processes are closed or completed. This includes pending messages, but also any open drivers (revSpeak, for example, opens a driver,) or any open sockets (libURL calls, or sockets you have opened in a script) or any handlers that have not yet finished executing. The stack should have a shutdown handler that closes everything it's opened and removes all pending messages from the queue.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: LiveCode Zombie Processes

Post by WaltBrown » Wed Jul 02, 2014 9:39 pm

Thanks. It happens even if I don't do anything, so it may be the annoying, always pending LC toolbar message "There is an updated version". That happens very frequently, as I (and I imagine others) use various versions on the same machine. I turned off all the "Notify me" boxes in Edit->Preferences->Updates and will see what happens.
Walt Brown
Omnis traductor traditor

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: LiveCode Zombie Processes

Post by Mark » Sat Jul 05, 2014 11:27 am

Hi Walt,

After I install a new version of LiveCode, I change the name of .setup.exe to _setup.exe. This prevents the updater from starting and keeps zombie processes away.

Obviously, this doesn't apply to standalones. For standalones, you need to make sure that everything finishes before quitting the app. You can do this with a script like this:

Code: Select all

on quitMyProject
   lock messages
   -- stop using stacks
   put the stacksInUse into myStacks
   repeat for each line myStack in myStacks
      stop using stack myStack
   end repeat
   -- stacks
   put the openStacks into myStacks
   put "message box,home,tool,Message Box,revTools,revMenubar" & comma & the short name of me into myDontClose
   repeat for each line myStack in myStacks
      if myStack is not among the items of myDontClose then close stack myStack
   end repeat
   -- messages
   put the pendingmessages into myMsgs
   repeat for each line myMsg in myMsgs
      cancel item 1 of myMsg
   end repeat
   set the backdrop to none
   // close me
   if the environment is not "development" then
      quit
   end if
end quitMyProject
Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: LiveCode Zombie Processes

Post by WaltBrown » Sat Jul 12, 2014 1:21 am

Good idea, Mark, thanks, I hadn't thought of that.
Walt
Walt Brown
Omnis traductor traditor

Post Reply