Starting program: /usr/bin/python3.2 listview.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeec64700 (LWP 5379)]
[New Thread 0x7fffee443700 (LWP 5380)]

Program received signal SIGILL, Illegal instruction.
0x00007ffff7fdffc1 in ?? ()
(gdb) bt
#0  0x00007ffff7fdffc1 in ?? ()
#1  0x00007fffefd14893 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#2  0x00007ffff5394933 in g_sequence_sort_changed_iter ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffefd180d4 in gtk_list_store_insert_with_valuesv ()
   from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#4  0x00007ffff6f8fa14 in ffi_call_unix64 () from 
/usr/lib/x86_64-linux-gnu/libffi.so.6
#5  0x00007ffff6f8f435 in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#6  0x00007ffff5883a59 in ?? () from /usr/lib/libgirepository-1.0.so.1
#7  0x00007ffff5884e0e in g_function_info_invoke () from 
/usr/lib/libgirepository-1.0.so.1
#8  0x00007ffff5abe0a8 in ?? () from 
/usr/lib/python3/dist-packages/gi/_gi.cpython-32mu.so
#9  0x000000000045e3c5 in PyEval_EvalFrameEx ()
#10 0x0000000000460fd0 in PyEval_EvalCodeEx ()
#11 0x000000000045cfa3 in PyEval_EvalFrameEx ()
#12 0x000000000045c993 in PyEval_EvalFrameEx ()
#13 0x0000000000460b2d in PyEval_EvalCodeEx ()
#14 0x000000000045cfa3 in PyEval_EvalFrameEx ()
#15 0x0000000000460b2d in PyEval_EvalCodeEx ()
#16 0x00000000004616ab in PyEval_EvalCode ()
#17 0x00000000004817b5 in run_mod ()
#18 0x0000000000483261 in PyRun_FileExFlags ()
#19 0x0000000000483cc9 in PyRun_SimpleFileExFlags ()
#20 0x0000000000494a63 in Py_Main ()
#21 0x000000000041dfa7 in main ()

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to pygobject in Ubuntu.
https://bugs.launchpad.net/bugs/986343

Title:
  liststore cannot use custom function for sorting

Status in “pygobject” package in Ubuntu:
  New

Bug description:
  This code crashes in python3.2 but works perfectly in python2

  def compare(model, row1, row2, user_data):
      sort_column, dummy = model.get_sort_column_id()
      value1 = model.get_value(row1, sort_column)
      value2 = model.get_value(row2, sort_column)
      return -1
      if value1 <  value2:
          return -1
      elif value1 == value2:
          return -1
      else:
          return -1 

  model = Gtk.ListStore(str, str)
  model.set_sort_func(1, compare, 'ddod')
  model.set_sort_column_id(1, Gtk.SortType.ASCENDING)
  model.append(['20', 'Newton'])
  model.append(['20', 'Einstein'])
  model.append(['20', 'Tesla'])
  model.append(['25', 'Shuttleworth'])

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: python3-gi 3.2.0-3
  ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
  Uname: Linux 3.2.0-23-generic x86_64
  ApportVersion: 2.0.1-0ubuntu5
  Architecture: amd64
  Date: Fri Apr 20 19:54:01 2012
  EcryptfsInUse: Yes
  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120328)
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   LANG=sk_SK.UTF-8
   SHELL=/bin/bash
  SourcePackage: pygobject
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pygobject/+bug/986343/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to