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

export crashes QGIS #32

Closed
riccardoklinger opened this issue May 1, 2015 · 41 comments
Closed

export crashes QGIS #32

riccardoklinger opened this issue May 1, 2015 · 41 comments

Comments

@riccardoklinger
Copy link
Collaborator

okay, tried qgis2web first time.
used current master.

with this test project: http://www.digital-geography.com/wp-content/uploads/2015/04/test_data.zip
project contains local layers as well as wms and wfs servers.
crashed qgis after pressing on ol-export

Ubuntu 14.04 LTS 64 bit, qgis 2.8.1

video here:
https://www.youtube.com/watch?v=l43Yf4hJ-Ns

@riccardoklinger
Copy link
Collaborator Author

removed wfs/wms layers and still crashes

@riccardoklinger
Copy link
Collaborator Author

update preview function also crashes qgis.

@tomchadwin
Copy link
Collaborator

Do you have the error message?

@riccardoklinger
Copy link
Collaborator Author

as you can see in the vid: no error message given!
but for openlayers export: it creates a layers and a ressources folder,
both filled. no export at all for leaflet.

@tomchadwin
Copy link
Collaborator

Nothing in the Python console?

Next step - does the project export in qgis2leaf and/or qgis-ol3?

@tomchadwin
Copy link
Collaborator

Confirmed on Win7. Going to try to narrow it down to see if specific layers are the problem.

@riccardoklinger
Copy link
Collaborator Author

EDIT: [It's not!!!]

maybe my attribute tables with blanks in the names?

@tomchadwin
Copy link
Collaborator

From the vectors, it's the layer places_few_1_EPSG3857 - the others preview fine in OL3.

@riccardoklinger
Copy link
Collaborator Author

unchecked this one. still no export created with leaflet export option. worked fine with openlayers

@tomchadwin
Copy link
Collaborator

Rasters not appearing in preview, but not crashing QGIS.

@tomchadwin
Copy link
Collaborator

So is the issue with that vector layer the CRS, or is there something else different about it?

@tomchadwin
Copy link
Collaborator

Leaflet export of the 3857 layer gives me an error:

File "C:/Users/tchadwin/.qgis2/python/plugins\qgis2web\leafletWriter.py", line 855, in writeLeaflet """ + new_obj) UnboundLocalError: local variable 'new_obj' referenced before assignment

@tomchadwin
Copy link
Collaborator

Leaflet export of the single raster layer gives this error:

Error: Algorithm not found

@tomchadwin
Copy link
Collaborator

WMS layer works

@tomchadwin
Copy link
Collaborator

Ignore the "Algorithm not found" error - I had disabled Processing. I want to see if the latest commit has had an effect on this issue.

@tomchadwin tomchadwin added this to the first beta milestone May 7, 2015
@tomchadwin
Copy link
Collaborator

No, I don't think the latest commit has helped this issue

@tomchadwin
Copy link
Collaborator

So do we think this issue is actually two issues, both relating to layers in other projections:

  1. QGIS crashes on OL3 export
  2. all vector layers fail to load in Leaflet export

Are both of these correct? And does this issue have any other component issues not covered by these two?

@tomchadwin
Copy link
Collaborator

I think the Leaflet behaviour is because of the icon_exp field, but I'm not sure.

@tomchadwin
Copy link
Collaborator

Confirmed - hopefully fixed Leaflet issue in master now.

@tomchadwin
Copy link
Collaborator

QGIS crash on OL export/preview also occurs in qgis-ol3 - cause still unknown

@tomchadwin
Copy link
Collaborator

Now am confused. Try opening that layer on its own, not the project. That works. Is that because there is no project projection?

@tomchadwin
Copy link
Collaborator

@riccardoklinger Can you test the Leaflet export - is that problem in this issue fixed? In other words, is it just the QGIS crash on OL export which remains?

@riccardoklinger
Copy link
Collaborator Author

Hi Tom,

I was in a hurry: here my test with latest master:


Geolicious GbR
Agentur für Geo-Kommunikation

Riccardo Klinger
Geschäftsführer

mobil: 0176 63437298
e-mail: riccardo.klinger@geolicious.de
web: www.geolicious.de

Geolicious GbR
c/o Daniel Kerkow
Binzstraße 48
13189 Berlin

Gesellschafter:
Riccardo Klinger
Daniel Kerkow
Jakob Hafner

Sitz der Gesellschaft: Berlin
Ust-ID: DE289107523

On Mon, May 11, 2015 at 5:56 PM, Tom Chadwin notifications@github.com
wrote:

@riccardoklinger https://github.com/riccardoklinger Can you test the
Leaflet export - is that problem in this issue fixed? In other words, is it
just the QGIS crash on OL export which remains?


Reply to this email directly or view it on GitHub
#32 (comment).

@riccardoklinger
Copy link
Collaborator Author

here my test with latest master:
http://youtu.be/tXy3ANy4F74

no style was applied under leaflet export and strange attribute names
doesn't allow the leaflet export and crashes qgis when choosing OL export.
still the issue with the raster projection in OL3

sorry, but I am in a hurry and just wanted to respond


Geolicious GbR
Agentur für Geo-Kommunikation

Riccardo Klinger
Geschäftsführer

mobil: 0176 63437298
e-mail: riccardo.klinger@geolicious.de
web: www.geolicious.de

Geolicious GbR
c/o Daniel Kerkow
Binzstraße 48
13189 Berlin

Gesellschafter:
Riccardo Klinger
Daniel Kerkow
Jakob Hafner

Sitz der Gesellschaft: Berlin
Ust-ID: DE289107523

On Mon, May 11, 2015 at 6:41 PM, Riccardo Klinger <
riccardo.klinger@geolicious.de> wrote:

Hi Tom,

I was in a hurry: here my test with latest master:


Geolicious GbR
Agentur für Geo-Kommunikation

Riccardo Klinger
Geschäftsführer

mobil: 0176 63437298
e-mail: riccardo.klinger@geolicious.de
web: www.geolicious.de

Geolicious GbR
c/o Daniel Kerkow
Binzstraße 48
13189 Berlin

Gesellschafter:
Riccardo Klinger
Daniel Kerkow
Jakob Hafner

Sitz der Gesellschaft: Berlin
Ust-ID: DE289107523

On Mon, May 11, 2015 at 5:56 PM, Tom Chadwin notifications@github.com
wrote:

@riccardoklinger https://github.com/riccardoklinger Can you test the
Leaflet export - is that problem in this issue fixed? In other words, is it
just the QGIS crash on OL export which remains?


Reply to this email directly or view it on GitHub
#32 (comment)
.

@tomchadwin
Copy link
Collaborator

I have to separate this out into different issues. I also cannot see enough detail in your vid - Youtube blurs out the text for me.

So you have the following issues:

  • no style applied to Leaflet export - under what circumstances? (now fixed in master)
  • "strange" attribute names prevents leaflet export
  • OL export crashes QGIS (precise conditions still to be determined)
  • rasters incorrectly reprojected (I thought I'd opened a separate issue for that one - will check) (see below)

Thanks for the contribution when you have no time - I appreciate it - I just need to narrow it all down to specifics.

@tomchadwin
Copy link
Collaborator

Ah, no - you opened the raster problem as a separate issue #33, so let's keep that one to that issue.

@riccardoklinger
Copy link
Collaborator Author

I think one needs to implement the check for "correct" attribute names like
we do in QGis2leaf: check for spaces and special characters and throw a
message when layers do have such attribute names.

OL export crashes whole QGIS with such attributes, leaflet only show a
python error but you can still work in qgis.

video should have better quality in a few minutes.


Geolicious GbR
Agentur für Geo-Kommunikation

Riccardo Klinger
Geschäftsführer

mobil: 0176 63437298
e-mail: riccardo.klinger@geolicious.de
web: www.geolicious.de

Geolicious GbR
c/o Daniel Kerkow
Binzstraße 48
13189 Berlin

Gesellschafter:
Riccardo Klinger
Daniel Kerkow
Jakob Hafner

Sitz der Gesellschaft: Berlin
Ust-ID: DE289107523

On Mon, May 11, 2015 at 7:43 PM, Tom Chadwin notifications@github.com
wrote:

I have to separate this out into different issues. I also cannot see
enough detail in your vid - Youtube blurs out the text for me.

So you have the following issues:

  • no style applied to Leaflet export - under what circumstances?
  • "strange" attribute names prevents leaflet export
  • OL export crashes QGIS (precise conditions still to be determined)
  • rasters incorrectly reprojected (I thought I'd opened a separate
    issue for that one - will check)

Thanks for the contribution when you have no time - I appreciate it - I
just need to narrow it all down to specifics.


Reply to this email directly or view it on GitHub
#32 (comment).

@tomchadwin
Copy link
Collaborator

If you are confident that it is the unusual characters which causes the crash, that is great news - as you say, we can simply port over the qgis2leaf code to check for that. However, are you sure that is what causes the QGIS crash? If you only have that one layer open in QGIS, in a web-friendly projection, and export using the plugin, do you still get the error? My impression was that the crash was perhaps being caused by something to do with projections, and not by the special characters.

@riccardoklinger
Copy link
Collaborator Author

just created a layer with UTM projection and proper attribute names. wrked
fine in OL and leaflet.


Geolicious GbR
Agentur für Geo-Kommunikation

Riccardo Klinger
Geschäftsführer

mobil: 0176 63437298
e-mail: riccardo.klinger@geolicious.de
web: www.geolicious.de

Geolicious GbR
c/o Daniel Kerkow
Binzstraße 48
13189 Berlin

Gesellschafter:
Riccardo Klinger
Daniel Kerkow
Jakob Hafner

Sitz der Gesellschaft: Berlin
Ust-ID: DE289107523

On Mon, May 11, 2015 at 7:51 PM, Tom Chadwin notifications@github.com
wrote:

If you are confident that it is the unusual characters which causes the
crash, that is great news - as you say, we can simply port over the
qgis2leaf code to check for that. However, are you sure that is what causes
the QGIS crash? If you only have that one layer open in QGIS, in a
web-friendly projection, and export using the plugin, do you still get the
error? My impression was that the crash was perhaps being caused by
something to do with projections, and not by the special characters.


Reply to this email directly or view it on GitHub
#32 (comment).

@tomchadwin
Copy link
Collaborator

OK, so what about:

  • different projection, but good field names
  • UTM projection, but bad field names

Which one crashes QGIS with OL3 preview/export?

@tomchadwin
Copy link
Collaborator

I raised the lack of Leaflet styling in #45, and have now fixed it in master

@tomchadwin
Copy link
Collaborator

@riccardoklinger Can you upload the SHP whose name ends in 33, with the far-eastern field names and values? It's not in the ZIP you uploaded before.

@tomchadwin
Copy link
Collaborator

I am really struggling to understand the QGIS crash issue. If I OL preview/export the whole project uploaded above by @riccardoklinger, I get the crash. If I deselect all the layers apart from places_few_1_EPSG3857, I get the crash. If I restart QGIS to clear any project settings, and load places_few_1_EPSG3857 individually as a layer, it exports fine, even if I change the canvas's projection.

So, I still don't know what about that layer makes QGIS crash. Has anyone experienced a QGIS crash with any other layer, or with that layer not in that project?

@tomchadwin
Copy link
Collaborator

Is this the same issue?

https://github.com/volaya/qgis-ol3/issues/29

If so, I wonder what might be "wrong" with that layer? @boesiii, what was wrong with your layer which crashed qgis-ol3?

@boesiii
Copy link
Contributor

boesiii commented May 14, 2015

There was something wrong with my geometry. I did a "Repair Geometry" using ArcGIS and it was fixed.

@boesiii
Copy link
Contributor

boesiii commented May 14, 2015

I was looking at your issue. I downloaded your test data and experienced the same problem exporting to OL3 using Windows 7 64-bit. I think it might have something to do with the symbology of the layer you mentioned above. If you remove the symbology and recreate it, the export works fine.

@tomchadwin
Copy link
Collaborator

I wonder what specifically it is. I wondered whether it was the top style category with the blank value and legend, but removing this does not seem to stop the crash. Can you find any change to the style smaller than totally removing it which gets rid of the crash? I haven't yet.

@tomchadwin
Copy link
Collaborator

@boesiii Confirmed:

  1. Load test project
  2. Hide all layers apart from the one we are discussing
  3. Change style to single symbol style
  4. Change back to categorized
  5. Change column to "type"
  6. Classify

This takes you back to how the layer was styled when you load it. However, OL3 preview/export now works - no QGIS crash.

I am therefore tempted to explain this as bad data, and close this issue, until we can determine precisely what about that layer caused it. We can always reopen this issue if necessary. Does anyone disagree (@riccardoklinger)?

@boesiii
Copy link
Contributor

boesiii commented May 14, 2015

I think I have tracked down the issue. I first saved the style of the layer, then created a new qgis file, added problem shapefile, load problem style file, saved, closed. Created a new qgis file, added problem shapefile, styled layer without style file, saved, closed. I then compared both qgis files in notepad ++ and found that the "non-working" file had the following at line 211:

<renderer-v2 attr="&quot;type&quot;" symbollevels="0" type="categorizedSymbol">

where as the "working" file had the following:

<renderer-v2 attr="type" symbollevels="0" type="categorizedSymbol">

The "working" file also had the following additional lines at line 244:

<colorramp type="randomcolors" name="[source]"/>
<invertedcolorramp value="0"/>

If you revised the "non-working" file to include the changes from above then it does not cause the crash.

@tomchadwin
Copy link
Collaborator

Really nice work. So the style has some incorrectly escaped quotes? I wonder how on earth that happened. Final check: is there a difference in the incorrect style when exported, compared to the correct one? In other words, rather than comparing the whole .qgs, can you compare the exported style files?

Regardless, I think we can call this bad data, and close this issue. Many thanks, @boesiii - I'm extremely grateful to you for tracking this one down.

@boesiii
Copy link
Contributor

boesiii commented May 14, 2015

Yes the QML files (style) contain the bad text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants