Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Application crash

Application crash

Scheduled Pinned Locked Moved Mobile and Embedded
13 Posts 3 Posters 5.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    spode
    wrote on last edited by
    #1

    application crashes on Nokia c5-03. please watch this video and say me where is the problem i should fix. please note that each new screen is a new QDeclarativeView *view;

    http://youtu.be/inpf8hkCLmw

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

      The video is upside down and the image quality is poor. It would be better if you share source code.

      http://anavi.org/

      1 Reply Last reply
      0
      • S Offline
        S Offline
        spode
        wrote on last edited by
        #3

        ahahhaha sorry... http://youtu.be/eBwCn_ynlU8

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lgeyer
          wrote on last edited by
          #4

          Honestly, I appreciate that you've taken the time to create a video showing your problem - but what do you expect from "the application crashes, tell me how to fix"? The best advice one can give you with this information content is "fix the bug that causes the crash".

          Please, either upload your project somewhere or pastebin relevant code - otherwise noone can help you, even if he would.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            spode
            wrote on last edited by
            #5

            for each new class opened there is this code:
            @
            Class *clas = new Class();

            Class' constructor that extends QWidget:
            QDeclarativeView* view = new QDeclarativeView(QUrl::fromLocalFile("qml/Werfer/prima.qml"), this);
            @

            however each app i have planned has this problem.

            1 Reply Last reply
            0
            • L Offline
              L Offline
              lgeyer
              wrote on last edited by
              #6

              I have no clue what you are talking about. The information content is almost the same as in your inital post, zero. If you provide a small, compilable example that reproduces your problem we are possibly able to help you.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                spode
                wrote on last edited by
                #7

                :( so i will copy the whole constructor of the class and will delete the snippet when (i hope this will happen) the problem will be solved.

                EDIT: look down

                "view" is everytime declared in header as "QDeclarativeView* view;". each new class has one own of that pointer.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  spode
                  wrote on last edited by
                  #8

                  you boys, you surely know someone planned Qt Creator, so someone can help me to solve this issue. Heeelp!!

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    lgeyer
                    wrote on last edited by
                    #9

                    [quote author="Lukas Geyer" date="1327604205"]If you provide a small, compilable example that reproduces your problem we are possibly able to help you.[/quote]

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      spode
                      wrote on last edited by
                      #10

                      "007" is the password for http://www.mediafire.com/?3do2dt2jnltbtud (13MB)
                      note: this is not the program shown in video, but it crashes on c5-03 as the other app.

                      1 Reply Last reply
                      0
                      • L Offline
                        L Offline
                        lgeyer
                        wrote on last edited by
                        #11

                        Your application is most probably crashing because you are wasting memory wherever possible:

                        • almost all your variables are created on the heap, not on the stack; in addition, they get never deleted
                        • your widgets are closed instead of deleted, although they are not re-shown but just re-created when needed
                        • your classes derive from QWidget just to encase a QDeclarativeView, which is already a QWidget; in addition, both are shown, although the widget is empty
                        • you create one of those declarative-view-widgets for every QML file you show instead of using one QDeclarativeView which is responsible for showing all; besides that, none of them get deleted

                        Honestly, and please don't get me wrong on that, I would start with a good read on C++, followed by a good read on Qt and QML, especially QML/C++ interaction, Qt Components and a lot of examples and then re-create the application from scratch, because I see hardly anything that is worth refactoring (besides some QML).

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          spode
                          wrote on last edited by
                          #12

                          i do want to say to you that you are saying something right. i wanted to plan in c++ but i just know few c. it is my fault. but...do not you think it is a great think i achived to plan in c++ without knowing perfectly c??? =D

                          1 Reply Last reply
                          0
                          • L Offline
                            L Offline
                            lgeyer
                            wrote on last edited by
                            #13

                            You do not need to learn C to learn C++ (although it helps a lot). If you are new to both you can start learning C++ right away. If you just want to do a project using Qt Quick chances are high that you do not even need to learn C++, because you can do applications in pure QML and JavaScript.

                            But whatever way you go, you will have to learn something in any ways before you start developing, be it C++ or QML or both.

                            There are is ton of useful information here at the QDN, documentation, examples, tutorials - just dig right in. And if there are any problems don't hesitate to come back right here and ask.

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved