Need help debugging Phoenix in a application being migrated from Classic

I am already burning my brain for too many weeks!

I am migrating RIDE from Classic wxPython to Phoenix. I have a major bug that only happens with Phoenix (and not with 2.8.12.1 and 3.0.2). My branch with debugging output is https://github.com/HelioGuilherme66/RIDE/tree/wxPhoenix.
The application features a Text Editor and Cell Editor (Spreadsheet like) for Robot Framework testing files.
Recommended Setup:
Install robotframework with:
pip install robotframework

``

Install Phoenix (for example for Python 2.7 in Windows 64bit):
pip install http://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.3.dev2030+028d173-cp27-cp27m-win_amd64.whl

``

or
Install Phoenix (for example for Python 2.7 in Linux 64bit):
pip install https://github.com/HelioGuilherme66/Phoenix/releases/download/v3.0.3.dev2001/wxPython_Phoenix-3.0.3-cp27-none-linux_x86_64.whl

``

Install RIDE (or get the code) (please see the installation instructions in the Wiki):
pip install https://github.com/HelioGuilherme66/RIDE/archive/wxPhoenix.zip

``

Example.robot (804 Bytes)

RIDE_example.png

···

If using the source code, you may run with:
invoke devel

``

or
python src/robotide/init.py

``


Description of the blocking bug (when running in Fedora Core 22 x64):
1 - Enter a keyword in a Cell, or edit exiting value.
2.1 - If running from installed RIDE (or with PyCharm), there will be an “maximum recursion limit” error in RIDE Log.
But the Cell content is correctly changed.
2.2 - If running from source code, the application will crash with Segmentation fault.

If you start editing a Cell but keep the value unchanged, there will be no problem.


The CellEditor methods include a feature to look up the imported libraries in the Test File and suggest known values (by using Control+Space). The problem is when saving the editing to the file context, there is a recursive call to the storing methods (the moment we conclude the editing).
Why does this code breaks with Phoenix and not with 2.8.12.1 and 3.0.2?
(I want to improve the code, but I would be happy with a workaround or if confirmed that is Phoenix bug).

The problematic code is in file
src/robotide/editor/kweditor.py.


Attached is an example file. And image of it opened in RIDE.

Please help this Software Tester (also Software Archeologist :slight_smile: ), I will help testing your open source projects if you want :).

Thank you,
Help

Can you narrow this down to a self-contained test case at all?

I tried, but I could not get your program to run. I got:
AttributeError: No attribute or settings with name '_editor' found

Can you get the stack trace of the segmentation fault?

Scott

···

On Fri, 27 May 2016, Hélio Guilherme wrote:

I am already burning my brain for too many weeks!

I am migrating RIDE from Classic wxPython to Phoenix. I have a major bug
that only happens with Phoenix (and not with 2.8.12.1 and 3.0.2). My branch
with debugging output is
https://github.com/HelioGuilherme66/RIDE/tree/wxPhoenix.
The application features a Text Editor and Cell Editor (Spreadsheet like)
for Robot Framework testing files.
Recommended Setup:
Install robotframework with:
pip install robotframework

Install Phoenix (for example for Python 2.7 in Windows 64bit):
pip installhttp://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.3.dev2030+
028d173-cp27-cp27m-win_amd64.whl
or
Install Phoenix (for example for Python 2.7 in Linux 64bit):
pip installhttps://github.com/HelioGuilherme66/Phoenix/releases/download/v3.0.3.dev200
1/wxPython_Phoenix-3.0.3-cp27-none-linux_x86_64.whl

Install RIDE (or get the code) (please see the installation instructions in
the Wiki):
pip install https://github.com/HelioGuilherme66/RIDE/archive/wxPhoenix.zip

-----
If using the source code, you may run with:
invoke devel
or
python src/robotide/__init__.py

-----

Description of the blocking bug (when running in Fedora Core 22 x64):
1 - Enter a keyword in a Cell, or edit exiting value.
2.1 - If running from installed RIDE (or with PyCharm), there will be an
"maximum recursion limit" error in RIDE Log.
But the Cell content is correctly changed.
2.2 - If running from source code, the application will crash with
Segmentation fault.

If you start editing a Cell but keep the value unchanged, there will be no
problem.

-----
The CellEditor methods include a feature to look up the imported libraries
in the Test File and suggest known values (by using Control+Space). The
problem is when saving the editing to the file context, there is a recursive
call to the storing methods (the moment we conclude the editing).
Why does this code breaks with Phoenix and not with 2.8.12.1 and 3.0.2?
(I want to improve the code, but I would be happy with a workaround or if
confirmed that is Phoenix bug).

