CommonWealthRobotics / BowlerBuilder

A Full-Stack Robotics Development Environment.
http://commonwealthrobotics.com/
GNU Lesser General Public License v3.0
3 stars 2 forks source link

Add a workaround for the fx thread exploding #49

Closed Octogonapus closed 5 years ago

Octogonapus commented 5 years ago

Description of the Change

When the JavaFX thread computes a node's layout bounds, sometimes it throws an NPE or an AIOOBE every repaint iteration. This persists until the offending node is removed from the scene graph. This is a few years old bug that I can't fix, so my workaround here is to swap the entire 3d view for a new one when we see those exceptions.

Verification Process

I tested this by hand and it correctly sees the FX thread exploding and remakes the 3d view. The 3d view freezes for around a second before coming back to life. It's better than crashing the entire tab at least.

Applicable Issues

None.

codecov-io commented 5 years ago

Codecov Report

Merging #49 into develop will decrease coverage by 0.01%. The diff coverage is 0%.

@@             Coverage Diff              @@
##             develop     #49      +/-   ##
============================================
- Coverage       0.64%   0.63%   -0.01%     
  Complexity         8       8              
============================================
  Files             74      75       +1     
  Lines           2192    2218      +26     
  Branches         133     140       +7     
============================================
  Hits              14      14              
- Misses          2178    2204      +26