Threaded Menu crash
Posted: Sun Feb 07, 2021 5:24 am
Hey,
I'm currently having a random server crash on sending a threaded menu which I cant replicate. It just happens randomly, mostly it works and then suddenly it crashes.
The ThreadedClass has the base of a WorkerThread from here:
viewtopic.php?p=13740#p13740
I also uncommented the loading_menu parts, where I got the same message, but for sending the actual menu.
I'm currently having a random server crash on sending a threaded menu which I cant replicate. It just happens randomly, mostly it works and then suddenly it crashes.
Syntax: Select all
loading_state = itertools.cycle([' ', '. ', '.. ', '...'])
def build_loading_menu(menu, index):
menu.clear()
menu.append('Loading' + next(loading_state))
loading_menu = SimpleMenu(build_callback=build_loading_menu)
def _send_threaded_menu(index, callback, args, kwargs, set_page):
print('DEBUG 1')
# Returns a menu class which is ready to be sent to a player
menu = callback(*args, **kwargs)
print('DEBUG 2')
# New menu has been loaded - We can close the old loading menu
loading_menu.close(index)
print('DEBUG 3')
# Send new menu
menu.send(index)
print('DEBUG 4')
# If set_page is defined - Set player page on new menu
if set_page:
print('DEBUG 5')
menu.set_player_page(index, set_page)
print('DEBUG 6')
def send_threaded_menu(index, callback, args=(), kwargs=None, set_page=None):
kwargs = kwargs if kwargs is not None else dict()
# Send loading menu
loading_menu.send(index)
# Add function to WorkerThread
ThreadedClass.function_call(_send_threaded_menu, (index, callback, args, kwargs, set_page))
Code: Select all
DEBUG 1
DEBUG 2
Could not find steamerrorreporter binary. Any minidumps will be uploaded in-processUserMessageBegin: New message started before matching call to EndMessage.
L 02/07/2021 - 02:02:13: Engine error: UserMessageBegin: New message started before matching call to EndMessage.
Segmentation fault (core dumped)
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
The ThreadedClass has the base of a WorkerThread from here:
viewtopic.php?p=13740#p13740
I also uncommented the loading_menu parts, where I got the same message, but for sending the actual menu.
Syntax: Select all
loading_state = itertools.cycle([' ', '. ', '.. ', '...'])
def build_loading_menu(menu, index):
menu.clear()
menu.append('Loading' + next(loading_state))
loading_menu = SimpleMenu(build_callback=build_loading_menu)
def _send_threaded_menu(index, callback, args, kwargs, set_page):
print('DEBUG 1')
# Returns a menu class which is ready to be sent to a player
menu = callback(*args, **kwargs)
print('DEBUG 2')
# New menu has been loaded - We can close the old loading menu
# loading_menu.close(index)
print('DEBUG 3')
# Send new menu
menu.send(index)
print('DEBUG 4')
# If set_page is defined - Set player page on new menu
if set_page:
print('DEBUG 5')
menu.set_player_page(index, set_page)
print('DEBUG 6')
def send_threaded_menu(index, callback, args=(), kwargs=None, set_page=None):
kwargs = kwargs if kwargs is not None else dict()
# Send loading menu
# loading_menu.send(index)
# Add function to WorkerThread
ThreadedClass.function_call(_send_threaded_menu, (index, callback, args, kwargs, set_page))
Code: Select all
DEBUG 1
DEBUG 2
DEBUG 3
Could not find steamerrorreporter binary. Any minidumps will be uploaded in-processUserMessageBegin: New message started before matching call to EndMessage.
L 02/07/2021 - 04:10:34: Engine error: UserMessageBegin: New message started before matching call to EndMessage.
Segmentation fault (core dumped)