Global variables in ErrorHandler.cpp don't get reset after MOAB instance destruct/construct

Issue #129 new
Tim Tautges created an issue

There are two global variables in src/ErrorHandler.cpp, errorOutput and lastError, that don’t get re-initialized when the MOAB instance is destroyed/constructed again. That means if an application (like e.g. a test like MBTest) encounters an error, then prints it, lastError gets set. After the MOAB instance gets destroyed and re-created, lastError is still set, so behavior is different for the next error that gets reported (see the first line of function MBError in that same file).

See the attached example.

My suggestion for fixing is to reset those globals in the Core constructor.

Comments (2)

  1. Vijay M

    Fair enough, will take a look. I think we don’t have nearly enough tests with multiple Core instances. @Iulian Grindeanu

  2. Log in to comment