JVM OutOfMemoryError

beaTunes is a software written in the programming language Java. One of the features of Java is automatic memory management. An implication of this is, that when the software is started, it has to state up to how much memory it wants to use. This is called the maximum heap size. You can check your minimum and maximum heap size in the About dialog. There beaTunes 3.5 and later displays both value under the heading Memory.

Depending on what you do with beaTunes, memory usage may be lower or higher. Factors influencing this most, are

  • Number of songs in your library
  • Number of parallel analysis tasks
  • Kind of analysis tasks

If you encountered a JVM OutOfMemoryError, what happened is that beaTunes tried to use more memory than it was configured to use. To lower the amount of memory beaTunes attempts to use, you can reduce the number of parallel analysis tasks or run fewer kinds of analysis tasks.

To lower the number of parallel analysis tasks, open the beaTunes preferences and go to the Analysis tab. There you'll find a control that let's you set the number of parallel analysis tasks. If possible, decrease the number and restart the application for the change to take effect.

Another way of reducing memory consumption is to choose fewer analysis tasks. E.g. instead of analyzing key, color and BPM, you might only want to analyze for BPM in one batch, then start a second batch with just key and so on.

Starting with beaTunes4, whenever you encounter a OutOfMemoryError beaTunes should offer you to increase the maximum heap size. Please do so and restart the application. As mentioned above, the About dialog shows the current settings.