Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    [SOLVED] Weird Crash on Run

    General and Desktop
    3
    5
    2547
    Loading More Posts
    • 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.
    • G
      georgesKh last edited by

      My application is built on: Qt 4.7.4 for Desktop - MinGW 4.4

      When I run my application , at some point I get:
      Problem Event Name: APPCRASH
      ...
      Application Version: 0.0.0.0
      ...
      Fault Module Name: StackHash_0a9e

      I checked online for this particular Fault Module Name , and all talks were related to Vista/Windows 7 (DEP) data execution prevention,and that Changing the settings to allow it will work etc , tried it , doesn't work here.

      Now the weird part is that when I debug my code in Qt. Creator, everything works just fine and the app doesn't crash, also a couple of days ago the app was running just fine, I can't figure out what really changed or what is causing this.
      The error doesn't appear randomly I can replicate it every time I run the app.

      I'm open for ideas and suggestions since I think I'm at a dead end. Any help is appreciated , thank you.

      1 Reply Last reply Reply Quote 0
      • D
        DerManu last edited by

        How should we help when you basically just say "my program crashes, help me!"?

        1 Reply Last reply Reply Quote 0
        • JKSH
          JKSH Moderators last edited by

          What DerManu means is, read this: http://www.catb.org/esr/faqs/smart-questions.html

          [quote]The error doesn’t appear randomly I can replicate it every time I run the app.[/quote]That's a good thing, because the bug can be tracked down systematically. (Randomly-appearing bugs are a pain to track down, by comparison) Just describe what you do to repicate that crash, and we might be able to help you pinpoint it.

          [quote]Now the weird part is that when I debug my code in Qt. Creator, everything works just fine and the app doesn’t crash[/quote]Sounds like a Heisenbug (http://en.wikipedia.org/wiki/Heisenbug ). This is often a sign of illegal memory access (e.g. your code uses an uninitialized/deleted pointer, or you performed pointer arithmetic on a function pointer). That would also explain why the DEP is activating -- Windows is stopping your program from doing things to the memory that it's not allowed to.

          When you say you "debug your code", does that involve GDB, or just the debug-mode build?

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply Reply Quote 0
          • G
            georgesKh last edited by

            Wow JKSH that was really helpful :D , thank you.
            It wasn't my code that was doing this directly , I replaced a .DLL library I was using with an older one and everything is working just fine. I guess there was an uninitialized pointer somewhere out there.
            Thanks for the links , they're pretty interesting.
            And DerManu I will ask better questions :)
            Thank you for your time fellas.

            1 Reply Last reply Reply Quote 0
            • JKSH
              JKSH Moderators last edited by

              You're welcome. :) By the way, I'm sure the author of that DLL would appreciate a bug report too.

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              1 Reply Last reply Reply Quote 0
              • First post
                Last post