[Coldbox 3.8.1] problem with instance.modulesConfig[moduleName] in renderer.cfc

I’m having a weird problem with a couple of the methods in renderer.cfc. When I open a page with a route customer:detail.index a couple of times, about 1 in 20 pages will error out with the message “key [customer] doesn’t exist”.

stacktrace:

ID: | ?? |

  • | - |
    LINE: | 537 |
    Template: | C:\inetpub\wwwroot\coldbox\system\plugins\Renderer.cfc |
    ID: | ?? |
    LINE: | 468 |
    Template: | C:\inetpub\wwwroot\coldbox\system\plugins\Renderer.cfc |
    ID: | ?? |
    LINE: | 256 |
    Template: | C:\inetpub\wwwroot\coldbox\system\Coldbox.cfc |
    ID: | ?? |
    LINE: | 382 |
    Template: | C:\inetpub\wwwroot\coldbox\system\Coldbox.cfc |
    ID: | ?? |
    LINE: | 77 |
    Template: | C:\inetpub\wwwroot\tilroy_webshop\Application.cfc |

I’ve been hunting this issue down for half a day now but I can’t seem to wrap my head around it.
For example, in the locateModuleView() method in renderer.cfc there is a line that says:
moduleViewPath = “#instance.modulesConfig[moduleName].mapping#/#instance.modulesConfig[moduleName].conventions.viewsLocation#/#arguments.view#”;

This line errors on the instance.modulesConfig[moduleName] part. And indeed, when I dump out instance, I sometimes get an empty array for instance.modulesConfig, but it seems to be completely random.
What’s especially weird is that when I first dump out writeDump(controller.getColdboxSettings()); before dumping out instance.modulesConfig, instance.modulesConfig is filled up again instead of being an empty array.

At this moment I have 2 coldbox applications running, both running on the same coldbox folders/files, and I only have this occuring on one of them. But I’m unable to figure out why.

Please help :slight_smile:
Best regards,
Mikaël