Chrome Jam 64bit windows with our App (RIDE)

Hi,

I'm debugging a very odd bug where our application and Google Chrome
somehow end in to a deadlock when running in 64bit Windows 7..

Our application trace indicates that the problem is in wx (trace when
in deadlock):

File: src\robotide\recentfiles\recentfiles.py, line 134, in OnOpenRecent
  self.plugin.open_suite(self.path)
File: src\robotide\pluginapi\plugin.py, line 262, in open_suite
  self.__frame.open_suite(path)
File: src\robotide\ui\mainframe.py, line 176, in open_suite
  self._populate_tree()
File: src\robotide\ui\mainframe.py, line 136, in _populate_tree
  self.tree.populate(self._controller)
File: src\robotide\ui\tree.py, line 154, in populate
  self._clear_tree_data()
File: src\robotide\ui\tree.py, line 160, in _clear_tree_data
  self.DeleteAllItems()
File: C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_controls.py, line 548
9, in DeleteAllItems
  return _controls_.TreeCtrl_DeleteAllItems(*args, **kwargs)
File: src\robotide\utils\eventhandler.py, line 23, in wrapped
  method(self, event)
File: src\robotide\ui\tree.py, line 543, in OnSelChanged
  RideTreeSelection(node=node, item=handler.controller, silent=self._silent_mode
).publish()
File: src\robotide\publish\messages.py, line 65, in publish
  self._publish(self)
File: src\robotide\publish\messages.py, line 71, in _publish
  WxPublisher().sendMessage(msg.topic, msg)
File: C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\lib\pubsub\pubsub1\pub
.py, line 750, in sendMessage
  self.__topicTree.sendMessage(aTopic, message, onTopicNeverCreated)
File: C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\lib\pubsub\pubsub1\pub
.py, line 423, in sendMessage
  deliveryCount += node.sendMessage(message)
File: C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\lib\pubsub\pubsub1\pub
.py, line 261, in sendMessage
  listener(message)
File: src\robotide\publish\publisher.py, line 84, in __call__
  self.listener(event.data)
File: src\robotide\editor\__init__.py, line 118, in OnTreeItemSelected
  self._show_editor()
File: src\robotide\editor\__init__.py, line 111, in _show_editor
  self._editor = self._create_editor()
File: src\robotide\editor\__init__.py, line 115, in _create_editor
  return self._creator.editor_for(self, self._tab, self.tree)
File: src\robotide\editor\editorcreator.py, line 66, in editor_for
  self._editor = editor_class(plugin, editor_panel, controller, tree)
File: src\robotide\editor\editors.py, line 252, in __init__
  _RobotTableEditor.__init__(self, *args)
File: src\robotide\editor\editors.py, line 80, in __init__
  self._populate()
File: src\robotide\editor\editors.py, line 346, in _populate
  TestCaseFileEditor._populate(self)
File: src\robotide\editor\editors.py, line 332, in _populate
  _FileEditor._populate(self)
File: src\robotide\editor\editors.py, line 271, in _populate
  self._add_settings()
File: src\robotide\editor\editors.py, line 131, in _add_settings
  self._settings = self._create_settings()
File: src\robotide\editor\editors.py, line 140, in _create_settings
  editor = settings.create_editor_for(setting)
File: src\robotide\editor\editors.py, line 211, in create_editor_for
  return editor_cls(self.GetPane(), controller, self._plugin, self._tree)
File: src\robotide\editor\settingeditors.py, line 41, in __init__
  self._create_controls()
File: src\robotide\editor\settingeditors.py, line 54, in _create_controls
  self._tooltip = self._get_tooltip()
File: src\robotide\editor\settingeditors.py, line 78, in _get_tooltip
  return Tooltip(self, (500, 350))
File: src\robotide\editor\popupwindow.py, line 50, in __init__
  self._create_ui(size, detachable, autohide)
File: src\robotide\editor\popupwindow.py, line 58, in _create_ui
  handler=self._detach))
File: src\robotide\widgets\button.py, line 23, in __init__
  size=(width, height))
File: C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_controls.py, line 87,
in __init__
  _controls_.Button_swiginit(self,_controls_.new_Button(*args, **kwargs))

Could someone help me where I should look next? And how to debug the
problem from this point on.

Our application is a rather large creature .. thus I think that making
a miniapplication is not the way to go.

RIDE source code is located at https://github.com/robotframework/RIDE
And the issue in our issue tracker ( verified by a large set of users
) : http://code.google.com/p/robotframework-ride/issues/detail?id=714

Kind Regads,
Mikko Korpela

Hi Mikko,

Hi,

I'm debugging a very odd bug where our application and Google Chrome
somehow end in to a deadlock when running in 64bit Windows 7..

Our application trace indicates that the problem is in wx (trace when
in deadlock):

File: src\robotide\recentfiles\recentfiles.py, line 134, in OnOpenRecent
self.plugin.open_suite(self.path)
File: src\robotide\pluginapi\plugin.py, line 262, in open_suite
self.__frame.open_suite(path)
File: src\robotide\ui\mainframe.py, line 176, in open_suite
self._populate_tree()
File: src\robotide\ui\mainframe.py, line 136, in _populate_tree
self.tree.populate(self._controller)
File: src\robotide\ui\tree.py, line 154, in populate
self._clear_tree_data()
File: src\robotide\ui\tree.py, line 160, in _clear_tree_data
self.DeleteAllItems()
File: C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_controls.py, line 548
9, in DeleteAllItems
return _controls_.TreeCtrl_DeleteAllItems(*args, **kwargs)
File: src\robotide\utils\eventhandler.py, line 23, in wrapped
method(self, event)
File: src\robotide\ui\tree.py, line 543, in OnSelChanged
RideTreeSelection(node=node, item=handler.controller, silent=self._silent_mode
).publish()
File: src\robotide\publish\messages.py, line 65, in publish
self._publish(self)
File: src\robotide\publish\messages.py, line 71, in _publish
WxPublisher().sendMessage(msg.topic, msg)
File: C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\lib\pubsub\pubsub1\pub
.py, line 750, in sendMessage
self.__topicTree.sendMessage(aTopic, message, onTopicNeverCreated)
File: C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\lib\pubsub\pubsub1\pub
.py, line 423, in sendMessage
deliveryCount += node.sendMessage(message)
File: C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\lib\pubsub\pubsub1\pub
.py, line 261, in sendMessage
listener(message)
File: src\robotide\publish\publisher.py, line 84, in __call__
self.listener(event.data)
File: src\robotide\editor\__init__.py, line 118, in OnTreeItemSelected
self._show_editor()
File: src\robotide\editor\__init__.py, line 111, in _show_editor
self._editor = self._create_editor()
File: src\robotide\editor\__init__.py, line 115, in _create_editor
return self._creator.editor_for(self, self._tab, self.tree)
File: src\robotide\editor\editorcreator.py, line 66, in editor_for
self._editor = editor_class(plugin, editor_panel, controller, tree)
File: src\robotide\editor\editors.py, line 252, in __init__
_RobotTableEditor.__init__(self, *args)
File: src\robotide\editor\editors.py, line 80, in __init__
self._populate()
File: src\robotide\editor\editors.py, line 346, in _populate
TestCaseFileEditor._populate(self)
File: src\robotide\editor\editors.py, line 332, in _populate
_FileEditor._populate(self)
File: src\robotide\editor\editors.py, line 271, in _populate
self._add_settings()
File: src\robotide\editor\editors.py, line 131, in _add_settings
self._settings = self._create_settings()
File: src\robotide\editor\editors.py, line 140, in _create_settings
editor = settings.create_editor_for(setting)
File: src\robotide\editor\editors.py, line 211, in create_editor_for
return editor_cls(self.GetPane(), controller, self._plugin, self._tree)
File: src\robotide\editor\settingeditors.py, line 41, in __init__
self._create_controls()
File: src\robotide\editor\settingeditors.py, line 54, in _create_controls
self._tooltip = self._get_tooltip()
File: src\robotide\editor\settingeditors.py, line 78, in _get_tooltip
return Tooltip(self, (500, 350))
File: src\robotide\editor\popupwindow.py, line 50, in __init__
self._create_ui(size, detachable, autohide)
File: src\robotide\editor\popupwindow.py, line 58, in _create_ui
handler=self._detach))
File: src\robotide\widgets\button.py, line 23, in __init__
size=(width, height))
File: C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_controls.py, line 87,
in __init__
_controls_.Button_swiginit(self,_controls_.new_Button(*args, **kwargs))

Could someone help me where I should look next? And how to debug the
problem from this point on.

Step 1, look closely at that traceback and see if everything it's doing makes total sense to you. :wink: I don't know your app and framework, but I have a very hard time believing what it's doing is actually intended behavior.

Our application is a rather large creature .. thus I think that making
a miniapplication is not the way to go.

Let me rephrase that for you: our app is so big and complex that creating a mini application that reproduces the problem sounds like a lot of work, and so I'm hoping instead that someone will just download our app and start debugging it for free.

If you want people to volunteer their free time to help you, you should show some willingness to do your part, as it is your app and your problem. And BTW, especially after looking at that traceback, I am very skeptical that Chrome is involved in any way. I suspect it's a case of confusing correlation with causation.

Regards,

Kevin

···

On Jan 31, 2012, at 6:49 AM, Mikko Korpela wrote:

RIDE source code is located at GitHub - robotframework/RIDE: Test data editor for Robot Framework
And the issue in our issue tracker ( verified by a large set of users
) : Rename Variable · Issue #714 · robotframework/RIDE · GitHub

Kind Regads,
Mikko Korpela

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

What makes you think that Chrome is involved? Just that it happens to be running at the same time?

···

On 1/31/12 6:49 AM, Mikko Korpela wrote:

Hi,

I'm debugging a very odd bug where our application and Google Chrome
somehow end in to a deadlock when running in 64bit Windows 7..

--
Robin Dunn
Software Craftsman

Mikko Korpela wrote:

I'm debugging a very odd bug where our application and Google Chrome
somehow end in to a deadlock when running in 64bit Windows 7..

How is Chrome involved here in any way?

Our application trace indicates that the problem is in wx (trace when
in deadlock):

Well, sort of.

Could someone help me where I should look next? And how to debug the
problem from this point on.

Did you follow the trace here? As part of opening a new document, you
are calling DeleteAllItems on a tree control. That's triggering your
"event wrapper", which is publishing a message saying the tree selection
changed. That's triggering OnTreeItemSelected, which is now trying to
create an item editor for the newly selected item. But you don't HAVE a
newly selected item -- you're deleting all of the items.

I think you could argue that the bug here is when your event wrapper
published a "tree selection changed" message for a DeleteAllItems
request, but without knowing more about the application, that's only a
guess.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Hi,

Thanks Kevin for your thoughts.. Let me rephrase my question: Could
someone give me some links to follow, so I could get started at
debugging the side of code (wxpython and most likely native wxwidgets)
that I'm unfamiliar with. I'm currently working almost only with
Python and I am not very familiar with debugging this kind of windows
platform specific problems.

I believe this is much faster than making the miniapp -- and I'm also
expecting that I will learn something useful in the process.

Robin: What makes you think that Chrome is involved? Just that it happens to be running at the same time?

A) Problem occurs only when Chrome is running (not always but very often)
B) It is solved by stopping Chrome (our application runs freely after
this) --> This indicates in my humble opinion that there is causality
involved
C) It has been reported many many times:
Rename Variable · Issue #714 · robotframework/RIDE · GitHub --
note that our users are testers or people doing test automation
D) I've reproduced it many times
E) Our application is a multiplatform application and the problem
happens only in 64 bit windows --> It must be related to things that
work differently in different platforms (wxpython)

···

2012/1/31 Tim Roberts <timr@probo.com>:

Mikko Korpela wrote:

I'm debugging a very odd bug where our application and Google Chrome
somehow end in to a deadlock when running in 64bit Windows 7..

How is Chrome involved here in any way?

Our application trace indicates that the problem is in wx (trace when
in deadlock):

Well, sort of.

Could someone help me where I should look next? And how to debug the
problem from this point on.

Did you follow the trace here? As part of opening a new document, you
are calling DeleteAllItems on a tree control. That's triggering your
"event wrapper", which is publishing a message saying the tree selection
changed. That's triggering OnTreeItemSelected, which is now trying to
create an item editor for the newly selected item. But you don't HAVE a
newly selected item -- you're deleting all of the items.

I think you could argue that the bug here is when your event wrapper
published a "tree selection changed" message for a DeleteAllItems
request, but without knowing more about the application, that's only a
guess.

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

--
Mikko Korpela

Mikko Korpela wrote:

Let me rephrase my question: Could
someone give me some links to follow, so I could get started at
debugging the side of code (wxpython and most likely native wxwidgets)
that I'm unfamiliar with. I'm currently working almost only with
Python and I am not very familiar with debugging this kind of windows
platform specific problems.

Don't be so quick to point the finger. The fact that this only occurs
on one platform does not necessarily mean that your code is not at
fault. After all, the stack contains 15 of your files, and only 1 wx
file (in two separate places).

It's possible that Chrome installs a Windows hook. That kind of thing
can be very difficult to chase down. You might need to use windbg or
the Visual Studio debugger to break into the process and see what it's
actually waiting for. Clearly, it's not really blocked at
_controls_.Button_swiginit, it's blocked in the C code underneath that.
That cannot be debugged with the Python debugger.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Thanks for the information. I'll start working with debugging wxpython
code tomorrow.

This bug still amazes me (original report to our bug tracker is almost
year old now) - how the heck two unrelated programs can interact in
this way..

···

2012/1/31 Tim Roberts <timr@probo.com>:

Mikko Korpela wrote:

Let me rephrase my question: Could
someone give me some links to follow, so I could get started at
debugging the side of code (wxpython and most likely native wxwidgets)
that I'm unfamiliar with. I'm currently working almost only with
Python and I am not very familiar with debugging this kind of windows
platform specific problems.

Don't be so quick to point the finger. The fact that this only occurs
on one platform does not necessarily mean that your code is not at
fault. After all, the stack contains 15 of your files, and only 1 wx
file (in two separate places).

It's possible that Chrome installs a Windows hook. That kind of thing
can be very difficult to chase down. You might need to use windbg or
the Visual Studio debugger to break into the process and see what it's
actually waiting for. Clearly, it's not really blocked at
_controls_.Button_swiginit, it's blocked in the C code underneath that.
That cannot be debugged with the Python debugger.

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

--
Mikko Korpela

Hello all,

I tried to debug wx but it just wasn't as good idea as I thought. But
I finally did a mini application that can reproduce the problem.

For some reason I can not reproduce the problem from command line with
it - only when running through PyCharm.

Can someone with 64 bit windows 7 reproduce the problem with this little app?

link to the mini application: This seems to jam while Chrome is running · GitHub

···

2012/1/31 Mikko Korpela <mikko.korpela@gmail.com>:

2012/1/31 Tim Roberts <timr@probo.com>:

Mikko Korpela wrote:

Let me rephrase my question: Could
someone give me some links to follow, so I could get started at
debugging the side of code (wxpython and most likely native wxwidgets)
that I'm unfamiliar with. I'm currently working almost only with
Python and I am not very familiar with debugging this kind of windows
platform specific problems.

Don't be so quick to point the finger. The fact that this only occurs
on one platform does not necessarily mean that your code is not at
fault. After all, the stack contains 15 of your files, and only 1 wx
file (in two separate places).

It's possible that Chrome installs a Windows hook. That kind of thing
can be very difficult to chase down. You might need to use windbg or
the Visual Studio debugger to break into the process and see what it's
actually waiting for. Clearly, it's not really blocked at
_controls_.Button_swiginit, it's blocked in the C code underneath that.
That cannot be debugged with the Python debugger.

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Thanks for the information. I'll start working with debugging wxpython
code tomorrow.

This bug still amazes me (original report to our bug tracker is almost
year old now) - how the heck two unrelated programs can interact in
this way..

--
Mikko Korpela

--
Mikko Korpela

It seems to be more easily reproducable if Windows 7 Service Pack 1 is
not installed.

(Tried the script on another 64 Windows 7 and it worked from command prompt)

···

2012/2/9 Mikko Korpela <mikko.korpela@gmail.com>:

Hello all,

I tried to debug wx but it just wasn't as good idea as I thought. But
I finally did a mini application that can reproduce the problem.

For some reason I can not reproduce the problem from command line with
it - only when running through PyCharm.

Can someone with 64 bit windows 7 reproduce the problem with this little app?

link to the mini application: This seems to jam while Chrome is running · GitHub

2012/1/31 Mikko Korpela <mikko.korpela@gmail.com>:

2012/1/31 Tim Roberts <timr@probo.com>:

Mikko Korpela wrote:

Let me rephrase my question: Could
someone give me some links to follow, so I could get started at
debugging the side of code (wxpython and most likely native wxwidgets)
that I'm unfamiliar with. I'm currently working almost only with
Python and I am not very familiar with debugging this kind of windows
platform specific problems.

Don't be so quick to point the finger. The fact that this only occurs
on one platform does not necessarily mean that your code is not at
fault. After all, the stack contains 15 of your files, and only 1 wx
file (in two separate places).

It's possible that Chrome installs a Windows hook. That kind of thing
can be very difficult to chase down. You might need to use windbg or
the Visual Studio debugger to break into the process and see what it's
actually waiting for. Clearly, it's not really blocked at
_controls_.Button_swiginit, it's blocked in the C code underneath that.
That cannot be debugged with the Python debugger.

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Thanks for the information. I'll start working with debugging wxpython
code tomorrow.

This bug still amazes me (original report to our bug tracker is almost
year old now) - how the heck two unrelated programs can interact in
this way..

--
Mikko Korpela

--
Mikko Korpela

--
Mikko Korpela

Hi Mikko,

Hello all,

I tried to debug wx but it just wasn't as good idea as I thought. But
I finally did a mini application that can reproduce the problem.

