Skip to content

Crash without error message when defining more than 2000 Soil Classes in Soil Parameters #74

@Chrbur

Description

@Chrbur

Setup Information

  • Raven version: latest
  • Operating System: Any

Description

When defining more then 2000 soil classes with their corresponding parameters Raven runs into an access violation error. This happens because in the ParsePropertyFile.cpp the variable properties is constructed with a maximum size of 2000:

 int MAX_NUM_IN_CLASS = max(max(MAX_VEG_CLASSES, MAX_LULT_CLASSES), 2000);

Later on properties[num_read] gets set and num_read will just iteratively increase without the limit of 2000, leading to said error.

Steps To Reproduce

  1. Create Model with more than 2000 Soil Classes
  2. try to run it
  3. change int MAX_NUM_IN_CLASS = max(max(MAX_VEG_CLASSES, MAX_LULT_CLASSES), 2000); to int MAX_NUM_IN_CLASS = max(max(MAX_VEG_CLASSES, MAX_LULT_CLASSES), 10000);
  4. should work now

Additional context

No response

Contribution

  • I would be willing/able to open a Pull Request to address this bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions