# Upgrading module crashes gateway when devices present

**URL:** <https://forum.inductiveautomation.com/t/upgrading-module-crashes-gateway-when-devices-present/41351>\
**Category:** Module Development\
**Created:** [December 9, 2020, 5:53pm UTC](https://forum.inductiveautomation.com/t/upgrading-module-crashes-gateway-when-devices-present/41351 "2020-12-09T17:53:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![keithw](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@keithw](https://forum.inductiveautomation.com/u/keithw)\
**Post date:** [December 10, 2020, 4:33pm UTC](https://forum.inductiveautomation.com/t/upgrading-module-crashes-gateway-when-devices-present/41351/3 "2020-12-10T16:33:34Z")

</div>

Mr. Herron, thank you for encouraging me to empower myself. IntelliJ with remote debugging is excellent.

My problem had to do with loading and unloading a dll.

I was following this suggestion [here](http://forum.inductiveautomation.com/t/module-using-dll-unloading/6183)

If I stepped through the execution with the debuger everything would be fine. Does this imply that the dll load is async and one should wait some time before trying to reference it?

I’ve opted for catching the “UnsatisfiedLinkError” during the ModuleHook.setup() instead of unloading the library during ModuleHook.shutdown().

---

_[View the full topic](https://forum.inductiveautomation.com/t/upgrading-module-crashes-gateway-when-devices-present/41351)._
