Bug report #8451

"Transform error caught: forward transform of..." while editing on qgis master

Added by Giovanni Manghi over 11 years ago. Updated almost 11 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Projection Support
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:Yes Copied to github as #:17220

Description

While editing on qgis master I'm getting a lot of errors of the type

Transform error caught: forward transform of
(-5848.195584, 67472.955726)
PROJ.4: +proj=longlat +datum=WGS84 +no_defs +to +proj=tmerc +lat_0=39.66825833333333 +lon_0=-8.133108333333334 +k=1 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
Error: latitude or longitude exceeded limits

this does not happens on 1.8 using the same project, layers and options (snapping, etc.).

Attached a project to allow replicate, but in general it is enough to have two layers with different crs (ex: wgs 84 and utm) and otrf enabled (project crs set to match the crs of a layer. ex wgs84). Then toggle editing one of the layers (ex: the utm): sometimes the log starts immediately to be filled with such errors, sometimes it is needed to digitize something (and make some zoom in/out) and sometimes it happens only when digitizing if snapping is active.

While it is a regression it also does not seems to have any bad effect while using the program, as far as I can see... so for now I will not tag this as blocker.

test_error.zip (39.3 KB) Giovanni Manghi, 2013-08-11 05:36 PM

e882e47_proj_err_test.sqlite (4.28 MB) Brian Freed, 2013-11-21 10:19 AM

e882e47_proj_err_test.qgs (66.7 KB) Brian Freed, 2013-11-21 10:19 AM

History

#1 Updated by Giovanni Manghi about 11 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed

I can't see this anymore, at least on master, so probably some commit has fixed it.

#2 Updated by Brian Freed about 11 years ago

  • Status changed from Closed to Reopened

I've been getting the same behavior on a couple different projects now.

Transform error caught: forward transform of
(125809.807655, 253849.727221)
PROJ.4: +proj=longlat +datum=WGS84 +no_defs +to +proj=tmerc +lat_0=0 +lon_0=-78.8 +k=0.999444444 +x_0=2000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs
Error: latitude or longitude exceeded limits

The first time I hit it I was digitizing utility poles/cables. QGIS' redraw time would gradually increase, then eventually freeze/crash. If I stuck to moving points on a different layer, it wouldn't happen. But when I'd draw a lot of lines on the layer causing the Transform error, crashing was inevitable. I'm not positive there's a correlation between the error and the crashing, but it seemed like it.

I haven't found a way to predictably cause it - just having 2 different projection layers with otfr doesn't do it. I'll update this with a simplified file if/when I find a reproducible setup.

#3 Updated by Giovanni Manghi about 11 years ago

  • Resolution deleted (fixed)
  • Status changed from Reopened to Feedback

Brian Freed wrote:

I've been getting the same behavior on a couple different projects now.

Transform error caught: forward transform of
(125809.807655, 253849.727221)
PROJ.4: +proj=longlat +datum=WGS84 +no_defs +to +proj=tmerc +lat_0=0 +lon_0=-78.8 +k=0.999444444 +x_0=2000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs
Error: latitude or longitude exceeded limits

The first time I hit it I was digitizing utility poles/cables. QGIS' redraw time would gradually increase, then eventually freeze/crash. If I stuck to moving points on a different layer, it wouldn't happen. But when I'd draw a lot of lines on the layer causing the Transform error, crashing was inevitable. I'm not positive there's a correlation between the error and the crashing, but it seemed like it.

I haven't found a way to predictably cause it - just having 2 different projection layers with otfr doesn't do it. I'll update this with a simplified file if/when I find a reproducible setup.

can you attach a sample project/data?

#4 Updated by Brian Freed about 11 years ago

Sorry for the delay, I couldn't send the client's files.

But I finally got it reproducible. See attached. I numbered the objects as I created them.

Basically, it seems that the error happens when:
1. You have both projected layers and lat/long layers in the file
2. You have snapping to both types of layers turned on
3. You hover over an object on the projected layer to snap to it

The projected object and the lat/long object do not have to be near each other, just having the lat/long snapping turned on is enough.
Snapping to lat/long objects still works even if snapping to projected layers is still active.

#5 Updated by Brian Freed about 11 years ago

footnote:
I was back on the same site all day yesterday & this morning, and can confirm that file performance degrades with every object created. I was hard crashing QGIS about once per hour. It was usually when 800-1500 of these errors had been logged, but that could be a coincidence.

#6 Updated by Giovanni Manghi about 11 years ago

  • Target version changed from Version 2.0.0 to Future Release - High Priority
  • Priority changed from Normal to High
  • Crashes QGIS or corrupts data changed from No to Yes

Brian Freed wrote:

Sorry for the delay, I couldn't send the client's files.

But I finally got it reproducible. See attached. I numbered the objects as I created them.

Basically, it seems that the error happens when:
1. You have both projected layers and lat/long layers in the file
2. You have snapping to both types of layers turned on
3. You hover over an object on the projected layer to snap to it

The projected object and the lat/long object do not have to be near each other, just having the lat/long snapping turned on is enough.
Snapping to lat/long objects still works even if snapping to projected layers is still active.

anyway you are not getting hard crashes, right?

because qgis master is crashing with your project, when I try to add a line feature in one of your layers.

Can you give qgis master a try? Thanks


giovanni@sibirica ~/Desktop/QGIS-master/build $ qgis
Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_US]
Warning: Could not parse stylesheet of widget 0x124b250
undo index changed 1

(qgis:1027): Gtk-WARNING **: Error loading theme icon 'dialog-information' for stock: Error opening file: Too many open files

(qgis:1027): Gtk-WARNING **: Error loading theme icon 'dialog-information' for stock: Error opening file: Too many open files
undo index changed 0
undo index changed 1
undo index changed 0

(qgis:1027): GLib-ERROR **: Creating pipes for GWakeup: Too many open files

QGIS died on signal 5[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7f929609b700 (LWP 1044)]
[New Thread 0x7f92a9426700 (LWP 1035)]
[New Thread 0x7f92aa51f700 (LWP 1034)]
0x00007f92d04c5a43 in poll () from /lib/x86_64-linux-gnu/libc.so.6
[Current thread is 1 (Thread 0x7f92d79b87c0 (LWP 1027))]
#0  0x00007f92d04c5a43 in poll () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x00007f92ced22ff6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#2  0x00007f92ced23124 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#3  0x00007f92d30b23bf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#4  0x00007f92d24add5e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#5  0x00007f92d3081c82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#6  0x00007f92d3081ed7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#7  0x00007f92d3086f67 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#8  0x0000000000560416 in main ()
No symbol table info available.
gdb returned 0
Aborted (core dumped)

#7 Updated by Brian Freed about 11 years ago

my files were created with qgis-dev - version e882e47, from 11/18. That's the same thing as Master, right? (other than the fact I haven't re-installed in 3 days)

#8 Updated by Brian Freed about 11 years ago

