lynks-- / lifebar

Transparent workspace bar for i3 window manager.
GNU General Public License v2.0
36 stars 6 forks source link

lifebar freezes after a few minutes of launched #18

Closed cig0 closed 9 years ago

cig0 commented 9 years ago

Hi, I'm seeing this behaviour no matter I launch lifebar at i3 startup from ~/.i3/config (exec --no-startup-id "sleep 2; ~/.i3/lifebar") or from the command line: after a few minutes of running it will hang forcing me to kill the process.

Note: I put the sleep command before launching lifebar because a race condition with Compton (transparency won't work otherwise).

Kind regards, -Martín

lynks-- commented 9 years ago

Hi Martín,

ipecho.net (the service lifebar uses to lookup your external IP) is currently having issues and due to the way lifebar evolved to have optional modules, all information is gathered whether or not you actually use a module. In other words, even if you do not include the "extip" module, lifebar will still attempt to read ipecho.net/plain, which as I say is currently experiencing some downtime problems.

Add to this the fact that lifebar is single threaded, and you have blocking issues!

Anyway, the temporary fix right now is just to disable the external IP lookup in ~/.lifebarrc by adding a line:

external false

A longer term solution will come in two parts; 1) only gather information for modules that are actually selected, 2) do potentially blocking tasks in a separate thread.

Hope that helps, -lynks

cig0 commented 9 years ago

Thank you very much for your detailed explanation :+1: , I changed the old IP provider for this one: http://api.ipify.org/ (which returns a plain IP too) and all is well now :balloon: