Could be one of VB6 runtime bugs like this one:

Dim a() As Byte, s As String
a = vbNullString
s = StrConv(a, vbUnicode) ‘—- OOM here

You need good error handling and other infrastructure to grow your project above 300k LOC. Otherwise it will collapse under its own weight when you hit runtime and compiler bugs. Recently we got OOM during compilation (on our build server only) after innocuous code change. The project was working (and compiling binary) perfectly fine on dev machines.