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

Crash when clicking browse button in attachment edit widget (PLEASE RE-ADD THE BUTTON) #26948

Closed
qgib opened this issue Jun 5, 2018 · 53 comments · Fixed by #31905
Closed

Crash when clicking browse button in attachment edit widget (PLEASE RE-ADD THE BUTTON) #26948

qgib opened this issue Jun 5, 2018 · 53 comments · Fixed by #31905
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Forms High Priority Regression Something which used to work, but doesn't anymore Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...)

Comments

@qgib
Copy link
Contributor

qgib commented Jun 5, 2018

26.7.2019 - @m-kuhn

The browse button has been removed as a band aid to prevent the crash.
Fixing the browse button will require additional work based on the analysis in #26948 (comment) .


Author Name: Tom Chadwin (@tomchadwin)
Original Redmine Issue: 19118
Affected QGIS version: 3.7(master)
Redmine category:edit_widget


Steps to recreate:

  1. Open a vector layer with at least one text field
  2. Change a text field's edit widget to Attachment
  3. Open the layer's attribute table
  4. Toggle editing
  5. Highlight a value in the column whose edit widget you just changed
  6. Click the ellipsis browse button

On Win 7 and 10, we have confirmations that this causes a full QGIS crash, with no QGIS crash handler.



Related issue(s): #27961 (duplicates), #29182 (duplicates), #29271 (duplicates), #29408 (duplicates), #29590 (relates)
Redmine related issue(s): 20140, 21365, 21454, 21592, 21775


@qgib
Copy link
Contributor Author

qgib commented Jun 5, 2018

Author Name: Tom Chadwin (@tomchadwin)


Confirmed by Harrissou: http://irclogs.geoapt.com/qgis/%23qgis.2018-06-05.log

@qgib
Copy link
Contributor Author

qgib commented Jun 8, 2018

Author Name: Matthias Kuhn (@m-kuhn)


Cannot reproduce on Linux/master

@qgib
Copy link
Contributor Author

qgib commented Jun 30, 2018

Author Name: Tom Chadwin (@tomchadwin)


Crash still occurs in 3.2 and recent nightly. Using QGIS sample Alaska airports dataset, changing "USE" widget to Attachment, enabling editing, selecting the USE field of the NOATAK record, and clicking the browse button. Win7 x64.

@qgib
Copy link
Contributor Author

qgib commented Sep 18, 2018

Author Name: T Dunne (T Dunne)


Still an issue.

Sometimes clicking the button does not cause a crash but adding an attachment does.

@qgib
Copy link
Contributor Author

qgib commented Nov 6, 2018

Author Name: Tom Chadwin (@tomchadwin)


Issue still present in 3.4.1

@qgib
Copy link
Contributor Author

qgib commented Nov 6, 2018

Author Name: Giovanni Manghi (@gioman)


  • version was changed from 3.0.3 to 3.4.1

@qgib
Copy link
Contributor Author

qgib commented Jan 24, 2019

Author Name: Benjamin Jakimow (@jakimowb)


Issue still present in 3.4.4

@qgib
Copy link
Contributor Author

qgib commented Jan 24, 2019

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


@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2019

Author Name: Peter Petrik (@PeterPetrik)


unable to reproduce on Mac with 3.5 master

@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2019

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2019

Author Name: Tom Chadwin (@tomchadwin)


@giovanni What feedback is needed - happy to help test.

@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2019

Author Name: Tom Chadwin (@tomchadwin)


  • 14190 was configured as 2019-01-29_09-29-35.gif

@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2019

Author Name: Tom Chadwin (@tomchadwin)


Confirmed issue still present in 3.4.4 Win7 x64, as reported by @benjamin Jakimow

@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2019

Author Name: Giovanni Manghi (@gioman)


Tom Chadwin wrote:

@giovanni What feedback is needed - happy to help test.

if a developer is having a look at the issue but is unable to replicate then is requested to the issuer to check again and/or improve the description (or as in your case add a screencast).

@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2019

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Feedback to Open

@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2019

Author Name: Peter Petrik (@PeterPetrik)


probably windows-only issue :)

@qgib
Copy link
Contributor Author

qgib commented Mar 5, 2019

Author Name: Samuel Wechsler (Samuel Wechsler)


still an issue in the current nightly built 3.7.0-Master (QGIS code revision 34a0650). And yes I use windows.

@qgib
Copy link
Contributor Author

qgib commented Mar 5, 2019

Author Name: Giovanni Manghi (@gioman)


also on linux.


  • operating_system was changed from Windows 7, Windows 10 to
  • version was changed from 3.4.1 to 3.7(master)

@qgib
Copy link
Contributor Author

qgib commented Mar 5, 2019

Author Name: Giovanni Manghi (@gioman)


@qgib
Copy link
Contributor Author

qgib commented Mar 5, 2019

Author Name: Tom Chadwin (@tomchadwin)


@giovanni Manghi That's the first report of this on non-Windows.

@qgib
Copy link
Contributor Author

qgib commented Mar 15, 2019

Author Name: Giovanni Manghi (@gioman)


@qgib
Copy link
Contributor Author

qgib commented Mar 15, 2019

Author Name: Giovanni Manghi (@gioman)


@qgib
Copy link
Contributor Author

qgib commented May 22, 2019

Author Name: Grga Franges (Grga Franges)


Several bug reports have been marked as duplicates and merged with this one, but i feel it's description doesnt represent the full extent of this bug.

In my case crash happens whenever an entry is changed in an attachment widget with a web view document viever. Crash also happens when you switch to another feature in attribute table form view. (see attached image)

I have found this bug in 3.4. LTR on Mint 19, Windows 7 and Windows 10 environments. It totally ruins our organisation's usage scenario for QGIS and has caused us great pain. It is a regression from an important feature that used to work perfectly in 2.18.

It would be nice if we could at least get some update here on what is causing the issue and what are the prospects of resolving it.


  • 14971 was configured as Screenshot_2019-05-22_11-37-15.png

@qgib
Copy link
Contributor Author

qgib commented May 23, 2019

Author Name: Alessandro Pasotti (@elpaso)


@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Forms Crash/Data Corruption Regression Something which used to work, but doesn't anymore labels May 25, 2019
@m-kuhn
Copy link
Member

m-kuhn commented Jul 26, 2019

The browse button has been removed as a band aid to prevent the crash.
Fixing the browse button will require additional work based on the analysis #26948 (comment)

@gioman
Copy link
Contributor

gioman commented Jul 26, 2019

The browse button has been removed as a band aid to prevent the crash.

The discussion was ongoing, was not ended. Please revert.

@gioman gioman changed the title Browse button missing in attachment edit widget Crash when clicking browse button in attachment edit widget Jul 26, 2019
@gioman
Copy link
Contributor

gioman commented Jul 26, 2019

I re-changed the title because the button must be re-enabled at some point. The patch just put the dirt under the rug and we must not forget about this dirt.

@gioman gioman changed the title Crash when clicking browse button in attachment edit widget Crash when clicking browse button in attachment edit widget (PLEASE RE-ADD THE BUTTON) Jul 27, 2019
@jukos
Copy link

jukos commented Aug 8, 2019

Same bug for QGIS 3.4.x with Windows 10 and QGIS 3.8.1 with Ubuntu 18.04

@m-kuhn
Copy link
Member

m-kuhn commented Aug 10, 2019

#30944 and #30945 avoid the crash by hiding the button in 3.4 and 3.8. They will be merged in the upcoming days if not magically a solution for the underlying problem appears.

@nirvn
Copy link
Contributor

nirvn commented Aug 10, 2019

+1; the most promising (and possibly only?) path forward identified here is to hire the KDAB folks, and it won't happen prior to next point release in six days.

@m-kuhn m-kuhn added the Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...) label Aug 14, 2019
bog-dan-ro added a commit to KDAB/QGIS that referenced this issue Sep 22, 2019
When showing a file dialog, Qt can choose to use the "system" file
dialog, which will make QgsExternalResourceWidget to loose the focus.
This patch blocks all the events that are sent to
QgsExternalResourceWidget while a dialog is shown, this way it will keep
the focus until the dialog is closed.

Sponsored by the QGIS project (qgis.org)

Fixes: qgis#26948
backporting bot pushed a commit that referenced this issue Sep 22, 2019
When showing a file dialog, Qt can choose to use the "system" file
dialog, which will make QgsExternalResourceWidget to loose the focus.
This patch blocks all the events that are sent to
QgsExternalResourceWidget while a dialog is shown, this way it will keep
the focus until the dialog is closed.

Sponsored by the QGIS project (qgis.org)

