Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-26227

Memory leaks and other runtime erros caused by rewind() method in qdeclarativestateoperations_p.h getting wrong macro substitution by rewind(fp) macro when compiling for Windows CE

    XMLWordPrintable

Details

    • 453e6e134510bdae8fe68519a4d42120ae21a53b

    Description

      While compiling Qt 4.8.2 for Windows CE 5.0 I got the following warnings:
      /src/declarative/util/qdeclarativestateoperations_p.h(116) : warning C4003: not enough actual parameters for macro 'rewind'
      src/declarative/util/qdeclarativestateoperations_p.h(283) : warning C4003: not enough actual parameters for macro 'rewind'

      It does not produce a compilation error, but it causes memory leaks
      at runtime and/or memory is not released, this in the end cause program termination when available ram goes too low.

      I fixed it in my sources by adding the following conditional undef
      before the object declarations in qdeclarativestateoperations_p.h :

      #ifdef Q_OS_WINCE

      1. undef rewind
        #endif

      It's basically the same thing done to fix bug #QTBUG-14399, but this time
      applied to qdeclarativestateoperations_p.h

      Before applying this fix, when running under Windows CE there were problems with memory allocated by QML objects and never released, I tried hard but I couldn't track the source of the issue, but after adding that #undef most of those issue vanished.

      Attachments

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

        Activity

          People

            martjone Martin Jones (closed Nokia identity) (Inactive)
            mchl Lorenzo Micheletto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes