The International Simutrans Forum

 

Author Topic: Bug: Something trash image is mixed in "High Voltage transmission line bridge"  (Read 737 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran jp

  • *
  • Posts: 233
  • Languages: ja
"High Voltage transmission line bridge" always mixes strange image.

For example, you can see this in demo.sve of pak128.Britain at coordinates(433, 15).
This occurs not only in pak128.Britain but in other pakset.
In most case, the trash is something like GUI parts. (Checkbox or left corner parts?)

(Image1) - square boxes mixed in


(Image2) - when zooming out


In particular this small square trash is very noticeable when zooming out because it does not become small.

Occasionally, another strange images may appear under the transmission line bridge, such like a bulldozer, train, ship, illegal building, bridge pillar, and so on.
Even if you rotate the map, vehicles in the same direction will be displayed as they are and never move.
These will change every time you start the game even in the same place. For example, (Image1) and (Image4) are in the same place.

(Image3) - bridge pillar mixed in


(Image4) - same place as (Image1)


(Image5) - illigal train and ship are enshrined


(´・ω・`)
EDIT: Resubmit expired images
« Last Edit: September 10, 2018, 09:29:02 AM by Ranran »

Offline Matthew

  • *
  • Posts: 99
  • Languages: EN, some ZH, DE & SQ
I also see the same misplaced images, both in demo.sve and in my own savegame. I am using the nightly from two days ago on Windows 7, if that helps.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18038
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
I have seen this before, but I have never tracked down the cause of this: I cannot find anything untoward in the image itself, and I do not have any idea how the graphics code works, as virtually nothing in the graphics code is changed from Standard in Extended.

If anyone has any idea what sort of problem that this might be (can this be reproduced in Standard with the Standard version of Pak128.Britain?), this would be most helpful.

Edit: I should note that I have seen the white(ish) squares before, but not the vehicles, which is odd.

Offline Ranran jp

  • *
  • Posts: 233
  • Languages: ja
I checked this error occurs in other paksets.

(It may work if you repaked by yourself with its makeobj.)

As far as I saw, it occurs only with "High Voltage transmission line bridge", any pakset in Extended.
In my case, I could not confirm this error in Standard. (128.Britain too)

This is the case of pak.nippon. (Although pak.nippon is for standard)

pak.nippon has some kinds of "High Voltage transmission line bridge", and this error occurs all of those.
That is just a wilderness, so all building things are illegal. And "ShoreTrans" is mixed in there, but this is a bad case. Mostly square whitish boxes, in my case.
Normally "ShoreTrans" does not appear on the game screen as it is. I certainly think it's quite odd. ???
EDIT: Resubmit expired images
« Last Edit: September 10, 2018, 09:31:42 AM by Ranran »

Offline Junna

  • Devotee
  • *
  • Posts: 1081
I've only seen it in the form of the vehicles, and it goes back at least to around the time when the new way wear concept was introduced, if not longer, which was years ago.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4530
  • Languages: EN, DE, AT
This looks like an uninitialized image variable (in the tile grund_t, the bridge bruecke_t, or the powerline leitng_t objects).

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18038
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Thank you both for your help - that is most useful. I have tested using Dr. Memory, but I cannot find any uninitialised variables when power line bridges (with this bug) are displayed, so this does not seem to be the issue.

However, by uninitialised, do you perhaps mean not that the memory is actually uninitialised in a way that Dr. Memory could find, but that it has a wrongly initialised default value?

Offline Ranran jp

  • *
  • Posts: 233
  • Languages: ja
I changed the current code by just one line like this. Then the drawing bug of power line bridge disappeared. And the drawing of has_own_way_graphics(railway bridges and road bridges) seems to be the same as before.
I think that this part is the cause of power line bridge drawing bug.
I am not familiar with C++ so I am not sure if this change is correct as a whole.

James - Can you see the effect and countermeasures from this change?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2554
  • Languages: EN
Can you provide a demo map (with any non-standard pakset files) with annotations showing where the issues are visible? Such map would be useful to debug the problem.

Offline Ranran jp

  • *
  • Posts: 233
  • Languages: ja
Can you provide a demo map (with any non-standard pakset files) with annotations showing where the issues are visible? Such map would be useful to debug the problem.
Is this a problem with demo.sve?
I check this place in demo.sve every time.
« Last Edit: September 12, 2018, 12:28:17 PM by Ranran »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18038
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
I cannot reproduce that with my version, I am afraid.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2554
  • Languages: EN
This seems to be compiler specific behaviour...

Looks perfect on my self built MSVC debug (SDL2, GDI sound).
https://www.dropbox.com/s/3gs81ymbus26y6q/simscr00.bmp?dl=0

However it looks exactly like the image you provided when using the automatically GCC built optimized nightly.

Those white squares are absolute in size. They do not get smaller when zooming out or larger when zooming in.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18038
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Very odd. This looks on the face of it to be likely to be a bug in low level graphics code (possibly from Standard) about which I have very little understanding.