Problems running a mod

Fri Jan 08, 2021 6:46 am

I'm new to this, so i'm gonna need some help. I built LZDoom for Linux (I cloned the g3.3mgw branch, that's the 3.87 dev), but i can't get a mod to run (in this case Hideous Destructor). Everytime i try to run it , i get this error:
Code:
lzdoom: /home/vlada/lzdoom/src/scripting/backend/codegen.cpp:1921: virtual ExpEmit FxMinusSign::Emit(VMFunctionBuilder*): Assertion `ValueType == Operand->ValueType' failed.
Aborted (core dumped)

I had a friend of mine check, LZDoom dev does support the latest dev version of the mod, and i also checked if i did something wrong, so i tried another mod and it works. I asked HD's dev and he has no clue why this happens.

Re: Problems running a mod

Fri Jan 08, 2021 8:20 am

That's a debug assert - that means you built a debug build, not a release one. I don't know on Linux, but on Windows, it'd give you a popup that lets you choose whether to abort, continue, or load a debugger.
You have to recompile LZDoom as a release build. Debug builds are compiled with debug code on and no optimizations, so they're way slower.

Re: Problems running a mod

Fri Jan 08, 2021 8:42 am

It would be helpful to find out what code causes the assert.

Re: Problems running a mod

Fri Jan 08, 2021 9:30 am

Minimal sample would be something like this
Code:
class MinusMemberCast : Actor
{
   float value;

   double func()
   {
      return -value;
   }
}

Re: Problems running a mod

Fri Jan 08, 2021 10:24 am

Not that again. Emit normally has no use for types, it should check registers instead, if possible.

Re: Problems running a mod

Fri Jan 08, 2021 11:06 am

So how so i compile a release build? Do i just run cmake like this
Code:
cmake -DCMAKE_BUILD_TYPE=Release

Or is there something else to it?

Re: Problems running a mod

Sat Jan 09, 2021 4:32 pm

Yep, that works. Thanks for the help