Opened 7 years ago

Closed 6 years ago

#1007 closed defect (fixed)

spherical_sld model freezes SasView

Reported by: butler Owned by:
Priority: blocker Milestone: SasView 4.2.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

Loading the spherical_sld model (sometimes it requires multiplying by SQ but not always) freezes the SasView GUI.

Change History (4)

comment:1 Changed 6 years ago by butler

The traceback error is the following

Traceback (most recent call last):
  File "C:\Users\paperspace\git\sasview\src\sas\sasgui\perspectives\fitting\fitpage.py", line 1174, in _on_select_model
    self.set_model_param_sizer(self.model)
  File "C:\Users\paperspace\git\sasview\src\sas\sasgui\perspectives\fitting\fitpage.py", line 2860, in set_model_param_sizer
    self._set_fun_box_list(fun_box)
  File "C:\Users\paperspace\git\sasview\src\sas\sasgui\perspectives\fitting\fitpage.py", line 1735, in _set_fun_box_list
    for key, val in list.items():
AttributeError: 'tuple' object has no attribute 'items'
08:50:26 - INFO : sas.sasgui.guiframe.gui_manager:2019:  --- SasView session was closed --- 

This suggests that the other multiplicity models don't go through this code? but why?

comment:2 Changed 6 years ago by gonzalezm

I was looking to this and made a try to fix the problem in the branch ticket1007. SasView is freezing because the model has a combo box to select the shape of each interface and the possible values are stored in a tuple (self.model.fun_list), but the function _set_fun_box_list tries to access fun_list as a dictionary. With the changes I did, now the model works. However, self.model.fun_list is still used like a dictionary in several places in basepage.py, so I expect similar problems in other cases. I guess that someone with a better understanding of the different uses of fun_list should finish the work before making the pull request.

Last edited 6 years ago by butler (previous) (diff)

comment:3 Changed 6 years ago by butler

Miguel to put comments in front of the three other places this is done so it can be checked easily by a reviewer and then make pull request.

comment:4 Changed 6 years ago by butler

  • Resolution set to fixed
  • Status changed from new to closed

Miguel put the fix in all places and Paul and he tested generally — not clear we know what the other places were linked to but they should work better than before at any rate. Code was approved and merged by PK but without the close ticket notation, so closing the ticket now.

Note: See TracTickets for help on using tickets.