The International Simutrans Forum

 

Author Topic: BUG in r2044 - ground.outside not working properly  (Read 6661 times)

0 Members and 1 Guest are viewing this topic.

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
BUG in r2044 - ground.outside not working properly
« on: September 30, 2008, 11:52:08 AM »
ST r2044 (Win-SDL), beyond the edges of the map, there are now incorrect graphics shown (no longer the one defined in ground.outside.pak). Happens both in pak64 and pak128 (worked fine in r2040).

r2044:


r2040:


EDIT: My guess: maybe connected to the changes from 2041?
« Last Edit: September 30, 2008, 12:27:04 PM by DirrrtyDirk »

Offline isidoro

  • Devotee
  • *
  • Posts: 1142
Re: BUG in r2044 - ground.outside not working properly
« Reply #1 on: October 01, 2008, 01:18:22 AM »
The same happens in Linux/gcc.  The image is a ship instead of a piece of railway.  In r2045 seems corrected.  But, in r2044 trains and ships throw pedestrians with the smoke.  Smoke disappears and pedestrians remain until you move the image with cursors keys.  The bug remains in r2045.


Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: BUG in r2044 - ground.outside not working properly
« Reply #2 on: October 01, 2008, 07:03:25 AM »
These bugs are really what one expects to be a bug :) Trains throwing people into air, seas covered in junk...

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: BUG in r2044 - ground.outside not working properly
« Reply #3 on: October 02, 2008, 11:42:09 AM »
Appears to be solved in 2052 (the ground.outside problem definitely is, and steam looks ok for me, too)

Thx, prissi!

Offline isidoro

  • Devotee
  • *
  • Posts: 1142
Re: BUG in r2044 - ground.outside not working properly
« Reply #4 on: October 02, 2008, 10:02:31 PM »
In linux/gcc, in r2054, the problem with the smoke is still there.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10905
  • Languages: De,EN,JP
Re: BUG in r2044 - ground.outside not working properly
« Reply #5 on: October 03, 2008, 12:35:46 PM »
Which pakset?

Offline isidoro

  • Devotee
  • *
  • Posts: 1142
Re: BUG in r2044 - ground.outside not working properly
« Reply #6 on: October 03, 2008, 10:12:53 PM »
pak64.  I've tried with the nightly (102) and it also fails.
 

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10905
  • Languages: De,EN,JP
Re: BUG in r2044 - ground.outside not working properly
« Reply #7 on: October 04, 2008, 05:52:01 PM »
which pak64 does not matter, the only change was than double images were internally pointed to the same image.

Offline isidoro

  • Devotee
  • *
  • Posts: 1142
Re: BUG in r2044 - ground.outside not working properly
« Reply #8 on: October 04, 2008, 07:23:33 PM »
Any clue about where to look to try to debug it?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10905
  • Languages: De,EN,JP
Re: BUG in r2044 - ground.outside not working properly
« Reply #9 on: October 04, 2008, 07:31:00 PM »
image_reader.cc the last if( len!=0 ) block.
To register all images, just register_image( besch ); would be ok. The additional humbomumbo is to find out doubles.

Offline isidoro

  • Devotee
  • *
  • Posts: 1142
Re: BUG in r2044 - ground.outside not working properly
« Reply #10 on: October 04, 2008, 09:23:36 PM »
I've tried with pak.german and the problem is again with smoke exhausted by vehicles, not factories.  This time, train carriages are exhausted instead of pedestrians...  Maybe it can have anything to do with the smoke routine expecting the images to be one after the other?  I'm just guessing.  It's strange that in two different paks the problem is with exhausted smoke...

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: BUG in r2044 - ground.outside not working properly
« Reply #11 on: October 05, 2008, 05:05:00 AM »
It seems to be shown different image for each person.
In my case, there are extra cloud. (tested with german.pak)

Offline isidoro

  • Devotee
  • *
  • Posts: 1142
Re: BUG in r2044 - ground.outside not working properly
« Reply #12 on: October 05, 2008, 05:44:36 PM »
Very nice screen shot, z9999.

About this topic: this is the most strange bug I've seen in a long time.  I have two computers: a desktop and an laptop.  Both have Kubuntu Linux.  I've compiled r2056 in both.  I've run the same pak64 files and the same savegame in both and the laptop persists in the graphic glitches, while the desktop renders smoke graphics Ok...  :o

If I comment out the lines pointed by Prissi, it works well in both computers.  The file involved is smoke.Steam.pak, whose image content is substituted by some other.

Time to call Mulder and Scully?   ::)

Offline isidoro

  • Devotee
  • *
  • Posts: 1142
Re: BUG in r2044 - ground.outside not working properly
« Reply #13 on: October 07, 2008, 02:15:43 AM »
I can't help killing software bugs  :police:

That's a real problem I have to talk about with my psychologist...  Finally, I found the reason of those strange smoke spectra in some computers and paks.  It goes like this:

In pak64 there are four smoke files, the number of frame images in brackets:
  • smoke.Industry_Smoke.pak (1)
  • smoke.Diesel.pak (5)
  • smoke.Industry_Fire.pak (2)
  • smoke.Steam.pak (5)

It happens that:
  • The first image of Steam.pak is the same as the only image of Industry_Smoke
  • Images of vehicle smokes must get consecutive image numbers as can be seen in wolke_t:gib_bild()
  • The order in which pak files are read is system dependent
  • The improvement made in last releases doesn't assign a new image number if there's an equal image read before (in such a case, the number of the previous image is reused)

In one computer, the order in which files were read was: Industry_Smoke, Diesel, Industry_Fire, Steam.  Steam reused only the fist image of Industry_Smoke and therefore "threw pedestrians" (or can throw whatever image happens to be next).

In other computer, the order is different: Steam,Diesel,Smoke,Fire and there is no problem because Steam has all its images with consecutive numbers and Smoke reuses its only image.

A solution may be to inhibit number reusing when reading smoke files or other animations expecting their images to be consecutive.

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: BUG in r2044 - ground.outside not working properly
« Reply #14 on: October 07, 2008, 10:00:31 AM »
Edit: bleh this should have been an icon, not advertisement. Sorry.
« Last Edit: October 11, 2008, 08:25:21 PM by VS »

Offline isidoro

  • Devotee
  • *
  • Posts: 1142
Re: BUG in r2044 - ground.outside not working properly
« Reply #15 on: October 08, 2008, 01:30:50 AM »
Here's a patch for r2056.  I don't know if the solution is optimal, though...

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10905
  • Languages: De,EN,JP
Re: BUG in r2044 - ground.outside not working properly
« Reply #16 on: October 11, 2008, 08:10:48 PM »
Well, unfourtunately the clean (and better way) is much longer ...

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: BUG in r2044 - ground.outside not working properly
« Reply #17 on: October 11, 2008, 08:26:29 PM »
The quickest solution is adding one different pixel to one of the smokes. Just like renaming files to be loaded in some order etc. :p

Offline isidoro

  • Devotee
  • *
  • Posts: 1142
Re: BUG in r2044 - ground.outside not working properly
« Reply #18 on: October 11, 2008, 11:02:50 PM »
The quickest solution is adding one different pixel to one of the smokes. Just like renaming files to be loaded in some order etc. :p

That's for sure...    :D

Well, unfourtunately the clean (and better way) is much longer ...

I've seen it in r2060.  I've tried it and it works, but there has to be a minor error since now the last image doesn't disappear.  Perhaps the image is not marked dirty or something like that?  When moving the scene, they disappear.