Skip to content

Construct-editor Error when quickly browsing the Construct Gallery of the Construct Editor GUI #28

@Ircama

Description

@Ircama

An error appears if the top left panel of the Construct Editor GUI is quickly changed by selecting a construct sample and then pressing a UP or DOWN arrow key, keeping it pressed.

Often (but possibly not always) a KeyError is shown. E.g., the GetSize() or Render() methods of the ObjectRenderer class in wx_construct_editor.py are often impacted.

Example:

  File "...\Python39\site-packages\construct_editor\wx_widgets\wx_construct_editor.py", line 54, in GetSize
    return self.entry_renderer_helper.get_size(self)
  File "...\Python39\site-packages\construct_editor\wx_widgets\wx_obj_view.py", line 376, in get_size
    obj_str = self.entry.obj_str if self.entry else ""
  File "...\Python39\site-packages\construct_editor\core\entries.py", line 1789, in obj_str
    return self.conv_obj_to_str(self.obj)
  File "...\Python39\site-packages\construct_editor\core\entries.py", line 252, in obj
    obj = obj[p]

Uncaught exception: KeyError: 'days2'

The frequency of the error depends on how many elements are consecutively browsed in sequence (many are needed for the error to occur, not just some) and on the speed of the computer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions