Dehacked: Incompatible code pointer

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Dehacked: Incompatible code pointer

Post by _mental_ »

Loading Dimension of the Boomed produces the following warning

Code: Select all

Frame 750: Incompatible code pointer 'RandomJump'
Debugging our Dehacked support doesn't help to reveal the real cause of this issue.
A_Jump which substitutes RandomJump code pointer excepts 6 arguments but only 3 are provided implicitly.
Initially I suspect that the problem is in variadic definition of A_Jump but that's not the case.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Dehacked: Incompatible code pointer

Post by Graf Zahl »

What info did you get?
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Dehacked: Incompatible code pointer

Post by _mental_ »

Not much to be honest. These lines are causing the warning

Code: Select all

TArray<uint32_t> &args = sym->Variants[0].ArgFlags;
unsigned numargs = sym->GetImplicitArgs();
if ((sym->Variants[0].Flags & VARF_Virtual || (args.Size() > numargs && !(args[numargs] & VARF_Optional))))
{
	Printf(TEXTCOLOR_RED "Frame %d: Incompatible code pointer '%s'\n", frame, Line2);
	sym = NULL;
}
numargs is 3, args.Size() is 6. There are no optional arguments.
Unfortunately, this doesn't give any hints on the real cause. I suspect both values should be equal.
Cacodemon345
Posts: 419
Joined: Fri Dec 22, 2017 1:53 am
Graphics Processor: ATI/AMD (Modern GZDoom)
Contact:

Re: Dehacked: Incompatible code pointer

Post by Cacodemon345 »

Maybe change numargs to 6? Or change args.Size to 3?
Last edited by Cacodemon345 on Sun Jun 03, 2018 10:22 am, edited 1 time in total.
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Dehacked: Incompatible code pointer

Post by Gez »

This is about as useful as saying "maybe fix the bug? just a guess"; so please do not comment on things that you don't understand.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Dehacked: Incompatible code pointer

Post by Graf Zahl »

No big mystery here. The entire argument validation step must be skipped for those special MBF code pointers, it's there to validate ones without parameters.

@Cacodemon345: Please stop posting such stuff. I already told you earlier today in your PR that you should first make sure what's going on before either changing something or commenting on it.
Cacodemon345
Posts: 419
Joined: Fri Dec 22, 2017 1:53 am
Graphics Processor: ATI/AMD (Modern GZDoom)
Contact:

Re: Dehacked: Incompatible code pointer

Post by Cacodemon345 »

@Cacodemon345: Please stop posting such stuff. I already told you earlier today in your PR that you should first make sure what's going on before either changing something or commenting on it.
OK.
Post Reply

Return to “Closed Bugs [GZDoom]”