For some reason I can not reproduce the problem from command line with
it - only when running through PyCharm.

Can someone with 64 bit windows 7 reproduce the problem with this little app?

link to the mini application: This seems to jam while Chrome is running · GitHub

First tried it from within WingIDE 4.1 and I don't see any hang, probably no surprise.

Then I got curious about pyCharm and downloaded it to give it a try, even when running from within pyCharm I don't see your hanging.

But I also don't see the button to jam, unless I add a line p.Show(), or comment out the PopupWindow stuff.

I am on Windows 7 64 bit, Python 2.7.2 32bit, wxPython 2.9.3.1

Werner

···

On 09/02/2012 13:43, Mikko Korpela wrote:

Ok.

I'll try to improve the example as it is also flickering on machines.

···

--
Mikko Korpela

werner <wbruhin@free.fr> kirjoitti 9.2.2012 kello 16.26:

Hi Mikko,

On 09/02/2012 13:43, Mikko Korpela wrote:

Hello all,

I tried to debug wx but it just wasn't as good idea as I thought. But
I finally did a mini application that can reproduce the problem.

For some reason I can not reproduce the problem from command line with
it - only when running through PyCharm.

Can someone with 64 bit windows 7 reproduce the problem with this little app?

link to the mini application: This seems to jam while Chrome is running · GitHub

First tried it from within WingIDE 4.1 and I don't see any hang, probably no surprise.

Then I got curious about pyCharm and downloaded it to give it a try, even when running from within pyCharm I don't see your hanging.

But I also don't see the button to jam, unless I add a line p.Show(), or comment out the PopupWindow stuff.

I am on Windows 7 64 bit, Python 2.7.2 32bit, wxPython 2.9.3.1

Werner

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

I've updated the script This seems to jam while Chrome is running · GitHub

Now it will create new apps in a loop (one will last for one second).
I can get it to stop always by doing stuff with Chrome (start a new
chrome first) while the script is running.

This works from command line.

@werner: Can you reproduce the problem with this one?

···

2012/2/9 Mikko Korpela <mikko.korpela@gmail.com>:

Ok.

I'll try to improve the example as it is also flickering on machines.

--
Mikko Korpela

werner <wbruhin@free.fr> kirjoitti 9.2.2012 kello 16.26:

Hi Mikko,

On 09/02/2012 13:43, Mikko Korpela wrote:

Hello all,

I tried to debug wx but it just wasn't as good idea as I thought. But
I finally did a mini application that can reproduce the problem.

For some reason I can not reproduce the problem from command line with
it - only when running through PyCharm.

Can someone with 64 bit windows 7 reproduce the problem with this little app?

link to the mini application: This seems to jam while Chrome is running · GitHub

First tried it from within WingIDE 4.1 and I don't see any hang, probably no surprise.

Then I got curious about pyCharm and downloaded it to give it a try, even when running from within pyCharm I don't see your hanging.

But I also don't see the button to jam, unless I add a line p.Show(), or comment out the PopupWindow stuff.

I am on Windows 7 64 bit, Python 2.7.2 32bit, wxPython 2.9.3.1

Werner

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

--
Mikko Korpela

Works fine with WingIDE and jams in PyCharm with or WITHOUT Chrome running.

Werner

···

On 09/02/2012 16:15, Mikko Korpela wrote:

I've updated the script This seems to jam while Chrome is running · GitHub

Now it will create new apps in a loop (one will last for one second).
I can get it to stop always by doing stuff with Chrome (start a new
chrome first) while the script is running.

This works from command line.

@werner: Can you reproduce the problem with this one?

Steps to reproduce the problem:
1) start the miniapplication ( This seems to jam while Chrome is running · GitHub )

This will create new application frame with hidden tooltip with a
button. It will destroy the application and make a new one every
second.

2) start google chrome
3) go to for example ( Play Free Online Games | Pogo ) or in
my case also gmail and www.hs.fi seem to work
4) open another tab
5) start typing something in the addressbar
--> at this point the miniapplication should be frozen (last line in
command prompt says "now creating the jam button" )

Kind regards,
Mikko Korpela

···

2012/2/9 werner <wbruhin@free.fr>:

On 09/02/2012 16:15, Mikko Korpela wrote:

I've updated the script This seems to jam while Chrome is running · GitHub

Now it will create new apps in a loop (one will last for one second).
I can get it to stop always by doing stuff with Chrome (start a new
chrome first) while the script is running.

This works from command line.

@werner: Can you reproduce the problem with this one?

Works fine with WingIDE and jams in PyCharm with or WITHOUT Chrome running.

Werner

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en