Menu

#88 HexenC Registers/Globals Overflow

1.04
closed
nobody
None
2022-12-29
2020-07-09
No

When compiling a large HexenC project with FTEQCC -H2, the resulting progs shows strange behavior in-game: entities randomly change models, think/function calls get mixed up, monsters receive infinite health when damaged, etc. This behavior is the same as what happens with old HCC.EXE versions that did not support more than 65535 registers: opcode overflow. Here is my project:
https://github.com/Shanjaq/Hexen-2---Shadows-of-Chaos-fork/tree/master/portals

NOTE: Newer versions of HCC.EXE produce a v7 progs.dat, which functions normally as expected.

Discussion

  • Shanjaq Astraljam

    This is the slightly smaller project that does not include Shadows of Chaos code, it has the same issue though:
    https://github.com/Shanjaq/uhexen2-apotheum/tree/master/portals
    (Please use this instead of the repo linked in the original ticket! I could not edit the ticket and would have used this repo instead had I not already posted it.)

    Screenshot attached of an entity that randomly changed its model to the Paladin axe upon executing one of its Think functions in p_dmatter.hc, around line 331

     

    Last edit: Shanjaq Astraljam 2020-07-09
  • Shanjaq Astraljam

    UPDATE: this appears to be caused by attempting to use the auto-generated "_x, _y, _z" vars from struct members of type Vector. hcc.exe handles this correctly, but there is a ticket open for the root cause in fteqcc.exe here:
    https://sourceforge.net/p/fteqw/tickets/91/

     
  • Shanjaq Astraljam

    confirmed fixed in r5736

     
  • eukara

    eukara - 2022-03-06
    • status: open --> closed
     
  • Xylemon

    Xylemon - 2022-12-29
     

Log in to post a comment.

MongoDB Logo MongoDB