Bug report #8085

A 64 bits build on Windows crash on exit

Added by Joaquim Luis over 7 years ago. Updated over 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
Affected QGIS version:master Regression?:No
Operating System:Windows 7 64 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:16923

Description

Hi,

I built a 64 bits version using pure native dependencies, that is everything id build with VS2010 64 bits.
Although it seams to work fine the exe crash on exit but writes a minidump file (~8 Mb).
I can upload the dump if anyone is interested.

Joaquim

qgis_dev__win64_minidump_on_exit.jpg (265 KB) Gerhard Spieles, 2013-06-16 01:25 PM

Capture.JPG (28.4 KB) Joaquim Luis, 2013-06-16 03:16 PM

qgis-20130616-230856-5956-2984-4b8f3c7.zip (1.41 MB) Joaquim Luis, 2013-06-17 06:12 AM

Associated revisions

Revision bdd61d59
Added by Matthias Kuhn over 7 years ago

Only cleanup python on exit if loaded
Fix #8085

History

#1 Updated by Jürgen Fischer over 7 years ago

Produce a backtrace please.

#2 Updated by Joaquim Luis over 7 years ago

Here goes the dump file

#3 Updated by Joaquim Luis over 7 years ago

Dump file did not go through. Size limits?

#4 Updated by Gerhard Spieles over 7 years ago

confirm crash while exit on win7 64bit.
Screenshot with dmp popup is attached.

#5 Updated by Joaquim Luis over 7 years ago

Tried to build a debug version but errors at

Linking CXX executable ..\\..\\output\\bin\\qgis.exe
qtmain.lib(qtmain_win.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.cpp.obj
   Creating library qgis.lib and object qgis.exp
MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
..\\..\\output\\bin\\qgis.exe : fatal error LNK1319: 1 mismatches detected
LINK Pass 1 failed. with 2

#6 Updated by Jürgen Fischer over 7 years ago

Joaquim Luis wrote:

Tried to build a debug version but errors at

[...]

Try RelWithDebInfo

#7 Updated by Joaquim Luis over 7 years ago

OK, that worked. The crash dump is now 10 Mb

It crashes in the QgisApp::~QgisApp() destructor, near its end at

mPythonUtils->exitPython();

Attached a screencapture of the VS dump summary.

#8 Updated by Matthias Kuhn over 7 years ago

That call was inserted recently to cleanup the python environment.
I can imagine that this problem is unrelated to your compiler setup.

Did you execute any python code (plugins/console?)

Could you still upload the full dump to investigate this.

#9 Updated by Joaquim Luis over 7 years ago

No no python code executed. Only opening and close causes the dump generation.
I am trying to upload the dump but I see that the limit is 5 MB, and it has 10 so it will likely fail again.

#10 Updated by Giovanni Manghi over 7 years ago

Joaquim Luis wrote:

No no python code executed. Only opening and close causes the dump generation.
I am trying to upload the dump but I see that the limit is 5 MB, and it has 10 so it will likely fail again.

dropbox?

#11 Updated by Joaquim Luis over 7 years ago

zipped the file size dropped to 1.4 Mb so it should pass now

#12 Updated by Matthias Kuhn over 7 years ago

I just realized, that I am not even able to extract a backtrace from the dump file without the matching binaries. I am not even sure, that the binaries would help (I remember .pdb files being important as well but that was with another compiler setup...)

The possibilities I can think of to proceed are:
  • You share a backtrace, so we can try to guess where the problem source is
  • You can #ifdef the offending line for your system (Windows 64 bits) if this helps in your case and your system is really the only one affected

Sorry for the inconvenience.

#13 Updated by Joaquim Luis over 7 years ago

I have some experience with VS debugging but never with a dump file so I don't really know how it would work. I'm afraid that in order it work elsewhere I would have to make a copy of everything, including all the DLLs dependencies.

Sorry, I don't know either what is a backtrace. How would I produce one?
The #ifdef solution should be trivial to implement and will likely solve the problem for me, but there was another user -- Gerhard Spieles -- that reported the same problem in this thread. I didn't quite get if he had also built it's own binaries (64 bits?) or not.

Gerhard, if you are following this, can you please elaborate more about your setup?

#14 Updated by Matthias Kuhn over 7 years ago

Maybe you did not compile / load the python library at all?
Can you try to update the code to use the following if:

  if ( mPythonUtils )
    mPythonUtils->exitPython();

#15 Updated by Joaquim Luis over 7 years ago

Things are getting better. With that condition it now exits cleanly but your question makes me think there is something I'm not doing write with my build. Basically what I'm doing is to include a CmakeUser.cmake file with path definitions and than run cmake & nmake. However, afaik only grass and postgres are not used here. For example, I can see in the CMakeCache.txt a line with

PYTHON_LIBRARY:FILEPATH=C:/programs/WinPython2.7.3_64/python-2.7.3.amd64/libs/python27.lib

so doesn't that mean I am compiling with python (and wouldn't it error if I was not?)

#16 Updated by Matthias Kuhn over 7 years ago

  • Status changed from Open to Closed

Closing as the original issue is solved.

It would not complain if you have no python support (to test, try to open the python console from the menu, if it does not open you have no python support)

Sorry, I can't solve the problems you just outlined.
I don't know if you are subscribed to the qgis developer mailing list. There was a request to get insight into your setup [1] I'm sure if you share your experiences, others will jump in and happily help you to solve the remaining problems.

[1] http://osgeo-org.1560.x6.nabble.com/Fwd-QGIS-Desktop-Bug-8085-New-A-64-bits-build-on-Windows-crash-on-exit-td5060493.html

#17 Updated by Joaquim Luis over 7 years ago

OK, I'll provide feedback on that issue of the developers list but I found bit more on this and another trouble.

Also available in: Atom PDF