0

I'm trying to open a QGIS project that was saved in a previous version (3.22.16) with the latest QGIS (3.34.1 at the time of writing).

The problem is that QGIS is always in a "waiting" state (the mouse cursor being the blue spinning circle on Windows 10).

At some time, wherever I click in the QGIS window, it freezes (the QGIS window is faded in white) for ever. I have to kill the process using the task manager.

How I can see what's happening under the hood? Are there some log messages somewhere, ideally real time messages that I can follow to see what's wrong at that moment?

I found a nice folder candidate in the QGIS install folder/var/log but there is only one file here called postinstall.log. What I need is a log of the program's execution in real time.

I found this old thread (2014) where it's about catching Qt error messages using a Python snippet, but this is a "do-it-yourself" solution for Linux that I cannot live with because:

  1. it's using a Linux path,
  2. it's not working, raising the error: "NameError: name 'QgsApplication' is not defined" and
  3. there may be other Qt applications running, so the idea of monitoring all Qt messages on the computer is not the solution I'm searching for.

What I really wish is a PG-like log, but only for QGIS itself.

Please notice that I cannot interact with whatever inside QGIS (including the Python console) because it freezes at the moment I open the project.

swiss_knight
  • 10,309
  • 9
  • 45
  • 117
  • 1
    Does this answer your question? Where does QGIS write its error log messages? I believe the first answer should answer your question. – Kalak Nov 29 '23 at 09:54
  • @LouisCottereau No it doesn't. See edits. – swiss_knight Dec 05 '23 at 10:52
  • It does answer the question, The answer being that they aren't saved to file period. they are sent to the standard output on Linux and windows only on the QGIS debug builds. and if you can't open the application you can't use the script solution, if you can use python console then you can send the log to any file you want on linux or windows – Kalak Dec 05 '23 at 14:55
  • BTW The script should be run before trying to open the project so I don't see the problem with your last point – Kalak Dec 05 '23 at 15:00
  • Also to answer your edit specifically, concerning your first point, the path can be changed to any valid path on your system whichever the OS. Your second point means that you aren't running the script inside QGIS python console otherwise the QgsApplication object is always defined since it is the application. And finally concerning your third point, that is just not what it does, it only sends the logs of the current QGIS application instance to the log file. – Kalak Dec 06 '23 at 09:54

0 Answers0