ryobg/JContainers

Exception in KernelBase.dll when calling lua functions

Closed this issue · 3 comments

I've been getting frequent exceptions being output to Visual Studio when calling lua functions while running the debugger (I've been tinkering with developing a dll. Note that the exception also occurs without my test dll being active).

The exception being reported is :
Exception thrown at 0x00007FFAF762A839 (KernelBase.dll) in
SkyrimSE.exe: 0xE24C4A02.

I've isolated at least one of the causes to calling a lua function (any function) through jLua.evalLuaInt(). The exception doesn't happen every time, but is more likely to happen if the lua function is more complex (but can still happen, just more infrequently, if there is nothing in the code block).

The exception also doesn't appear to happen immediately. The function may successfully return to papyrus, but the exception won't be caught by Visual Studio until a short while later (so I had to add wait functions in papyrus of 0.1 to 0.2 seconds to isolate where the exceptions were coming from).

The exceptions also don't appear to be fatal since the game continues running and there is no indication in either the game or the JC or Papyrus logs that it happened.

However, this could point to an underlying latent issue that could cause problems? AH Hotkeys is the only mod in my load order causing this as far as I know. There are no exceptions being output if AH Hotkeys is disabled.

Edit: this is with JC 4.1.11 using SKSE 2.0. 16 and SSE 1.5.80.

ryobg commented

That exception happens only when you are debugging? Note if an exception is thrown then somebody is handling it or your app will crash.

Yep, just wondering if there was anything to worry about or look at in terms of an underlying cause. These exceptions were only happening with AH Hotkeys (possibly because that's the only mod I have that uses JC lua). Perhaps my OCD was getting the better of me seeing all these messages populating my output panel.

ryobg commented

Well, I can just advise you to continue your observations. If you gather enough information, clues & logs , we might look at them. As of now though, not sure it makes sense.