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

Fix exceptions thrown by LineTool and PolygonTool #338

Merged
merged 1 commit into from Mar 27, 2019
Merged

Fix exceptions thrown by LineTool and PolygonTool #338

merged 1 commit into from Mar 27, 2019

Conversation

akater320
Copy link
Contributor

With "Advanced Editing" enabled in Preferences, PolygonTool and LineTool will throw many exceptions when dragging existing vertices or dragging the entire geometry.

AdvancedFeaturesEventBehavior attempts to composite its sub-behaviours. SelectVerticesWithBoxBehaviour cannot be successfully composited with the move behaviours since they both require the EditToolHandler lock.

The selection command is added to the undo stack, which is consistent with the Edit Geometry (SelectionTool) tool.

…not be composited with the MoveGeometry behaviours.

Signed-off-by: Adam Kater <adam.kater@rgi-corp.com>
@nprigour
Copy link
Contributor

Hi @akater320,

Can you become a little more specifc on the kind of exceptions thrown and provide some info on the conditions and steps under which we can reproduce them. I tried to perform some dragging of vertices (even of the whole geometry) in a polygon jdbc layer and I did not experienced any such issue.

@akater320
Copy link
Contributor Author

Thanks for checking it out.
You're right that the run-time behavior appears correct. The main issue is that performance/frame-rates are being degraded by using exceptions for control flow. Also, the console and logs are spammed by stack traces, making debugging difficult. The attached log file covers about 0.5 seconds of using the polygon tool with advanced features turned on.
udig-error-log.txt

@nprigour
Copy link
Contributor

These errors are logged every time you try and drag vertices? Is it possible that it is some issue related to Mac OS only? I cannot verify them problem since I work on windows env (windows 10) and I have never seen these stack traces while working in advanced editing mode.
Is any body else using udig in Mac env that can offer some help here?

@akater320
Copy link
Contributor Author

To reproduce, on Windows 10 or MacOS:

  1. Layer > Create (Polygon is easiest to demonstrate.)
  2. Activate Polygon Tool
  3. Ensure Advanced features are enabled for the tool
  4. Select vertices with the box.
  5. Drag vertices
  6. Exceptions are thrown on every mouse move event.

https://drive.google.com/open?id=1Rs6azz_kau-K6mv_EEbv4g_-B5IbeV9K

@nprigour
Copy link
Contributor

OK thanks @akater320 issue verified/replicated based on your instructions.
Based on some UI testing performed, it seems that the provided changes fix the problem

@nprigour
Copy link
Contributor

Hi @fgdrf ,
Do we want something more related to this issue? From the manual testing performed, it seems that the problem is fixed and I do not see any implications by the added code.

@fgdrf fgdrf added this to the 2.1.0 milestone Mar 27, 2019
@fgdrf fgdrf added the bug label Mar 27, 2019
@fgdrf fgdrf merged commit a858a63 into locationtech:master Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants