Bug report #15185

Type 12 of attribute 0 of feature 0 unknown

Added by dr - over 8 years ago. Updated about 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Unknown
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23124

Description

Create Shapefile with Integer field, but when trying to edit it get an error:

Type 12 of attribute 0 of feature 0 unknown.

Note about my QGIS:

Compiled against    GDAL/OGR 1.11.2
Running against GDAL/OGR 2.1.0

Is it expected behaviour?

History

#1 Updated by Alexander Bruy over 8 years ago

Works fine in official builds and self-compiled QGIS under Linux and Windows. Looks like local issue with your GDAL version.

#2 Updated by Matthias Kuhn over 8 years ago

  • Status changed from Open to Feedback

Is this an official build?

#3 Updated by dr - over 8 years ago

Yes QGIS is from official nightly builds (Ubuntu 14.04, QGIS code revision 972fc9f).

#4 Updated by Matthias Kuhn over 8 years ago

And GDAL?

If this problem is reproducible with matching build and runtime gdal we should have a look at it.
If not it's either a packaging or a local issue. Build and runtime version should normally match and certainly not differ int he major version number.

Did you do anything special to install gdal? Sorry, I don't have ubuntu, so I don't know what the mismatch is caused by.

#5 Updated by dr - over 8 years ago

Yes, I've installed GDAL 2.1 manually, not from official repo. Is it expected that any issues can be observed if build version GDAL is differ from runtime?

#6 Updated by Even Rouault over 8 years ago

Is it expected that any issues can be observed if build version GDAL is differ from runtime?

It depends. In QGIS code, there is code that is different depending on the version found at compile time. For example GDAL 1.X doesn't handle Integer64 whereas GDAL 2.X does. So if you compile against GDAL 1.X and run against GDAL 2.X, GDAL 2.X will return OFTInteger64 values that QGIS code will not expect to see (your case here).
So for safety, it is better to run against the same version that has been built.

#7 Updated by dr - over 8 years ago

When we can get QGIS packaged against GDAL 2.X? Any plans?

#8 Updated by Jürgen Fischer over 8 years ago

  • Status changed from Feedback to Closed

dr - wrote:

When we can get QGIS packaged against GDAL 2.X? Any plans?

Either build QGIS against your local GDAL or upgrade your distribution. We build against the distributions (or ubuntugis') GDAL, so our package depend on the system's GDAL.

#9 Updated by Jürgen Fischer over 8 years ago

Jürgen Fischer wrote:

Either build QGIS against your local GDAL or upgrade your distribution. We build against the distributions (or ubuntugis') GDAL, so our package depend on the system's GDAL.

IOW we already package against GDAL 2.x on most of the platforms.

#10 Updated by Jürgen Fischer about 7 years ago

  • Category set to Unknown

Also available in: Atom PDF