ID 383973 - Crash when closing a Viewer (Hydra) tab that has always been in the background

Follow

Problem summary:

The crashes occur when a Viewer (Hydra) tab that has been kept in the background at all times is closed.

  • Crash #1: Uninitialised members in the ImageLayer class, used for the Monitor Front Buffer feature of the tab.
  • Crash #2: Uninitialised GLEW function being used from isGLContextCurrent().

Steps to reproduce crash #1:

  • Set up a layout that contains a Viewer (Hydra) tab in the background.
  • Restart Katana.
  • Close Katana (without never displaying the Viewer (Hydra) tab).
  • Actual behaviour: Katana may potentially crash on shutdown:

#1  0x00007fffc37266a6 in ImageLayer::~ImageLayer() (this=0x60e000292f20) at Apps/Katana/PLUGINS/ViewerPlugins/GenericPlugins/src/layers/ImageLayer.cpp:66#2  0x00007fffc3726799 in ImageLayer::~ImageLayer() (this=0x60e000292f20) at Apps/Katana/PLUGINS/ViewerPlugins/GenericPlugins/src/layers/ImageLayer.cpp:55
  • Expected behaviour: Everything goes fine.
NOTE: Crash #1 is random. It may appear on some systems reliably, whereas in others it may never happen. However, building Katana with Clang and the AdddressSanitizers would catch the crash reliably.
 
NOTE: Crash #1 does not require the RfK plug-in being set up.

Steps to reproduce crash #2:

  • Set up the RfK plug-in in the KATANA_RESOURCES environment variable.
  • Set up a layout that contains a Viewer (Hydra) tab in the background.
  • Restart Katana.
  • Close Katana (without never displaying the Viewer (Hydra) tab).
  • Actual behaviour: Katana crashes on shutdown:

 1  ViewerAPI_cmodule.so!Viewport_isGLContextCurrent(FnViewportHostStruct*) [FnViewportHost.cpp : 925 + 0x2] 2  PRManViewerPlugins.so + 0x1217df 3  PRManViewerPlugins.so + 0x50962
  • Expected behaviour: Everything goes fine.
NOTE: Crash #2 may crash on startup on occasions.  If not, it will certainly crash on shutdown.

Tested versions/platforms:

Crash #1
  • 3.0v7 - Unaffected
  • 3.0v8 - Unaffected
  • 3.1v1 - Affected
  • 3.1v2 - Affected
  • 3.1v3 - Affected
Crash #2
 
  • 3.0v7 - ?
  • 3.0v8 - ?
  • 3.1v1 - Affected
  • 3.1v2 - Affected
  • 3.1v3 - Affected

Customer version/platform:

Linux Mint 19.x / Katana 3.1 / PRMan 22.x

    We're sorry to hear that

    Please tell us why