Existence of gmon file after running Qt5.8 application with -pg -g with mingw g++ 6.3.0 causes gdborig.exe to crash on windows when creating QFileDiologue



  • Hello, I was having an odd error when debugging that seemed to come out of nowhere, I was getting gdborig crashes out of nowhere, when nothing codewise appeared to be responsible, I knew it had to do with -pg though since I just added it recently to my cmake file inorder to use gprof on windows. The crash only happens when launching a QFileDiologue AFAIK, all other gui functionality seemed to work (buttons, trees, docked windows etc..) . QFileDiologue loads everything in the file diologue gui accept file thumbnail images, and right before it is about to do that it crashes

    I reverted to a previous commit (right before the crash) and sure enough it worked. However strangely it also worked with -pg added back in which really made me scratch my head. I figured that the only thing that could cause an error only after the first run would be persistent files which only exist after the first run (gmon). I deleted gmon and sure enough it worked.

    I'm not sure what causes this problem, is it possible to stop this from happening? What causes this issue?



  • @Stoke,
    If you dont give -pg option to gcc, gprof will read the old gmon.out file if it exists.



  • @Vinod-Kuntoji I was using -pg as a compilation and linking option, not a gprof option unless I can do -pg as just a gprof option, though I was getting odd results with out -pg as well if there was still a gmon.out file (or a ghost gmon.out file if the debuging session ended from a segfault instead of graceful failure)



  • @stoke,
    Can you share those odd results?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.