Fixes: #26948
@gioman
Copy link
Contributor

gioman commented Sep 22, 2019

m-kuhn closed this in #31905 2 hours ago

@m-kuhn how the fix works? does it brings back the button?

@m-kuhn
Copy link
Member

m-kuhn commented Sep 22, 2019

yes

@gioman
Copy link
Contributor

gioman commented Sep 22, 2019

yes

@m-kuhn that is great news Matthias! so... the fix was only in QGIS code or it needed also an upstream fix?

@m-kuhn
Copy link
Member

m-kuhn commented Sep 22, 2019

Thanks to the awesome work of @bog-dan-ro a band-aid inside QGIS could be added (along the lines of the proposal here)

nyalldawson pushed a commit that referenced this issue Sep 22, 2019
When showing a file dialog, Qt can choose to use the "system" file
dialog, which will make QgsExternalResourceWidget to loose the focus.
This patch blocks all the events that are sent to
QgsExternalResourceWidget while a dialog is shown, this way it will keep
the focus until the dialog is closed.

Sponsored by the QGIS project (qgis.org)

Fixes: #26948
@jukos
Copy link

jukos commented Sep 22, 2019

Hmm. Sounds good.
And with this improvement it is now possible to use qgis2web fully?
https://gis.stackexchange.com/questions/310446/no-images-in-popups-only-url-is-displayed/310974#310974
https://issues.qgis.org/issues/19118

If yes: With the next qgis version?

Thank you and greetings, Jürgen

@m-kuhn
Copy link
Member

m-kuhn commented Sep 23, 2019

@tomchadwin might be able to comment on that.
As far as I understood him last time this issue was only loosely coupled to this missing functionality on qgis2web.

@tomchadwin
Copy link
Contributor

@jukos, @m-kuhn Yes, this should bring images in popups back to life in qgis2web. However, no doubt there will be issues at the qgis2web end by now, as I've not looked at that code for a long time. Now that we have the QGIS bug fixed, and once you have a working version of QGIS with that fix, let's continue the discussion back on the qgis2web repo.

Huge thanks to @bog-dan-ro fir the fix - it's great to be able to bring this functionality back to life again, and I'm really grateful. Thanks also to @m-kuhn for his thorough investigation and temporary fix.

@gioman
Copy link
Contributor

gioman commented Sep 23, 2019

a band-aid inside QGIS could be added (along the lines of the proposal here)

Thanks to everyone that put an effort on this, it won't certainly feel as a band aid to all the users that have now their workflow restored at the same state they had on the old ltr.

@jukos
Copy link

jukos commented Sep 24, 2019

@m-kuhn
Is the new improvement included within this weekly-version?:
QGIS-OSGeo4W-3.9.0-38-Setup-x86.exe | 24-Sep-2019 15:14 | 411M |  

Thank you and greetings

@m-kuhn
Copy link
Member

m-kuhn commented Sep 25, 2019

I assume so, yes.
Can you test and report back?

@m-kuhn
Copy link
Member

m-kuhn commented Sep 25, 2019

@jukos some clarification:

@jukos the missing functionality to show photos inside qgis2web popups was never directly coupled to this QGIS issue on a technical level. The fix in the latest QGIS versions fixes a button inside QGIS (which is very nice!), but nothing on the qgis2web end. The issue there still needs to be fixed.

@jukos
Copy link

jukos commented Sep 25, 2019

OK. In my first test yesterday I saw no images....

The issue there still needs to be fixed.

When? / What is the next procedure?

This issue is closed. Which qgis-issue for this problem is "open"?

Thank you and greetings

@m-kuhn
Copy link
Member

m-kuhn commented Sep 25, 2019

There are two things here:

  1. The button inside QGIS which crashed. Can you confirm it works again as expected?
  2. The qgis2web functionality. There is no open issue for that here, because there is nothing we can do from QGIS side to solve this. Please follow up on the open issue at qgis2web Photos not showing in popup qgis2web/qgis2web#661 . Neither this QGIS issue nor any other QGIS issue (I am aware of) should be blocking anything there (and in fact they did never block anything there on a technical level) :)

@jukos
Copy link

jukos commented Sep 25, 2019

  1. I can use the button for insert and changes of attachment-photos without crash.
  2. OK. Maybe Tom Chadwin has time the next days....

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! Forms High Priority Regression Something which used to work, but doesn't anymore Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants