New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash: TypeError: '<' not supported between instances of '_ExtCallbackObject' and '_ExtCallbackObject' #2898

Open
fcarsten opened this Issue Jan 28, 2019 · 14 comments

Comments

Projects
None yet
6 participants
@fcarsten
Copy link

fcarsten commented Jan 28, 2019

Game crashed while creating first tutorial game:

Starting Unknown Horizons
output will be written to logfile "unknownhorizons-DATETIME.log"
Logging to b'C:\Users\carsten\Documents\My Games\unknown-horizons\log\unknown-horizons-2019-01-28_14-49-55.log' and D:\games\download\Unknown-Horizons\unknown-horizons\fife.log
Discovered old settings file, auto-upgrading: 1 -> 38
Press any key to continue . . . Logging to b'C:\Users\carsten\Documents\My Games\unknown-horizons\log\unknown-horizons-2019-01-28_14-50-20.log' and D:\games\download\Unknown-Horizons\unknown-horizons\fife.log
Ship created and weapons loaded.
Traceback (most recent call last):
File "run_uh.py", line 381, in
main()
File "run_uh.py", line 122, in main
ret = horizons.main.start(options)
File "D:\games\download\Unknown-Horizons\unknown-horizons\horizons\main.py", line 255, in start
horizons.globals.fife.run()
File "D:\games\download\Unknown-Horizons\unknown-horizons\horizons\engine\engine.py", line 279, in run
self.loop()
File "D:\games\download\Unknown-Horizons\unknown-horizons\horizons\engine\engine.py", line 296, in loop
f()
File "D:\games\download\Unknown-Horizons\unknown-horizons\horizons\extscheduler.py", line 73, in tick
self.add_object(obj) # re-add object
File "D:\games\download\Unknown-Horizons\unknown-horizons\horizons\extscheduler.py", line 84, in add_object
heapq.heappush(self.schedule, [(time.time() + obj.run_in), obj])
TypeError: '<' not supported between instances of '_ExtCallbackObject' and '_ExtCallbackObject'

Unknown Horizons has crashed.

We are very sorry for this and want to fix the underlying error.
In order to do this, we need the information from the logfile:
unknown-horizons-2019-01-28_14-50-20.log

@MartinKondor

This comment has been minimized.

Copy link

MartinKondor commented Jan 28, 2019

Same with me

Traceback (most recent call last):
  File "run_uh.py", line 381, in <module>
    main()
  File "run_uh.py", line 122, in main
    ret = horizons.main.start(options)
  File "C:\Files\Programs\Unknown-Horizons\unknown-horizons\horizons\main.py", line 255, in start
    horizons.globals.fife.run()
  File "C:\Files\Programs\Unknown-Horizons\unknown-horizons\horizons\engine\engine.py", line 279, in run
    self.loop()
  File "C:\Files\Programs\Unknown-Horizons\unknown-horizons\horizons\engine\engine.py", line 296, in loop
    f()
  File "C:\Files\Programs\Unknown-Horizons\unknown-horizons\horizons\extscheduler.py", line 71, in tick
    obj.callback()
  File "C:\Files\Programs\Unknown-Horizons\unknown-horizons\horizons\gui\widgets\minimap.py", line 440, in <lambda>
    ExtScheduler().add_new_object(lambda: high(i), self, INTERVAL, loops=1)
  File "C:\Files\Programs\Unknown-Horizons\unknown-horizons\horizons\gui\widgets\minimap.py", line 440, in high
    ExtScheduler().add_new_object(lambda: high(i), self, INTERVAL, loops=1)
  File "C:\Files\Programs\Unknown-Horizons\unknown-horizons\horizons\extscheduler.py", line 93, in add_new_object
    self.add_object(obj)
  File "C:\Files\Programs\Unknown-Horizons\unknown-horizons\horizons\extscheduler.py", line 84, in add_object
    heapq.heappush(self.schedule, [(time.time() + obj.run_in), obj])
TypeError: '<' not supported between instances of '_ExtCallbackObject' and '_ExtCallbackObject'

Desktop:

  • OS: Windows 10
  • Version: 1803

When:
Occured when I clicked to place a town.

@hyst329

This comment has been minimized.

Copy link

hyst329 commented Jan 28, 2019

Same with me (Windows 10 1803, game version 2019.1.211). Error shows upon accessing the settings, for example

@jmdejong

This comment has been minimized.

Copy link
Contributor

jmdejong commented Jan 28, 2019

does this happen consistently when you do some action, or only randomly?

@hyst329

This comment has been minimized.

Copy link

hyst329 commented Jan 29, 2019

@jmdejong it's consistent, at least for me

@jmdejong

This comment has been minimized.

Copy link
Contributor

jmdejong commented Jan 29, 2019

I have not been able to reproduce this, but based on the backtrace I can guess what's going on.

In #2899 I made '<' supported between two _ExtCallbackObject instances.

@jmdejong

This comment has been minimized.

Copy link
Contributor

jmdejong commented Jan 31, 2019

@LinuxDonald Do we have a new windows installer with the latest PR?

@fcarsten

This comment has been minimized.

Copy link
Author

fcarsten commented Feb 4, 2019

If there is a new installer I'm happy to test if this still happens on my machine.

@LinuxDonald

This comment has been minimized.

Copy link
Member

LinuxDonald commented Feb 5, 2019

I will create an new this weekend. Sorry for the delay

@LinuxDonald

This comment has been minimized.

@dsgagi

This comment has been minimized.

Copy link

dsgagi commented Feb 10, 2019

Unfortunately, now it crashes on startup. :)

Starting Unknown Horizons
output will be written to logfile "unknownhorizons-DATETIME.log"
Traceback (most recent call last):
  File "C:\Unknown-Horizons\unknown-horizons\run_uh.py", line 381, in <module>
    main()
  File "C:\Unknown-Horizons\unknown-horizons\run_uh.py", line 109, in main
    import horizons.main
  File "C:\Unknown-Horizons\unknown-horizons\horizons\main.py", line 44, in <module>
    from horizons.constants import AI, GAME, GAME_SPEED, GFX, NETWORK, PATHS, SINGLEPLAYER, VERSION
  File "C:\Unknown-Horizons\unknown-horizons\horizons\constants.py", line 94, in <module>
    class VERSION:
  File "C:\Unknown-Horizons\unknown-horizons\horizons\constants.py", line 96, in VERSION
    RELEASE_VERSION = get_git_version()
  File "C:\Unknown-Horizons\unknown-horizons\horizons\constants.py", line 61, in get_git_version
    git_string = subprocess.check_output(describe, cwd=uh_path, universal_newlines=True).rstrip('\n')
  File "C:\Unknown-Horizons\python\lib\subprocess.py", line 376, in check_output
    **kwargs).stdout
  File "C:\Unknown-Horizons\python\lib\subprocess.py", line 453, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Unknown-Horizons\python\lib\subprocess.py", line 756, in __init__
    restore_signals, start_new_session)
  File "C:\Unknown-Horizons\python\lib\subprocess.py", line 1155, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Press any key to continue . . .
@LinuxDonald

This comment has been minimized.

Copy link
Member

LinuxDonald commented Feb 10, 2019

New installer will come I forgot to comment out an line....

@hyst329

This comment has been minimized.

Copy link

hyst329 commented Feb 10, 2019

@LinuxDonald Is it possible to test the installer in AppVeyor to prevent such cases (i.e. not only build the installer, but also run it and try to run the installed game)?

@fcarsten

This comment has been minimized.

Copy link
Author

fcarsten commented Feb 20, 2019

Fix confirmed. Just tried the version in the link by @LinuxDonald and it no longer crashes when starting the tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment