Derpius / pythonsourceserverdiscordbot

Discord bot for my Python source server query library
GNU General Public License v3.0
3 stars 1 forks source link

[bug] Repeat HTTP GET failure causes stack overflow in GMod client #12

Closed Derpius closed 3 years ago

Derpius commented 3 years ago

Describe the bug If the GET loop fails repeatedly, it triggers a stack overflow, which is likely due to calling a function with access to the local scope, rather than giving a function object.

Derpius commented 3 years ago

Possibly solved in 1c8240179f3437df318600d8c941f05051caea88, however I don't know how GLua handles the stack for callbacks that aren't lambda functions (which retain access to the scope they were defined in, therefor they must be adding to the stack).

Closing for now.

Derpius commented 3 years ago

Ok I think I know why it triggered a stack overflow only now, it seems the failure callback in the GLua HTTP global function isn't async, unlike the success callback, which would mean when it works fine and doesn't spam errors, it doesn't build up calls on the stack, however calls to the failed callback WILL build up stack.

Derpius commented 3 years ago

Hopefully fixed with eb5c98ca3fd271c8819b4a761f60d0ed28d2404d