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

QGIS crashes on add layer #24513

Closed
qgib opened this issue May 24, 2017 · 6 comments
Closed

QGIS crashes on add layer #24513

qgib opened this issue May 24, 2017 · 6 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption GUI/UX Related to QGIS application GUI or User Experience High Priority

Comments

@qgib
Copy link
Contributor

qgib commented May 24, 2017

Author Name: Dmitry Baryshnikov (Dmitry Baryshnikov)
Original Redmine Issue: 16613
Affected QGIS version: master
Redmine category:gui


When opening PostGIS layer QGIS crashes.

Here it is part of the dump.

src/app/qgisapp.cpp: 9843: (addVectorLayer) [1ms] got valid layer with 0 sublayers
Fatal: ASSERT failure in QList::at: "index out of range", file /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h, line 537
QGIS died on signal -1[New LWP 10697]

In sources I see using same named variables: QStringList sublayers

The first variable declared here: source:src/app/qgisapp.cpp#L9840
And second here: source:src/app/qgisapp.cpp#L9860

When get 0 element from list, first variable is using, not second, as expected: source:src/app/qgisapp.cpp#L9863

The solutions are:

  1. Rename second variable
  2. Remove second variable declaration

Related issue(s): #24495 (duplicates)
Redmine related issue(s): 16593


@qgib
Copy link
Contributor Author

qgib commented May 24, 2017

Author Name: Giovanni Manghi (@gioman)


is this when you add the layer from the qgis browser?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented May 24, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was changed from 1 to 0
  • priority_id was changed from Normal to High
  • crashes_corrupts_data was changed from 0 to 1

@qgib
Copy link
Contributor Author

qgib commented May 24, 2017

Author Name: Dmitry Baryshnikov (Dmitry Baryshnikov)


Giovanni Manghi wrote:

is this when you add the layer from the qgis browser?

Yes. Drag'n'drop to map canvas from QGIS Browser produces crash too.

@qgib
Copy link
Contributor Author

qgib commented May 24, 2017

Author Name: Giovanni Manghi (@gioman)


been already fixed, wait a new build downgrade or just use the "add postgis layer" dialog meanwhile.


  • status_id was changed from Feedback to Closed
  • resolution was changed from to fixed/implemented

@qgib qgib closed this as completed May 24, 2017
@qgib
Copy link
Contributor Author

qgib commented May 24, 2017

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


@qgib
Copy link
Contributor Author

qgib commented May 24, 2017

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


  • description was changed from When opening PostGIS layer QGIS crashes.

Here it is part of the dump.

src/app/qgisapp.cpp: 9843: (addVectorLayer) [1ms] got valid layer with 0 sublayers
Fatal: ASSERT failure in QList::at: "index out of range", file /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h, line 537
QGIS died on signal -1[New LWP 10697]

In sources I see using same named variables: QStringList sublayers

The first variable declared here: https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp#L9840
And second here: https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp#L9860

When get 0 element from list, first variable is using, not second, as expected: https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp#L9863

The solutions are:

Rename second variable

Remove second variable declaration

to When opening PostGIS layer QGIS crashes.

Here it is part of the dump.

src/app/qgisapp.cpp: 9843: (addVectorLayer) [1ms] got valid layer with 0 sublayers
Fatal: ASSERT failure in QList::at: "index out of range", file /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h, line 537
QGIS died on signal -1[New LWP 10697]

In sources I see using same named variables: QStringList sublayers

The first variable declared here: source:src/app/qgisapp.cpp#L9840
And second here: source:src/app/qgisapp.cpp#L9860

When get 0 element from list, first variable is using, not second, as expected: source:src/app/qgisapp.cpp#L9863

The solutions are:

Rename second variable

Remove second variable declaration

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority GUI/UX Related to QGIS application GUI or User Experience Crash/Data Corruption labels May 25, 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! Crash/Data Corruption GUI/UX Related to QGIS application GUI or User Experience High Priority
Projects
None yet
Development

No branches or pull requests

1 participant