If you start a fresh QGIS session and just load in all the layers, does it still crash?
(trying to figure out if it's my .qgs file or the database)

#9 Updated by Giovanni Manghi about 11 years ago

Brian Freed wrote:

If you start a fresh QGIS session and just load in all the layers, does it still crash?
(trying to figure out if it's my .qgs file or the database)

yeah, still crashes. It seems a qgis issue.

#10 Updated by Giovanni Manghi about 11 years ago

Brian Freed wrote:

my files were created with qgis-dev - version e882e47, from 11/18. That's the same thing as Master, right? (other than the fact I haven't re-installed in 3 days)

can you update? so we can see of is something that was added in the last days.

#11 Updated by Brian Freed about 11 years ago

I'm trying to set the project to a non-user projection now, but I'm getting a bunch of dialogs like 'Select datum transformations for layer 2272_points'. it's got 5 rows that say +towgs84=, then various numbers.
I have no idea what I'm looking at, sorry. :-(

Shoot. I was going to start from scratch and give you a new file, but even when I start a new project I'm getting that datum transformations thing again.
1.8 handled our custom projection so well that I forgot it was the default for all our files.

I need to get a project out today. Tomorrow I should have time to start over again with a non-user projection.

#12 Updated by Giovanni Manghi about 11 years ago

Brian Freed wrote:

I'm trying to set the project to a non-user projection now, but I'm getting a bunch of dialogs like 'Select datum transformations for layer 2272_points'. it's got 5 rows that say +towgs84=, then various numbers.
I have no idea what I'm looking at, sorry. :-(

Shoot. I was going to start from scratch and give you a new file, but even when I start a new project I'm getting that datum transformations thing again.
1.8 handled our custom projection so well that I forgot it was the default for all our files.

I need to get a project out today. Tomorrow I should have time to start over again with a non-user projection.

this is new stuff in qgis master, that obviously needs to be fine tuned yet.

#13 Updated by Brian Freed about 11 years ago

ah, gotcha. I was afraid I'd done something stupid. Thanks

#14 Updated by Brian Freed about 11 years ago

just saw your post #11 - we must have passed each other. Yeah, I'll go ahead and update - probably tomorrow

#15 Updated by Matthias Kuhn about 11 years ago

There have been a couple of recent updates in this area. Could you already check if this fixes the problems?

#16 Updated by Giovanni Manghi about 11 years ago

Matthias Kuhn wrote:

There have been a couple of recent updates in this area. Could you already check if this fixes the problems?

Hi Matthias, probably (not sure 100%) the issue described in this ticket is gone on master, anyway while testing the attached project/layers I'm getting an hard crash 100% when editing one of the line layers, with otfr on. It does happen also if snapping is disabled and the layers added directly from the attached SL database in a new project.

Probably we should close this ticket and file a new one about this probable regression.

#17 Updated by Brian Freed about 11 years ago

I just reinstalled, but it's reporting the same version.

I'm using the osgeo4w-setup-x86_64.exe installer. The installer showed a newer version (2.1.0-62 instead of 2.1.0-60), but the title bar and help menu are still reporting QGIS code revision e882e47. I deleted the whole OSGeo4W64 folder to be sure I was using a fresh install - definitely downloaded the files directly. Anyway...

The test file still opens here, and snapping still throws the error.

I suppose that's not surprising, if the installer's just installing the same version I was using before. :-/

Is there another way to get a newer version of master?

#18 Updated by Giovanni Manghi about 11 years ago

  • Status changed from Feedback to Open
  • Priority changed from High to Severe/Regression

Brian Freed wrote:

I just reinstalled, but it's reporting the same version.

I'm using the osgeo4w-setup-x86_64.exe installer. The installer showed a newer version (2.1.0-62 instead of 2.1.0-60), but the title bar and help menu are still reporting QGIS code revision e882e47. I deleted the whole OSGeo4W64 folder to be sure I was using a fresh install - definitely downloaded the files directly. Anyway...

The test file still opens here, and snapping still throws the error.

I suppose that's not surprising, if the installer's just installing the same version I was using before. :-/

Is there another way to get a newer version of master?

the package qgis-dev you find in osgeo4w is the latest build available for qgis master.

Anyway I tested too on Windows and confirm this issue while there is no crash. On the other hand on Linux it crashes (but may not be related).

#19 Updated by Brian Freed about 11 years ago

ok great, thanks for looking into that!

#20 Updated by Giovanni Manghi about 11 years ago

On the other hand on Linux it crashes (but may not be related).

On Linux qgis master crashes, qgis 2.0 does not crash bu reports the messages described in this ticket.

#21 Updated by Giovanni Manghi almost 11 years ago

  • Status changed from Open to Closed
  • Resolution set to worksforme

The original issue described in this ticket seems gone in the latest master.

Also available in: Atom PDF