Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A 64 bits build on Windows crash on exit #16923

Closed
qgib opened this issue Jun 16, 2013 · 17 comments
Closed

A 64 bits build on Windows crash on exit #16923

qgib opened this issue Jun 16, 2013 · 17 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@qgib
Copy link
Contributor

qgib commented Jun 16, 2013

Author Name: Joaquim Luis (@joa-quim)
Original Redmine Issue: 8085
Affected QGIS version: master


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


@qgib
Copy link
Contributor Author

qgib commented Jun 16, 2013

Author Name: Jürgen Fischer (@jef-n)


Produce a backtrace please.

@qgib
Copy link
Contributor Author

qgib commented Jun 16, 2013

Author Name: Joaquim Luis (@joa-quim)


Here goes the dump file

@qgib
Copy link
Contributor Author

qgib commented Jun 16, 2013

Author Name: Joaquim Luis (@joa-quim)


Dump file did not go through. Size limits?

@qgib
Copy link
Contributor Author

qgib commented Jun 16, 2013

Author Name: Gerhard Spieles (Gerhard Spieles)


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


  • 5871 was configured as qgis_dev__win64_minidump_on_exit.jpg

@qgib
Copy link
Contributor Author

qgib commented Jun 16, 2013

Author Name: Joaquim Luis (@joa-quim)


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

@qgib
Copy link
Contributor Author

qgib commented Jun 16, 2013

Author Name: Jürgen Fischer (@jef-n)


Joaquim Luis wrote:

Tried to build a debug version but errors at

[...]

Try RelWithDebInfo

@qgib
Copy link
Contributor Author

qgib commented Jun 16, 2013

Author Name: Joaquim Luis (@joa-quim)


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.


  • 5872 was configured as Capture.JPG

@qgib
Copy link
Contributor Author

qgib commented Jun 16, 2013

Author Name: Matthias Kuhn (@m-kuhn)


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.

@qgib
Copy link
Contributor Author

qgib commented Jun 17, 2013

Author Name: Joaquim Luis (@joa-quim)


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.

@qgib
Copy link
Contributor Author

qgib commented Jun 17, 2013

Author Name: Giovanni Manghi (@gioman)


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?

@qgib
Copy link
Contributor Author

qgib commented Jun 17, 2013

Author Name: Joaquim Luis (@joa-quim)


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


  • 5873 was configured as qgis-20130616-230856-5956-2984-4b8f3c7.zip

@qgib
Copy link
Contributor Author

qgib commented Jun 17, 2013

Author Name: Matthias Kuhn (@m-kuhn)


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.

@qgib
Copy link
Contributor Author

qgib commented Jun 17, 2013

Author Name: Joaquim Luis (@joa-quim)


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?

@qgib
Copy link
Contributor Author

qgib commented Jun 17, 2013

Author Name: Matthias Kuhn (@m-kuhn)


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();

@qgib
Copy link
Contributor Author

qgib commented Jun 17, 2013

Author Name: Joaquim Luis (@joa-quim)


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?)

@qgib
Copy link
Contributor Author

qgib commented Jun 17, 2013

Author Name: Matthias Kuhn (@m-kuhn)


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


  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Jun 17, 2013

Author Name: Joaquim Luis (@joa-quim)


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

@qgib qgib added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant