leezer3 / OpenBVE

OpenBVE- A free train simulator
http://www.openbve-project.net
275 stars 52 forks source link

loading eternally at newest master and 1.8.4.4 #865

Open ginga81 opened 1 year ago

ginga81 commented 1 year ago

Description

When I select a route and vehicle and load, the loading continues forever and the game does not start. Debugging with monodevelop, Lines 685-697 of BaseRenderer.cs repeats Thread.Sleep(100) forever. However, other versions 1.8.1.0-1.8.4.3 continue to read forever as well, so it may not be caused by OpenBVE.

Reproduction

Route and vehicle are any.

Route

any

Train

any

Logs

The problem this time is an endless loop, so no log is output.

Related information

My PC's spec: OS:Ubuntu 20.04 LTS 64bit CPU:AMD® Ryzen 7 2700x eight-core processor × 16 Memory:31.3GB Graphic:Radeon RX 590 Series (polaris10, LLVM 15.0.3, DRM 3.49, 5.15.0-60-generic)

leezer3 commented 1 year ago

The baserenderer.cs changes are definitely not in 1.8.4.4- These were introduced with the merging of the quad tree PR.

I haven't specifically checked Linux in the last few days, but definitely did when merging the quad tree stuff. The log might actually be useful in this case, as this should tell us how far it's got through the loading process.

Will take a look on Linux tomorrow & see if I can reproduce.

ginga81 commented 1 year ago

This is a log of one of choice.

OpenBVE Log: 2023/02/13 18:19:53
Program Version: v1.8.4.4

18:19:53  Using openGL 3.0 (new) renderer
18:19:53  Initialising game window of size 960 x 600
18:19:53  Creating game window with standard context.
18:19:53  Game window initialised successfully.
18:19:54  Renderer initialised successfully.
18:19:54  ...BVE/東北新幹線/Railway : Railway folder found.
18:19:54  INFO: 2 Route loading plugins available.
18:19:54  INFO: 6 Object loading plugins available.
18:19:54  INFO: 2 Sound loading plugins available.
18:19:54  Loading route file: ...東北新幹線/Railway/Route/東北新幹線全線 へのリンク/A0直線デモルート (左側光源).csv
18:19:54  INFO: Route file hash D808A7D2A2EE137A4FF100AAD702C753AB3C68CAC3623B49601EEE44D1B6DD99
18:19:54  Route file format is: CSV
18:19:54  INFO: Using the Japanese compatibility signal set.
18:19:54  Route file loaded successfully.
18:19:54  Loading player train: /home/user/デスクトップ/東北新幹線テスト用/Train/Tec_E2_0_gto
18:19:54  Loading train panel: /home/user/デスクトップ/東北新幹線テスト用/Train/Tec_E2_0_gto/Panel2.cfg
18:19:56  Attempted to create an invalid size element
18:19:57  Attempted to create an invalid size element
18:19:58  Attempted to create an invalid size element
18:19:59  Attempted to create an invalid size element
18:20:00  Attempted to create an invalid size element
18:20:00  Train panel loaded sucessfully.
leezer3 commented 1 year ago

Now that's interesting....

Your breakpoint is in the visibility update thread, which doesn't really show anything as no visibility updates have yet been requested.

What's actually failing is somewhere in the train loading process, somewhere after here by the looks of things: https://github.com/leezer3/OpenBVE/blob/master/source/Plugins/Train.OpenBve/Plugin.cs#L271

It'll either be the extensions.cfg or the sound.cfg failing. I'd strongly suspect that it'll be the sound.cfg, but could be either.

ginga81 commented 1 year ago

fallback to the Radeon RX 590 Series (polaris10, LLVM 15.0.3, DRM 3.49, 5.15.0-60-generic) (0x67df) at Wine,1.8.4.4 resumued to run. But, still can't run at mono.

leezer3 commented 1 year ago

No real answers at the minute I'm afraid. The Debian VM seems to work for me.

Please try something with no external & see if that helps- I know some of your stuff has pretty complex externals.

ginga81 commented 1 year ago

I just updated the graphic board driver normally, but I am confused because I do not understand it well. Because it keeps reading forever even from 1.7.2.4. Maybe the graphics card's latest driver is bad. For the time being, I can play with Wine, so I'd like to update to Ubuntu22.04 at the future. (Actually, I wanted to use it until the end of support in 20.04 because I wanted to operate it stably, but...) After upgrading to 22.04, I will test again and report back, so I may leave it for a while, but I'm sorry.

leezer3 commented 1 year ago

Another thought- Do Object Viewer / Route Viewer work?

ginga81 commented 1 year ago

Yes of course! RouteViewer and ObjectViewer work perfectly. I'd been immersed in the production of the Tohoku Shinkansen and haven't played it recently, so I didn't notice it at all.

leezer3 commented 1 year ago

I'd say its definitely train related then- You might try loading one in Object Viewer and see if that breaks. (As that uses the same plugin to load them)

I'll try and test a bit more on a selection of machines and see if I get anywhere.

jsmetana commented 1 year ago

I just had the same issue, with versions 1.8.4.2 (which ran flawlessly before, but a system update must've broken it) and 1.8.4.4. I suspected it might have something to do with the sound system, and indeed, upgrading my system fixed the issue.

I use Arch Linux and pipewire for the audio system, however, when I installed the previous version of pipewire, OpenBVE worked normally, so it must've been some other package. Here are the packages I just installed (except some that I'm pretty sure have nothing to do with this), if someone's interested.

alsa-card-profiles-1:0.3.66-2  harfbuzz-7.0.1-1  harfbuzz-icu-7.0.1-1
lib32-curl-7.88.1-2 lib32-gst-plugins-base-libs-1.22.0-1
lib32-gstreamer-1.22.0-1  lib32-harfbuzz-7.0.1-1  lib32-libdrm-2.4.115-1
lib32-libldap-2.6.4-1 lib32-libtiff-4.5.0-2  lib32-libx11-1.8.4-1
lib32-mesa-22.3.5-1  lib32-mesa-vdpau-22.3.5-1  lib32-pango-1:1.50.13-1
lib32-vulkan-radeon-22.3.5-1  lib32-zstd-1.5.4-1  libcurl-gnutls-7.88.1-1
libdrm-2.4.115-1  libheif-1.15.1-1 libibus-1.5.28-1  libmad-0.15.1b-10
libmysofa-1.3.1-2  libnm-1.42.0-2 libnotify-0.8.2-1  libtiff-4.5.0-2
libunrar-1:6.2.6-1  liburcu-0.14.0-1  libva-mesa-driver-22.3.5-1
libxmlb-0.3.11-1  mesa-22.3.5-1  mesa-vdpau-22.3.5-1  milou-5.27.1-1
p7zip-1:17.05-1  pango-1:1.50.13-1 unrar-1:6.2.6-1 vulkan-radeon-22.3.5-1
zita-resampler-1.10.1-1  zvbi-0.2.41-1

Of course it could be theoretically something else on your system, or maybe you don't have these updates in your repos, I hope you figure it out. Honestly, I didn't expect a random upgrade to fix this and it's always satisfying when it does.

leezer3 commented 1 year ago

That's interesting.

If accurate, I'd strongly suspect gstreamer to be the culprit from that package list. This is going to be handling most of the audio backend, and fits with it dying about when it starts to try and load the sounds for the train :) As the initial loading screen works as well as the viewers, I think we can (probably) rule out the GL / Radeon drivers.

I'll have another fiddle with some more VMs and see if I can come up with something.

ginga81 commented 1 year ago

I reinstalled 20.04. I also updated the amdgpu driver. but it still didn't run.

I get this message when I run 1.7.2.4 in the terminal. libpng error: invalid after png_start_read_image or png_read_update_info

In 1.9.0.2 libpng error: invalid after png_start_read_image or png_read_update_info libpng error: invalid after png_start_read_image or png_read_update_info libpng error: invalid after png_start_read_image or png_read_update_info libpng error: invalid after png_start_read_image or png_read_update_info Wait for Preview Thread to finish... Preview Thread finished.

was displayed. Any helps this? At Wine, 1.9.0.2 run and works fine. Now, I am using 22.04. At 22.04, OpenBVE is fine.

leezer3 commented 1 year ago

Nothing really interesting in those I'm afraid, it's only complaining about some slightly malformed PNGs.

Just tried 20.04 and 22.04 in a VM, and both seem to work here.

ginga81 commented 1 year ago

I suspect that the latest RADEON drivers are doing something wrong. because it is normal in your VM. I thought that the instructions that can be interpreted by the VM became abnormal as soon as I changed to the latest driver, so I kept reading forever, and I thought that DirectX of 65535 vertexes or more was problem for 1fps. I reinstalled both 20.04 and 22.04, but still 20.04 is Wine only, 22.04 starts but both are 1fps. Everything was working fine until then, so I'm starting to suspect that the RADEON driver is at fault. In 22.04 it is difficult to install the proprietary driver, and in 20.04 it was installed but as I said it doesn't work. https://gigazine.net/gsc_news/en/20201017-amd-radeon-driver-linux-10-percent/ Or it may be that AMD messed with the CPU driver to run Steam games comfortably for Valve. https://gigazine.net/gsc_news/en/20210803-amd-valve-linux/

ginga81 commented 1 year ago

I reinstalled 20.04 and tried booting with the drivers out of the box without installing RADEON's proprietary drivers and it worked fine. Therefore, we identified the cause as RADEON's proprietary driver. In 22.04, when I installed the proprietary driver, I had various troubles such as missing packages and freezes during startup. I decided to change to NVIDIA with an eye on the next 10 years. The board this time is the GeForce RTX 3060 LHR version. Arrive and set to PC, reinstall 22.04, install drivers and test again. I hope this solves the 1fps issue.

ginga81 commented 1 year ago

1fps was not the driver after all. https://bveworldwide.forumotion.com/t2350-some-x-file-s-polygons-are-broken#21565 Eternal loading had a problem with RADEON's latest proprietary driver as of 2023.4, but I think that it was concluded that OpenBVE could not solve it at this time. It's hard for me to decide whether I should leave this issue open or close it because of the warning that using the RADEON proprietary drivers may make it eternal loading. If you don't mind closing it, please close it.