Skip to content
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

[Bug]: OpenTTD doesn't cleanly exit when no graphics set are found #11350

Closed
planetmaker opened this issue Oct 4, 2023 · 2 comments
Closed

Comments

@planetmaker
Copy link
Contributor

planetmaker commented Oct 4, 2023

Version of OpenTTD

7145b70 (master/HEAD)

Expected result

I expected OpenTTD to complain about missing base graphics and exit cleanly or to offer downloading them

Actual result

OpenTTD remained in limbo:

[planetmaker:~/ottd/openttd/build] [base] master* ± git show
commit 7145b7060aa00c3dbd60e05c51d7c275f016f825 (HEAD -> master, origin/master, origin/HEAD)
[planetmaker:~/ottd/openttd/build] [base] master* ± ./openttd 
Error: Failed to find a graphics set. Please acquire a graphics set for OpenTTD. See section 1.4 of README.md.
warning: queue 0x4955220 destroyed while proxies still attached:
  wl_callback@44 still attached
  wl_surface@42 still attached

(but it didn't exit)

Backtrace as follows:

futex_wait (private=<optimized out>, expected=12, futex_word=0x27a4ae4 <_http_cv+36>) at ../sysdeps/nptl/futex-internal.h:146
Downloading source file /usr/src/debug/glibc-2.38-4.fc39.x86_64/nptl/../sysdeps/nptl/futex-internal.h
146       int err = lll_futex_timed_wait (futex_word, expected, NULL, private);                                                                            
(gdb) bt
#0  futex_wait (private=<optimized out>, expected=12, futex_word=0x27a4ae4 <_http_cv+36>) at ../sysdeps/nptl/futex-internal.h:146
#1  futex_wait_simple (private=<optimized out>, expected=12, futex_word=0x27a4ae4 <_http_cv+36>) at ../sysdeps/nptl/futex-internal.h:177
#2  __GI___pthread_cond_destroy (cond=0x27a4ac0 <_http_cv>) at pthread_cond_destroy.c:53
#3  0x00007f30ffadc13d in __gthread_cond_destroy (__cond=<optimized out>)
    at /usr/src/debug/gcc-13.2.1-3.fc39.x86_64/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/x86_64-redhat-linux/bits/gthr-default.h:885
#4  std::__condvar::~__condvar() (this=<optimized out>, __in_chrg=<optimized out>)
    at /usr/src/debug/gcc-13.2.1-3.fc39.x86_64/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/std_mutex.h:157
#5  std::condition_variable::~condition_variable() (this=<optimized out>, __in_chrg=<optimized out>)
    at ../../../../../libstdc++-v3/src/c++11/condition_variable.cc:36
#6  0x00007f30ff85efd6 in __run_exit_handlers
    (status=1, listp=<optimized out>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:111
#7  0x00007f30ff85f11e in __GI_exit (status=<optimized out>) at exit.c:141
#8  0x0000000001715a47 in UserErrorI(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    (str="Failed to find a graphics set. Please acquire a graphics set for OpenTTD. See section 1.4 of README.md.")
    at /home/planetmaker/ottd/openttd/src/openttd.cpp:124
#9  0x000000000143c89b in HandleBootstrap() () at /home/planetmaker/ottd/openttd/src/bootstrap_gui.cpp:421
#10 0x00000000017184ef in openttd_main(int, char**) (argc=1, argv=0x7ffcacf88748) at /home/planetmaker/ottd/openttd/src/openttd.cpp:753
#11 0x0000000000e84754 in main(int, char**) (argc=1, argv=0x7ffcacf88748) at /home/planetmaker/ottd/openttd/src/os/unix/unix_main.cpp:32

Steps to reproduce

clone OpenTTD master
Have all dependencies except (what is that btw?)

CMake Warning at CMakeLists.txt:138 (find_package):
  By not providing "Findunofficial-breakpad.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "unofficial-breakpad", but CMake did not find one.

  Could not find a package configuration file provided by
  "unofficial-breakpad" with any of the following names:

    unofficial-breakpadConfig.cmake
    unofficial-breakpad-config.cmake

  Add the installation prefix of "unofficial-breakpad" to CMAKE_PREFIX_PATH
  or set "unofficial-breakpad_DIR" to a directory containing one of the above
  files.  If "unofficial-breakpad" provides a separate development package or
  SDK, be sure it has been installed.

Compile OpenTTD and start it.

@planetmaker
Copy link
Contributor Author

Right, fontconfig was missing. Adding that... a window actually opens

@rubidium42
Copy link
Contributor

Fixed by #11398.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants