POST
|
I've checked through it, all of the underlying data is fine. There has to be something odd going on though: I did a little further troubleshooting, and there is no crash when the definition query returns just one record. When the definition query returns multiple records, then there is a crash. All of the records have the same SRID, they are all points, etc etc etc. I've been affected before by bugs in the ArcGIS software on previous occasions, this may be another bug.
... View more
07-31-2016
05:34 PM
|
0
|
0
|
551
|
POST
|
Hi Neil, as far as I can tell it's exactly the same as every other layer that I have. It's starting to look as though there is a bug in the arcpy libraries as the script is fine when the layer has no definition query added, the fatal crashes only occur when a definition query is added which returns data. The layer in question displays in ArcGIS with no problems (and the source data displays in QGIS with no problems) Screenshot of problem layer properties: Screenshot of properties of layer with no problem:
... View more
07-28-2016
07:20 PM
|
0
|
0
|
551
|
POST
|
Hi Dan. I should have included the script as an attachment to the original query. There is a try except block, and it is catching some errors, but even with the error trapping python is still crashing. I've narrowed down the problem further to this line: lyrExtent = lyr.getExtent() which is supposed to extract extents from the layer file. With that line commented out there are no errors and no crashes. With that line active most layers are ok, but some layers are generating errors which are caught by the error trapping, and there is one layer file which completely crashes python and ArcGIS, but only when that layer has a definition query which returns data. I'm new to python scripting and arcpy, so maybe the way that my script is extracting extents is completely wrong. I've also attached a sample of the file being output by the script, currently the extents in the file are all dummy values.
... View more
07-27-2016
09:41 PM
|
0
|
0
|
551
|
POST
|
I have a python script which walks through directories looking for layer files, in order to compile a list of layer files into a csv file. It crashes ArcGIS 10.4 (and also crashes Python when run via the command line) on accessing a particular layer file which retrieves data from an SQL table. The problem in the layer file appears to be caused by the definition query in the layer file: when the layer has no definition query then the script is fine; when the layer has a definition query which returns no data then the script is also fine; however when the layer has a definition query which does return data then the script crashes. Other layer files exist which have the same definition query, but the script doesn't crash when accessing those other layers. Recreating the layer from scratch hasn't worked. Has anyone run across a similar problem before?
... View more
07-27-2016
07:48 PM
|
0
|
6
|
1703
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|