Skip to content

Many errors logged when using Bio-Formats memoization with Java 17 #957

@petebankhead

Description

@petebankhead

Bug report

Describe the bug
Memoization in Bio-Formats previously resulted in warnings, but these have become errors in Java 17.

See ome/bioformats#3659 for details.

Because memoization can be used each time a reader is created, and the error is swallowed up before being propagated to QuPath, this can result in many long stack traces being printed in the log - with no straightforward way to control this on the QuPath side.

To Reproduce
Try to open any whole slide image using Bio-Formats with memoization enabled.
Browse the image (to ensure multiple readers are requested) and check the log for errors as described in the linked issue.

Expected behavior
Memoization works.

Or, if it doesn't work, it at least fails more quietly.

Desktop (please complete the following information):

  • OS: All (presumably)
  • QuPath Version v0.4.0-SNAPSHOT (really depending upon whether Java 17+ is used)

Additional context
This is a significant problem that needs fixed before QuPath v0.4.0.
The easiest approach would be to turn off memoization altogether, but sometimes it is really beneficial.
So we need a way to turn it off only when really necessary.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions