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

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Done
    • Affects Version/s: 5.12.3
    • Fix Version/s: 5.12.4, 5.13.1
    • Component/s: Shiboken
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      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
        For Gerrit Dashboard: PYSIDE-1037
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              kleint Friedemann Kleint
              Reporter:
              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