Chroma runs out of memory slicing ~85MB file on macOS

Comments

5 comments

  • Avatar
    Jonny Yeu

    Hey Richard, have you turned on the option to reduce memory usage in Chroma? This is found under Tools > Preferences.

    0
    Comment actions Permalink
  • Avatar
    Richard Bateman

    There is no "Tools > Preferences" on mac, but there is a "Chroma > Preferences" which shows the following:

    https://www.dropbox.com/s/18042t1nqri3ljr/Screenshot%202019-01-01%2020.36.21.png?dl=0

    Given the way it's labeled it's unclear to me how that option would affect anything since I'm seeing the crash when processing a single file without loading anything additional before hand. I can reproduce this on two different macs, both running macOS Mojave 10.14.2 and Chroma 3.1.1

    0
    Comment actions Permalink
  • Avatar
    Brandon Bloch

    Hi Richard,

    Sorry you're running into this issue.

    Background info

    Unfortunately Chroma is very hungry for CPU and RAM. An 85 MB file probably contains about 1-2 million commands, and Chroma needs to look through them all multiple times. The sheer amount of processing required has been one of our biggest motivations for developing CANVAS.

    When you load a file, Chroma keeps a copy of it in memory. Normally when you save, a second copy is created, to which all of the modifications are made. This allows you to make some change and re-save the file a second time.

    "Reduce memory usage" basically tells Chroma not to make the second copy, and to do its processing on the only copy. This cuts the amount of memory significantly (not quite in half, but that order of magnitude) with the caveat that if you change any settings and want to run Chroma on your file a second time, you'll have to re-load the file again.

    If the crash occurs before you are able to save, changing this setting will not help. However, if it occurs during saving, there is a very high likelihood that this setting will help.

    Actionable stuff

    It should attempt to use up to 75% of your memory but it sounds like this isn't working correctly for you. There may be another cap being enforced (e.g. your OS might not let a single program use more than X GB of memory). Since the app isn't reloaded until you acknowledge the out of memory error, you can peek to see how much memory Chroma has reached before crashing. On macOS, Activity Monitor should give you this information (be sure to filter for Chroma Helper as well as Chroma). Would you mind checking this information and letting us know?

    Cheers,
    Brandon

    0
    Comment actions Permalink
  • Avatar
    Jan Doubrava

    Brandon Bloch FYI I'm having the out of memory error too. Running windows 10 with 8 Gb of RAM.

    0
    Comment actions Permalink
  • Avatar
    Richard Bateman

    So I never did find a way to resolve this on either of the two macOS computers I was experiencing it on. A third computer which had been freshly reinstalled -- with less memory free, actually -- does not experience the problem. The only difference I can think of is that this computer started out on macOS 10.14 instead of being upgraded to it, but I don't know if that's really relevant or not.

    I am (for now) able to use this system but the others I can't. I guess Chroma isn't open source? If it was I could try to find the issue myself on one of the systems which experiences the issue, but I don't know what to do as it is. 

    0
    Comment actions Permalink

Please sign in to leave a comment.