Ticket #1190 (closed bug: fixed)

Opened 2 years ago

Last modified 12 months ago

Segfault when displaying data instances with discrete features

Reported by: admackin Owned by: janez
Milestone: Component: library
Severity: major Keywords:
Cc: Blocking:
Blocked By:

Description

I get a segmentation fault against 2.5rc1 when I try and display an instance which uses discrete features with no set of allowed values specified:

>>> dom = data.Domain(feature.Discrete('a'), False)
>>> inst = data.Instance(dom, [-1])
>>> print inst
Segmentation fault

Specify a set of allowed values, and it works OK though:

>>> from Orange import data, feature
>>> dom2 = data.Domain(feature.Discrete('a', values=['y', 'n']), False)
>>> inst2 = data.Instance(dom2, ['n'])
>>> print inst2
['n']

Change History

comment:1 Changed 2 years ago by ales

  • Status changed from new to assigned
  • Owner set to janez

comment:2 Changed 12 months ago by ales

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

The problem here is actually with the negative value. This was fixed in 1c9c5bda6959.

Also since changeset 49d2a5f5db16 the Table and Instance constructors now check the values for the discrete features and raise a ValueError if they are invalid.

Note: See TracTickets for help on using tickets.