tterrag1098 / Registrate

Your mod's best friend - keep your registry objects simple and organized
Mozilla Public License 2.0
117 stars 33 forks source link

Exceptions not logged in RegistrateDataProvider #64

Open mikerooni opened 1 year ago

mikerooni commented 1 year ago

While debugging a hanging forge datagen process in GTCEu-Modern, we have discovered a case where exceptions are not logged (or at least not logged early enough).

In the following case, the RegistrateDataProvider hangs indefinitely without logging the underlying exception:

Here you can see the debugger view, the breakpoint is set at the returnStatement of RegistrateDataProvider#run: image

The last subProvider ended up finishing normally afterwards, but the RegistrateItemTagsProvider depended on the RegistrateTagsProvider.IntrinsicImpl#IntrinsicImpl above it.

The following is a screenshot of the list to be used in the return statement: image

You can see that list[4] is not completed, but depends on list[3], which had completed exceptionally. This caused the datagen process to hang indefinitely, as the calling code was waiting for the RegistrateDataProvider to complete.

In case one of the subProviders fails, please consider logging the exception immediately.