The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: DirrrtyDirk on September 30, 2008, 11:52:08 AM

Title: BUG in r2044 - ground.outside not working properly
Post by: DirrrtyDirk 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:
(http://www.simutrans-germany.com/files/upload/2044.jpg)

r2040:
(http://www.simutrans-germany.com/files/upload/2040.jpg)

EDIT: My guess: maybe connected to the changes from 2041?
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: isidoro 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.

Title: Re: BUG in r2044 - ground.outside not working properly
Post by: VS 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...
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: DirrrtyDirk 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!
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: isidoro on October 02, 2008, 10:02:31 PM
In linux/gcc, in r2054, the problem with the smoke is still there.
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: prissi on October 03, 2008, 12:35:46 PM
Which pakset?
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: isidoro on October 03, 2008, 10:12:53 PM
pak64.  I've tried with the nightly (102) and it also fails.
 
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: prissi 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.
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: isidoro on October 04, 2008, 07:23:33 PM
Any clue about where to look to try to debug it?
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: prissi 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.
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: isidoro 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...
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: z9999 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)
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: isidoro 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?   ::)
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: isidoro 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:

It happens that:

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.
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: VS on October 07, 2008, 10:00:31 AM
Edit: bleh this should have been an icon, not advertisement. Sorry.
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: isidoro on October 08, 2008, 01:30:50 AM
Here's a patch for r2056.  I don't know if the solution is optimal, though...
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: prissi on October 11, 2008, 08:10:48 PM
Well, unfourtunately the clean (and better way) is much longer ...
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: VS 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
Title: Re: BUG in r2044 - ground.outside not working properly
Post by: isidoro 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.