Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-75

Passing list with unicode in it to QApplication will result in a segfault

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • 6.0
    • 1.1.0
    • PySide
    • None

    Description

      I am not saying that passing unicode to QApplication is necessarily what you want to do but it definitely shouldn't segfault.

      reproducer:

      from PySide.QtGui import QApplication

      QApplication([u"Hello"])

      Backtrace:
      (gdb) bt
      #0 __strlen_sse2 () at ../sysdeps/x86_64/strlen.S:32
      #1 0x0000003125685be6 in _GI__strdup (s=0x0) at strdup.c:42
      #2 0x00007ffff090f4b2 in Shiboken::sequenceToArgcArgv(_object*, int*, char**, char const) () from /lib64/libshiboken-python2.7.so.1.1
      #3 0x00007ffff0f398c2 in ?? () from /usr/lib64/python2.7/site-packages/PySide/QtGui.so
      #4 0x000000314ee9cfcc in type_call (type=<optimized out>, args=([u'Hello'],), kwds=0x0) at /usr/src/debug/Python-2.7.3/Objects/typeobject.c:737
      #5 0x000000314ee49a7e in PyObject_Call (func=func@entry=<Shiboken.ObjectType at remote 0x7ffff19d6ac0>, arg=arg@entry=([u'Hello'],), kw=kw@entry=0x0)
      at /usr/src/debug/Python-2.7.3/Objects/abstract.c:2529
      #6 0x000000314eed93f3 in do_call (nk=<optimized out>, na=1, pp_stack=0x7fffffffd6c8, func=<Shiboken.ObjectType at remote 0x7ffff19d6ac0>)
      at /usr/src/debug/Python-2.7.3/Python/ceval.c:4316
      #7 call_function (oparg=<optimized out>, pp_stack=0x7fffffffd6c8) at /usr/src/debug/Python-2.7.3/Python/ceval.c:4121
      #8 PyEval_EvalFrameEx (f=f@entry=Frame 0x6cd540, for file test.py, line 3, in <module> (), throwflag=throwflag@entry=0)
      at /usr/src/debug/Python-2.7.3/Python/ceval.c:2740
      #9 0x000000314eeddb2f in PyEval_EvalCodeEx (co=co@entry=0x7ffff7f09c30, globals=globals@entry=

      {'__builtins__': <module at remote 0x7ffff7f87ad0>, '__file__': 'test.py', 'QApplication': <Shiboken.ObjectType at remote 0x7ffff19d6ac0>, '__package__': None, '__name__': '__main__', '__doc__': None}

      , locals=locals@entry=

      {'__builtins__': <module at remote 0x7ffff7f87ad0>, '__file__': 'test.py', 'QApplication': <Shiboken.ObjectType at remote 0x7ffff19d6ac0>, '__package__': None, '__name__': '__main__', '__doc__': None}

      , args=args@entry=0x0, argcount=argcount@entry=0, kws=kws@entry=0x0, kwcount=kwcount@entry=0, defs=defs@entry=0x0,
      defcount=defcount@entry=0, closure=closure@entry=0x0) at /usr/src/debug/Python-2.7.3/Python/ceval.c:3330
      #10 0x000000314eeddc02 in PyEval_EvalCode (co=co@entry=0x7ffff7f09c30, globals=globals@entry=

      {'__builtins__': <module at remote 0x7ffff7f87ad0>, '__file__': 'test.py', 'QApplication': <Shiboken.ObjectType at remote 0x7ffff19d6ac0>, '__package__': None, '__name__': '__main__', '__doc__': None}

      , locals=locals@entry=

      {'__builtins__': <module at remote 0x7ffff7f87ad0>, '__file__': 'test.py', 'QApplication': <Shiboken.ObjectType at remote 0x7ffff19d6ac0>, '__package__': None, '__name__': '__main__', '__doc__': None}

      ) at /usr/src/debug/Python-2.7.3/Python/ceval.c:689
      #11 0x000000314eef6baa in run_mod (mod=<optimized out>, filename=filename@entry=0x7fffffffdec5 "test.py", globals=globals@entry=

      {'__builtins__': <module at remote 0x7ffff7f87ad0>, '__file__': 'test.py', 'QApplication': <Shiboken.ObjectType at remote 0x7ffff19d6ac0>, '__package__': None, '__name__': '__main__', '__doc__': None}

      , locals=locals@entry=

      {'__builtins__': <module at remote 0x7ffff7f87ad0>, '__file__': 'test.py', 'QApplication': <Shiboken.ObjectType at remote 0x7ffff19d6ac0>, '__package__': None, '__name__': '__main__', '__doc__': None}

      , flags=flags@entry=0x7fffffffd940, arena=arena@entry=0x6c57b0) at /usr/src/debug/Python-2.7.3/Python/pythonrun.c:1361
      #12 0x000000314eef79a2 in PyRun_FileExFlags (fp=fp@entry=0x6a3a30, filename=filename@entry=0x7fffffffdec5 "test.py", start=start@entry=257,
      globals=globals@entry=

      {'__builtins__': <module at remote 0x7ffff7f87ad0>, '__file__': 'test.py', 'QApplication': <Shiboken.ObjectType at remote 0x7ffff19d6ac0>, '__package__': None, '__name__': '__main__', '__doc__': None}

      , locals=locals@entry=

      {'__builtins__': <module at remote 0x7ffff7f87ad0>, '__file__': 'test.py', 'QApplication': <Shiboken.ObjectType at remote 0x7ffff19d6ac0>, '__package__': None, '__name__': '__main__', '__doc__': None}

      , closeit=closeit@entry=1, flags=flags@entry=0x7fffffffd940) at /usr/src/debug/Python-2.7.3/Python/pythonrun.c:1347
      #13 0x000000314eef83bb in PyRun_SimpleFileExFlags (fp=fp@entry=0x6a3a30, filename=0x7fffffffdec5 "test.py", closeit=1, flags=flags@entry=0x7fffffffd940)
      at /usr/src/debug/Python-2.7.3/Python/pythonrun.c:951
      #14 0x000000314eef8ff9 in PyRun_AnyFileExFlags (fp=fp@entry=0x6a3a30, filename=<optimized out>, closeit=<optimized out>, flags=flags@entry=0x7fffffffd940)
      at /usr/src/debug/Python-2.7.3/Python/pythonrun.c:755
      #15 0x000000314ef09892 in Py_Main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/Python-2.7.3/Modules/main.c:639
      #16 0x0000003125621735 in __libc_start_main (main=0x4006c0 <main>, argc=2, ubp_av=0x7fffffffdaf8, init=<optimized out>, fini=<optimized out>,
      rtld_fini=<optimized out>, stack_end=0x7fffffffdae8) at libc-start.c:226
      #17 0x00000000004006f1 in _start ()

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            mpreisler Martin Preisler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes