{"issue":{"created_at":"2011-11-27T23:44:30Z","state":"open","updated_at":"2011-11-28T07:41:26Z","user":{"gravatar_id":"95198572b00e5fbcd97fb5315215bf7a","id":57394,"url":"https://api.github.com/users/fperez","avatar_url":"https://secure.gravatar.com/avatar/95198572b00e5fbcd97fb5315215bf7a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"fperez"},"comments":3,"body":"It turns out that the merge of #956 introduced a serious, major problem with the Qt console.  Unfortunately it's intermittent, which is why we didn't notice it during review, but we do need to fix it.  \r\n\r\nSymptoms: sometimes, perhaps one out of every four or five invocations, the qt console will not display the first prompt.  It shows the banner but the input prompt never appears.  The only solution is to kill it and try again, hoping for better.  From a git bisection I did, it appears the first bad commit was e9402d7c6cd7b06c5a06ea.  The way to test this is simply to reset to that commit, *make sure you remove all .pyc files just in case* and then try opening multiple times the qt console.  Eventually, you'll see an instance where it comes out with no input prompt.\r\n\r\n@Carreau, I hope you'll be able to figure out a solution for this one... Some detective work by @takluyver pinpointed the issue somewhat, here's our IRC log:\r\n\r\n```\r\n<takluyver> with the Qt one, I think it's to do with the order of requests\r\n<fperez__> mh\r\n<takluyver> there are now 3 requests getting made during startup\r\n<takluyver> one for the prompt number, one for the history, and the one that commit added for the list of magics, which is triggered by the first reply on the shell channel.\r\n<fperez__> yes\r\n<fperez__> is the callback triggering the problem?\r\n<takluyver> Not quite sure\r\n<takluyver> when I tried putting print statements in, the problem stopped happening\r\n<takluyver> I also can't get it to happen with --plain or --pure\r\n<takluyver> damn thing's quantum, just observing it affects it ;)\r\n<fperez__> it's some kind of race condition, so the smallest change to the code will make it go away.\r\n<fperez__> yes, they're called heisenbugs\r\n<takluyver> aha\r\n<fperez__> the very worst kind.\r\n```\r\n\r\nIn any case, this is a major blocker.  If a full solution isn't found, we'll have to revert the dynamic magic menu out altogether, but I hope we can find a fix.","assignee":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2362821,"labels":[{"name":"prio-high","color":"e35610","url":"https://api.github.com/repos/ipython/ipython/labels/prio-high"},{"name":"qtconsole","color":"027a10","url":"https://api.github.com/repos/ipython/ipython/labels/qtconsole"},{"name":"type-bug","color":"d9596c","url":"https://api.github.com/repos/ipython/ipython/labels/type-bug"}],"number":1057,"title":"Blocker: Qt console broken after \"all magics\" menu became dynamic","closed_at":null,"html_url":"https://github.com/ipython/ipython/issues/1057","milestone":{"created_at":"2011-04-10T01:57:33Z","state":"open","due_on":null,"closed_issues":111,"creator":{"gravatar_id":"95198572b00e5fbcd97fb5315215bf7a","id":57394,"url":"https://api.github.com/users/fperez","avatar_url":"https://secure.gravatar.com/avatar/95198572b00e5fbcd97fb5315215bf7a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"fperez"},"number":6,"description":"Stabilization of new apis after we get 0.11 out the door.","title":"0.12","url":"https://api.github.com/repos/ipython/ipython/milestones/6","open_issues":32},"url":"https://api.github.com/repos/ipython/ipython/issues/1057"},"action":"created","comment":{"created_at":"2011-11-28T07:41:26Z","updated_at":"2011-11-28T07:41:26Z","user":{"gravatar_id":"4d4ea6148fef59dff9fa0fc8c309496a","id":335567,"url":"https://api.github.com/users/Carreau","avatar_url":"https://secure.gravatar.com/avatar/4d4ea6148fef59dff9fa0fc8c309496a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"Carreau"},"body":"Hum, I'm totally unable to reproduce this bug (on my debian at least, i'll try on mac). even after 25 launch in a row. \r\nI'm ok to try 100, maybe the 25 last will all crash, we never know with randomness.\r\n\r\n\r\nI've already connect the action to kernel `firstResponse` to avoid this bug that otherwise appear 100% of the time. So maybe it's a deeper issue.\r\nI'm not familiar with the kerner startup internals. Do you think it can get confuse if it get the request for the list of magic too early ?  Does the bug still appear if you change `get_ipython().lsmagic()` (mainwindow.py L619) to a more simple expression like `[\"item1\",\"item2\"]` ?\r\n\r\nDo you think just setting a timer after which updating the menu might be enough or do you want something more specific.\r\nlike updating after history request...? \r\n\r\nI can also propose to leave the \"static\" menu at startup but put a 'update menu' at the top of it (ie, just don't trigger the auto update as startup).","id":2893910,"url":"https://api.github.com/repos/ipython/ipython/issues/comments/2893910"}}