OpenBVE icon indicating copy to clipboard operation
OpenBVE copied to clipboard

At the main menu, train and folder's icon is not display from 1.8.2.0.

Open ginga81 opened this issue 3 years ago • 5 comments

Description

When I run OpenBVE, the train icon and folder icons are not display. 1.8.1.0 Screenshot from 2021-12-23 16-22-09

1.8.2.0 Screenshot from 2021-12-23 16-46-09

And it seems that the train's Detail's Description string is not display.

I checked some daily-builds. OpenBVE-2021-07-16.zip can display icon. But, OpenBVE-2021-07-20.zip do not display any icons. So I think that this issue happen from 2021.7.20.

Reproduction

This issue happens at OpenBVE's main program's. so no need any data.

Route

This issue happens at OpenBVE's main program's. so no need any data.

Train

This issue happens at OpenBVE's main program's. so no need any data.

Logs

This issue is not crash so no output any logs.

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:AMD Radeon RX 590 Series (POLARIS10, DRM 3.40.0, 5.11.0-40-generic, LLVM 12.0.0)

ginga81 avatar Dec 23 '21 07:12 ginga81

I can't reproduce this directly, but have found a similar issue (train details not always updating) Have made a change to sort this- Please see if it helps.

leezer3 avatar Dec 27 '21 21:12 leezer3

At the newest daily build, only train icon is not shown. The another Icons, route and route area's folder icons are display perfect again! At the train's icon has been not displayed. At the 'folder' icon has been displayed. Screenshot from 2022-01-10 03-01-48

ginga81 avatar Dec 27 '21 23:12 ginga81

I checked by monodevelop. At the Ubuntu, I think that from the formMain.cs's line 262, TrainIcon and DiskIcon can't load. ParentIcon and FolderIcon are can load and set to System.Drawing.Bitmap. So, I think that we have to find that why the TrainIcon and DiskIcon can't add to 'listViewTrainPackages.SmallImageList.Images.Add' fails. Screenshot from 2022-05-21 22-00-18

ginga81 avatar May 21 '22 14:05 ginga81

TrainIcon and DiskIcon are loaded from LoadImage method in formMain.cs https://github.com/leezer3/OpenBVE/blob/4f1b51122f285e804d0586366b8ad6e029480637/source/OpenBVE/UserInterface/formMain.cs#L1617

From the code, it would only return null when:

  • The image is not found
  • An exception when loading the image file

You can probably check from there on what the exception is (My best guess is probably some sort of permission error, I can't reproduce anything on my end)

Kenny-Hui avatar Jul 17 '22 12:07 Kenny-Hui

Not likely to be either unfortunately.

Unfortunately Mono's WinForms implementation is basically abandoned at this point, and can be temperamental to say the least. I've never been able to reliably reproduce this or any of the other related glitches that pop up from time to time. It's most likely to be a race condition somewhere internal to the Mono WinForms stack (disk access is a good educated guess) as fiddling with the timing of things has helped in the past.

Will try & repro again, but as this is machine specific, whether anything can be done, dunno :/

leezer3 avatar Jul 17 '22 13:07 leezer3