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

2015-01-14 Thread Troels Emtekær Linnet
Hi Ed.

I still see the error.

Best
Troels

2015-01-14 15:35 GMT+01:00 Edward d Auvergne 
no-reply.invalid-addr...@gna.org:

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

 Ok, I've fixed the GUI code:

 http://article.gmane.org/gmane.science.nmr.relax.scm/24915

 Now to work out how the error can be caught in the test!

 ___

 Reply to this item at:

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

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


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


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

2015-01-14 Thread Edward d Auvergne
Follow-up Comment #7, bug #23187 (project relax):

Ok, I've fixed the GUI code:

http://article.gmane.org/gmane.science.nmr.relax.scm/24915

Now to work out how the error can be caught in the test!

___

Reply to this item at:

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

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


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


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

2015-01-14 Thread Edward d'Auvergne
Hi,

The fix was so that the error is now visible in the GUI test.  However
the test passes so you only see it when the debug flag is given.  I'm
not sure how to propagate the error yet - something is catching it and
allowing the program to continue executing normally, despite the spin
viewer window being dead.  This is a useful feature when using a GUI,
but horrible for debugging!

Regards,

Edward



On 14 January 2015 at 16:14, Troels Emtekær Linnet
tlin...@nmr-relax.com wrote:
 Hi Ed.

 I still see the error.

 Best
 Troels

 2015-01-14 15:35 GMT+01:00 Edward d Auvergne
 no-reply.invalid-addr...@gna.org:

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

 Ok, I've fixed the GUI code:

 http://article.gmane.org/gmane.science.nmr.relax.scm/24915

 Now to work out how the error can be caught in the test!

 ___

 Reply to this item at:

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

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



___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


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

2015-01-14 Thread Edward d'Auvergne
I already have a patch which fixes the error, but I'd like to work out
how we can catch it first.

Regards,

Edward


On 14 January 2015 at 16:17, Edward d'Auvergne edw...@nmr-relax.com wrote:
 Hi,

 The fix was so that the error is now visible in the GUI test.  However
 the test passes so you only see it when the debug flag is given.  I'm
 not sure how to propagate the error yet - something is catching it and
 allowing the program to continue executing normally, despite the spin
 viewer window being dead.  This is a useful feature when using a GUI,
 but horrible for debugging!

 Regards,

 Edward



 On 14 January 2015 at 16:14, Troels Emtekær Linnet
 tlin...@nmr-relax.com wrote:
 Hi Ed.

 I still see the error.

 Best
 Troels

 2015-01-14 15:35 GMT+01:00 Edward d Auvergne
 no-reply.invalid-addr...@gna.org:

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

 Ok, I've fixed the GUI code:

 http://article.gmane.org/gmane.science.nmr.relax.scm/24915

 Now to work out how the error can be caught in the test!

 ___

 Reply to this item at:

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

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



___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


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

2015-01-14 Thread Edward d Auvergne
Follow-up Comment #9, bug #23187 (project relax):

Unfortunately I don't think that this bug can be caught in the relax test
suite as the wxPython RuntimeError handler seems to be completely incompatible
with the Python unittest framework.

___

Reply to this item at:

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

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


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


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

2015-01-14 Thread Edward d Auvergne
Follow-up Comment #1, bug #23187 (project relax):

I cannot reproduce the bug with the following steps:

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)
residue.delete(':2')

4)  Close the prompt window.

5)  Open the spin viewer window.


This is on a 64-bit GNU/Linux system with wxPython 2.8.12.1 (gtk2-unicode). 
Maybe it is operating system dependent, wxPython version dependent, or there
is something strange with the data.  A system test which triggers the bug will
be able to isolate the issue.

___

Reply to this item at:

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

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


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


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

2015-01-14 Thread Edward d Auvergne
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/


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


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

2015-01-14 Thread Edward d'Auvergne
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
tlin...@nmr-relax.com 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 edw...@nmr-relax.com:

 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
 tlin...@nmr-relax.com 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-addr...@gna.org:
 
  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/
 
 



___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


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

2015-01-14 Thread Troels Emtekær Linnet
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-addr...@gna.org:

 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/


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


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

2015-01-14 Thread Edward d'Auvergne
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
tlin...@nmr-relax.com 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-addr...@gna.org:

 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/



___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


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

2015-01-14 Thread Troels Emtekær Linnet
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 edw...@nmr-relax.com:

 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
 tlin...@nmr-relax.com 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-addr...@gna.org:
 
  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/
 
 

___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


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

2015-01-14 Thread Troels E. Linnet
Follow-up Comment #3, bug #23187 (project relax):

def test_bug_23187_residue_delete_gui(self):
Catch U{bug #23187https://gna.org/bugs/?23187}, deleting residue
in GUI, and then open spin viewer crashes relax.

# Mf tab:  Simulate the new analysis wizard.
analysis = self.new_analysis_wizard(analysis_type='mf',
analysis_name='Mf test', pipe_name='mf', pipe_bundle='mf bundle')

self._execute_uf(uf_name='residue.create', res_num=1)
self._execute_uf(uf_name='residue.create', res_num=2)

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

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

# Delete spin,
self._execute_uf(uf_name='residue.delete', res_id=:2)

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


relax_tomat --gui-tests General.test_bug_23187_residue_delete_gui --time

___

Reply to this item at:

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

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


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


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

2015-01-14 Thread Troels E. Linnet
Follow-up Comment #4, bug #23187 (project relax):

This will NOT catch the error.

___

Reply to this item at:

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

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


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel