Debugger CTD

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: russ, Ralph

Message
Author
User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Debugger CTD

#21 Post by Keith Baxter »

Corjan wrote: Wed Dec 21, 2022 12:17 pm Ok,

Both systems are implemented now, no reason to crash anymore... I hope.

Corjan
Love your humor. :lol: :lol:

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Tetrachromat
Posts: 236
Joined: Sun Feb 14, 2021 6:55 pm

Re: Debugger CTD

#22 Post by Tetrachromat »

@Corjan I found a workaround for that specific issue with the '__index' metamethod referencing a table.

Instead of referencing the 'self' table

Code: Select all

  self.__index = self
__index can also reference a function that does the indexing on the 'self' table:

Code: Select all

  self.__index = function (_, key)
    return self[key] 
  end 
This is equivalent code. LUA does the same internally when encountering a table reference.

The debugger has no issue with this approach as it does not evaluate the function. Will use this one until your fix is released.

Post Reply