mailRe: [bug #23187] Deleting residue in GUI, and then open spin viewer crashes relax.


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on January 14, 2015 - 14:57:
Hi Troels,

To implement this, you just need the following 3 lines of code:

        # Launch the spin viewer window.
        self.app.gui.show_tree()

        # Close the spin viewer window.
        self.app.gui.spin_viewer.handler_close()

        # Launch the spin viewer window.
        self.app.gui.show_tree()

I found and copied this from pre-existing tests.  For the user
functions, just use self._execute_uf() to avoid the GUI user function
windows, which don't need testing (grep test_suite/gui_tests/*.py for
examples).  As this results in an error, nothing else is needed for
testing.  The test_suite/gui_tests/general.py file would be a good
place to put this.

Cheers,

Edward



On 14 January 2015 at 14:53, Troels Emtekær Linnet
<tlinnet@xxxxxxxxxxxxx> wrote:
Hi Edward.

I always had quite a fight to implement gui tests.

The calling to the wx code is weird for me.

I would not know how to open the spin viewer, and the close it.

Best

2015-01-14 14:44 GMT+01:00 Edward d'Auvergne <edward@xxxxxxxxxxxxx>:

Hi,

Now I can reproduce it :)  Could you code this into a GUI test?  The
other bug should have much higher priority though.

Cheers,

Edward



On 14 January 2015 at 14:38, Troels Emtekær Linnet
<tlinnet@xxxxxxxxxxxxx> wrote:
If I do:

1)  Start relax in GUI mode.
2)  Open the prompt window.
3)  Type:

pipe.create('test', 'mf')
residue.create(res_num=1)
residue.create(res_num=2)

4)  Close the prompt window.

5) Open spin viewer, close spin viewer.

6) Open the prompt window.

7) residue.delete(':2')

8) Close the prompt window.

9)  Open spin viewer,

Traceback (most recent call last):
  File

"/sbinlab2/software/python-enthought-dis/canopy-1.4.0-full-rh5-64/Canopy_64bit/User/lib/python2.7/site-packages/wx/_core.py",
line 14614, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File

"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/gui/spin_viewer/frame.py",
line 168, in refresh_safe
    self.tree_panel.update()
  File

"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/gui/spin_viewer/tree.py",
line 885, in update
    self.update_mol(mol, mol_id)
  File

"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/gui/spin_viewer/tree.py",
line 959, in update_mol
    self.prune_res(mol_branch_id, mol_id)
  File

"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/gui/spin_viewer/tree.py",
line 760, in prune_res
    for key in self.tree_ids[mol_branch_id]:
RuntimeError: dictionary changed size during iteration


2015-01-14 14:20 GMT+01:00 Edward d Auvergne
<NO-REPLY.INVALID-ADDRESS@xxxxxxx>:

Follow-up Comment #2, bug #23187 (project relax):

I also have no problem on 64-bit Linux with wxPython 2.9.4.1 gtk2
(classic).

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?23187>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/







Related Messages


Powered by MHonArc, Updated Wed Jan 14 15:20:18 2015