The problematic code is in file src/robotide/editor/kweditor.py.
-----

Attached is an example file. And image of it opened in RIDE.

Please help this Software Tester (also Software Archeologist :slight_smile: ), I will
help testing your open source projects if you want :).

Thank you,
Help

Hi,

I got similar error on mac os x

DEBUG: Recursion Limit 1000

Traceback (most recent call last):

File “/usr/local/lib/python2.7/site-packages/robotide/application/application.py”, line 56, in OnInit

self._plugin_loader.enable_plugins()

File “/usr/local/lib/python2.7/site-packages/robotide/application/pluginloader.py”, line 36, in enable_plugins

p.enable_on_startup()

File “/usr/local/lib/python2.7/site-packages/robotide/application/pluginconnector.py”, line 51, in enable_on_startup

self.enable()

File “/usr/local/lib/python2.7/site-packages/robotide/application/pluginconnector.py”, line 56, in enable

self._plugin.enable()

File “/usr/local/lib/python2.7/site-packages/robotide/editor/texteditor.py”, line 61, in enable

self._open()

File “/usr/local/lib/python2.7/site-packages/robotide/editor/texteditor.py”, line 96, in _open

self.show_tab(self._editor)

File “/usr/local/lib/python2.7/site-packages/robotide/pluginapi/plugin.py”, line 134, in getattr

raise AttributeError("No attribute or settings with name '%s' found" % name)

AttributeError: No attribute or settings with name ‘_editor’ found

OnInit returned false, exiting…

···

On Friday, May 27, 2016 at 7:06:15 PM UTC-7, Scott Talbert wrote:

On Fri, 27 May 2016, Hélio Guilherme wrote:

I am already burning my brain for too many weeks!

I am migrating RIDE from Classic wxPython to Phoenix. I have a major bug

that only happens with Phoenix (and not with 2.8.12.1 and 3.0.2). My branch

with debugging output is

https://github.com/HelioGuilherme66/RIDE/tree/wxPhoenix.

The application features a Text Editor and Cell Editor (Spreadsheet like)

for Robot Framework testing files.

Recommended Setup:

Install robotframework with:

pip install robotframework

Install Phoenix (for example for Python 2.7 in Windows 64bit):

pip installhttp://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.3.dev2030+

028d173-cp27-cp27m-win_amd64.whl

or

Install Phoenix (for example for Python 2.7 in Linux 64bit):

pip installhttps://github.com/HelioGuilherme66/Phoenix/releases/download/v3.0.3.dev200

1/wxPython_Phoenix-3.0.3-cp27-none-linux_x86_64.whl

Install RIDE (or get the code) (please see the installation instructions in

the Wiki):

pip install https://github.com/HelioGuilherme66/RIDE/archive/wxPhoenix.zip


If using the source code, you may run with:

invoke devel

or

python src/robotide/init.py


Description of the blocking bug (when running in Fedora Core 22 x64):

1 - Enter a keyword in a Cell, or edit exiting value.

2.1 - If running from installed RIDE (or with PyCharm), there will be an

“maximum recursion limit” error in RIDE Log.

   But the Cell content is correctly changed.

2.2 - If running from source code, the application will crash with

Segmentation fault.

If you start editing a Cell but keep the value unchanged, there will be no

problem.


The CellEditor methods include a feature to look up the imported libraries

in the Test File and suggest known values (by using Control+Space). The

problem is when saving the editing to the file context, there is a recursive

call to the storing methods (the moment we conclude the editing).

Why does this code breaks with Phoenix and not with 2.8.12.1 and 3.0.2?

(I want to improve the code, but I would be happy with a workaround or if

confirmed that is Phoenix bug).

The problematic code is in file src/robotide/editor/kweditor.py.


Attached is an example file. And image of it opened in RIDE.

Please help this Software Tester (also Software Archeologist :slight_smile: ), I will

help testing your open source projects if you want :).

Thank you,

Help

Can you narrow this down to a self-contained test case at all?

I tried, but I could not get your program to run. I got:

AttributeError: No attribute or settings with name ‘_editor’ found

Can you get the stack trace of the segmentation fault?

Scott

This looks suspiciously like the seg fault I’ve been trying to isolate in the Grid class. I don’t have a good minimal test case yet, but the error occurs when I call wx._grid.Grid.CellToRect and the first thing reported is this:

wx._core.wxAssertionError occurred
Message: C++ assertion “m_count > 0” failed at …..\src\common\object.cpp(352) in wxRefCounter::DecRef(): invalid ref data count

then

wxAssertionError: C++ assertion “uiIndex < m_nCount” failed at C:\PROJECTS\buildbots\win7-py27\dist-win64-py27\Phoenix\ext\wxWidgets\include\wx/dynarray.h(841) in wxBaseArrayInt::Item():

​I’ll try to get my debug build working so I can get a real stack trace before I head out for the long weekend…​

···

On Fri, May 27, 2016 at 7:06 PM, Scott Talbert swt@techie.net wrote:

On Fri, 27 May 2016, Hélio Guilherme wrote:

I am already burning my brain for too many weeks!

I am migrating RIDE from Classic wxPython to Phoenix. I have a major bug
that only happens with Phoenix (and not with 2.8.12.1 and 3.0.2). My branch
with debugging output is
https://github.com/HelioGuilherme66/RIDE/tree/wxPhoenix.
The application features a Text Editor and Cell Editor (Spreadsheet like)
for Robot Framework testing files.
Recommended Setup:
Install robotframework with:
pip install robotframework

Install Phoenix (for example for Python 2.7 in Windows 64bit):
pip installhttp://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.3.dev2030+
028d173-cp27-cp27m-win_amd64.whl
or
Install Phoenix (for example for Python 2.7 in Linux 64bit):
pip installhttps://github.com/HelioGuilherme66/Phoenix/releases/download/v3.0.3.dev200
1/wxPython_Phoenix-3.0.3-cp27-none-linux_x86_64.whl

Install RIDE (or get the code) (please see the installation instructions in
the Wiki):
pip install https://github.com/HelioGuilherme66/RIDE/archive/wxPhoenix.zip


If using the source code, you may run with:
invoke devel
or
python src/robotide/init.py


Description of the blocking bug (when running in Fedora Core 22 x64):
1 - Enter a keyword in a Cell, or edit exiting value.
2.1 - If running from installed RIDE (or with PyCharm), there will be an
“maximum recursion limit” error in RIDE Log.
But the Cell content is correctly changed.
2.2 - If running from source code, the application will crash with
Segmentation fault.

If you start editing a Cell but keep the value unchanged, there will be no
problem.


The CellEditor methods include a feature to look up the imported libraries
in the Test File and suggest known values (by using Control+Space). The
problem is when saving the editing to the file context, there is a recursive
call to the storing methods (the moment we conclude the editing).
Why does this code breaks with Phoenix and not with 2.8.12.1 and 3.0.2?
(I want to improve the code, but I would be happy with a workaround or if
confirmed that is Phoenix bug).

The problematic code is in file src/robotide/editor/kweditor.py.

Attached is an example file. And image of it opened in RIDE.

Please help this Software Tester (also Software Archeologist :slight_smile: ), I will
help testing your open source projects if you want :).

Thank you,
Help

Can you narrow this down to a self-contained test case at all?

I tried, but I could not get your program to run. I got:
AttributeError: No attribute or settings with name ‘_editor’ found

Can you get the stack trace of the segmentation fault?

Scott

sábado, 28 de Maio de 2016 às 03:06:15 UTC+1, Scott Talbert escreveu:

Can you narrow this down to a self-contained test case at all?

I tried, but I could not get your program to run. I got:

AttributeError: No attribute or settings with name ‘_editor’ found

Can you get the stack trace of the segmentation fault?

Scott

I have tested in Windows 7 x64 with Python 2.7.11 @32bit and it worked after setting PYTHONPATH.

C:\GitHub\RIDE>set PYTHONPATH=.\src

C:\GitHub\RIDE>echo %PYTHONPATH%
.\src

C:\GitHub\RIDE>python src\bin\ride.py

``

If you first install RIDE, it will create config files at $HOME/.robotframework/ride (in Windows %HOMEPATH%\AppData\Roaming\RobotFramework\ride). That should be the problem on running RIDE before installing.
Also I noticed that running from code, it will get modules from installed RIDE, so to reproduce the crash I had to uninstall RIDE (and start as above and not as below).

(my Phoenix in Windows was 3.0.3.dev2022+b85bcd3 and also 3.0.3.dev2057+dc47a18)
When I deleted config directory, uninstalled, and started RIDE from code with:
C:\GitHub\RIDE>python src\robotide_init_.py

``

The crash did not happened.