rwth-acis / VIAProMa

A Collaborative Mixed Reality Visualization Framework for Immersive Analytics
27 stars 2 forks source link

Connection Curves: Null Reference Exception when only using a head gaze pointer #191

Closed BenediktHensen closed 3 years ago

BenediktHensen commented 3 years ago

Describe the bug When no hand tracker is found and there is only a gaze cursor, the connection curve throws a null reference exception every frame once you start creating a curve.

NullReferenceException: Object reference not set to an instance of an object
ConnectionCurveManager.Update () (at Assets/Scripts/Connection Curves/ConnectionCurveManager.cs:71)

To Reproduce Steps to reproduce the behavior: Follow these steps in the editor by right-clicking and dragging to place the cursor on a button and then left-click to tap the button. Do not touch the left shift key or space key so that no simulated hand is created.

  1. Open the main menu
  2. Create and Join a Room
  3. Open the main menu again
  4. Click "Load Visualizations"
  5. Drag out a visualization, e.g. the bar chart
  6. Click the "..."-button on the app bar
  7. Click the connect-button

Expected behavior No error should happen and ideally, the connection curve should still be placeable with the gaze cursor.

Screenshots grafik

Bug Observed on the Following Devices Check applicable devices and platform by putting an x in-between the square brackets.

Additional context I would expect that the same problem also exists on the HoloLens 1 since it does not have hand-controllers.

SebastianMeinberger commented 3 years ago

Fixed in this and this commit. In case of an actually invalid cursor the connection curve manager now doesn't throw nullpointer exeption anymore, the gaze cursor is now recognised as valid and the selection of the main cursor now checks which cursor actually focuses the object, that called the event, instead of selecting one basically at random.