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

Changing "type* name" to "type *name" sometimes crashes shiboken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.12.4, 5.13.1
    • 5.12.3
    • Shiboken
    • None
    • All
    • f1796628ec2d81c656876876148b2bf5db47c472 (pyside/pyside-setup/5.12)

    Description

      When adjusting spaces after pointer variables globally, I ran into the
      problem that shiboken crashed when I tried to change

          QByteArray* cppSelf = %CONVERTTOCPP[QByteArray *](obj);
      

      to

          QByteArray *cppSelf = %CONVERTTOCPP[QByteArray *](obj);
      

      The temporary work-around was to add another space, resulting in

          QByteArray * cppSelf = %CONVERTTOCPP[QByteArray *](obj);
          //XXX      /|\ omitting this space crashes shiboken!
      

      Assert (sources/shiboken2/generator/shiboken2/shibokengenerator.cpp:2048):

       message "Types of receiver variable ('QTimer') and %CONVERTTOCPP type system variable ('QTimer *') differ." QString
      

      The regex CONVERTTOCPP_REGEX at sources/shiboken2/generator/shiboken2/shibokengenerator.cpp:152 would have to be fixed to capture this correctly.

      Attachments

        1. pyside1037_bool_star_log.txt
          16 kB
        2. pyside1037_diag.diff
          4 kB
        3. pyside1037_log.txt
          4.91 MB
        4. pyside1037_qbytearray_log.txt
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            ctismer Christian Tismer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes