Chill's patchpack v14_7

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
ChillCore
Tycoon
Tycoon
Posts: 2849
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpack v8

Post by ChillCore »

Kogut wrote: The same assertion.
That is a very wrong assumption you are making there.
Many functions can call the same piece of code.

Take for example the next few lines of pseudocode.

Code: Select all

function_1() {
    x = value;
    function_2();
    function_3();
    DoSomethingElse();
    CheckValue(x);
    return x;
}

function_2() {
    x *= x;
    CheckValue(x);
    return x;
}

function_3() {
    x -= x;
    CheckValue(x);
    return x;
}

function CheckValue(x) {
    y = value_2;
    z = value_3;
    if ((x > y) || (x < z)) {
        assert(x has bad value);
    }
}
Now assume the above asserts.
How can you know in what function it asserted if the only information you have is "x has a bad value"?
You know that x has a bad value but all the rest is guessing.

As an example checking if the tile height is not to high is such a function that is called many times by many different functions.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
jaybud4
Engineer
Engineer
Posts: 116
Joined: 16 Feb 2008 06:13

Re: Chill's patchpack v8

Post by jaybud4 »

Not sure if it has been posted already, but...
Using the win32 binary on the previous page, the game crashes when I try to copy or paste anything.
E: I always start new pages when I say something like "Using the win32 binary above..."
Image
If you're bugged by anything I say/do: Please send me a PM. I don't always watch every thread I post in after I do so.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Chill's patchpack v8

Post by Kogut »

It is likely, copy paste was not used by me. Maybe I found wrong newgrf for copy-paste?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2849
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpack v8

Post by ChillCore »

jaybud4 wrote: Not sure if it has been posted already, but...
Using the win32 binary on the previous page, the game crashes when I try to copy or paste anything.
It is known that sometimes it can crash while doing that. See first post.

Did you get some sort of message or crashlog when it crashed?
What did you try to copy paste?
Have you tried to paste an older template made with another version perhaps?
What is your copy paste delay time setting in advanced settings?
More info please ...

I have not yet played with that feature much so all you can share is bonus for me to reproduce and to try and find out what happens where.

I have tried with the windows binary but it works for me.
Also not everything that you try to copy is pasted. See picture on page 4.

Thank you for reporting.
E: I always start new pages when I say something like "Using the win32 binary above..."
Always is a big word but it happens to me often too. lol.
Usually I do not correct it because if someone sets in his UCP to see more posts per page or see the last post first, "see above" will not be correct but everybody understands anyway.

ps:
In the options window there is a setting for autosaving more often if you do not want to lose too much of what you have already build due to crashes. Smallest interval is one day which is useful if you play with increased daylenght.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
jaybud4
Engineer
Engineer
Posts: 116
Joined: 16 Feb 2008 06:13

Re: Chill's patchpack v8

Post by jaybud4 »

ChillCore wrote:Did you get some sort of message or crashlog when it crashed?
What did you try to copy paste?
What is your copy paste delay time setting in advanced settings?
It crashed on saving a new template, so couldn't be an old template :wink:
cp_paste_speed = 5 (though I don't think it's relevant; the crash is occurring for copying)
I made my standard cloverleaf to make the template, as such.
http://dl.dropbox.com/u/2941534/OTTDCra ... 201976.png
I copy it into the clipboard.
http://dl.dropbox.com/u/2941534/OTTDCra ... 201976.png
I opened the Save Template window.
http://dl.dropbox.com/u/2941534/OTTDCra ... 201976.png
Obviously, I clicked Save. Crash.
...But now that I'm doing it to make this nice log, it didn't crash.
Go figure.
Here's the crash log from before.
If it's helpful.
http://dl.dropbox.com/u/2941534/OTTDCrash/crash.log

E: Just unpaused the game again to build the signals (to see if they're what caused the crash) and it crashed.
Emergency save --
Assertion failed at line 250 of ..\src\ai\ai_core.cpp: c != NULL && c-> ai_instance != NULL
That's probably a different issue, looking at the location.
New crash.log
http://dl.dropbox.com/u/2941534/OTTDCra ... 282%29.log
Image
If you're bugged by anything I say/do: Please send me a PM. I don't always watch every thread I post in after I do so.
User avatar
Muzzly
Traffic Manager
Traffic Manager
Posts: 227
Joined: 09 Jun 2010 20:54
Location: Vilnius, LT

Re: Chill's patchpack v8

Post by Muzzly »

A bit offtopic. Font + train renaming problem was fixed in r20220 ( Remko Bijker (Rubidium) words ).

I have another crash :-) ( in 8th version ).
This time using heightmaps. Take any big heightmap ( e.g. VolcanoX-1.0 ).
Choose map size 512x512 (or smaller ) --> ERROR
Taking map size 1024 x 1024 --> NO ERROR.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2849
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpack v8

Post by ChillCore »

jaybud 4 wrote: It crashed on saving a new template, so couldn't be an old template :wink:
...
and
...
Assertion failed at line 250 of ..\src\ai\ai_core.cpp: c != NULL && c-> ai_instance != NULL
Both happen while saving, exiting with a segmentation fault but they could be unrelated. I think I will have to review the saving code or maybe I forgot to declare something properly somewhere.
Also the copypaste patch, included here, in its current form is somewhat incomplete in some places -> needs more adapting to trunk.
There is another one in the making but I do not know what its currents status is.

Do you still have the savegame that crashed when you unpaused by any chance?

Also you can attach files to the forums if you want, see below editbox when you post a reply. That ensures for them to remain available for as long as the forums are up.
External fileservers might sometimes lose files or disable them after a while.
muzzy wrote: A bit offtopic. Font + train renaming problem was fixed in r20220 ( Remko Bijker (Rubidium) words ).
Yeah that is what happens when you report bugs to people that know what is causing them. :)
But it is good that you reported it first here as you discovered it while playing with the patchpack.
Thank you for doing so.
muzzy wrote: I have another crash :-) ( in 8th version ).
This time using heightmaps. Take any big heightmap ( e.g. VolcanoX-1.0 ).
Choose map size 512x512 (or smaller ) --> ERROR
Taking map size 1024 x 1024 --> NO ERROR.
Known bug in the more height levels patch, see the logfile I linked to a few post back. Maybe I should update the first post with those known bugs also ...
As a general rule, do not try to generate a heightmap bigger than double the size or smaller than half the size of the heightmap picture.
If you try the same in the scenario editor a message will show if you do. While generating a heightmap from the play heightmap menu the message is broken for the moment.


Thank you for the reports both of you.

Edit:
First post updated.
Mention Frostregen as author of the copypaste grf.
I will update the second post also in a while with the authors of the included patches.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
jaybud4
Engineer
Engineer
Posts: 116
Joined: 16 Feb 2008 06:13

Re: Chill's patchpack v8

Post by jaybud4 »

ChillCore wrote: Do you still have the savegame that crashed when you unpaused by any chance?
E2: Well, not replicate it (for your sake) in that it crashes as soon as you try to unpause it.
Because it assertion-fails if I try to save it in that state.
It must be some incompatibility with one of the AIs or GRFs I'm running, as I can't replicate it in a clean game.
Oh, joy...
E3:
http://dl.dropbox.com/u/2941534/OTTDCra ... 201976.sav
Unpause.
Select the cloverleaf with the copy tool.
Pause.
Save template.
Unpause.
Crash.
ChillCore wrote: Also you can attach files to the forums if you want, see below editbox when you post a reply. That ensures for them to remain available for as long as the forums are up.
External fileservers might sometimes lose files or disable them after a while.
That fileserver is directly linked to a physical copy on my computer. It won't be gone for as long as I keep the file around locally.
Besides, this crash is going to be fixed eventually, will the logs from it really be necessary after that? :wink:
Image
If you're bugged by anything I say/do: Please send me a PM. I don't always watch every thread I post in after I do so.
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Chill's patchpack v8

Post by Eddi »

jaybud4 wrote:Besides, this crash is going to be fixed eventually, will the logs from it really be necessary after that? :wink:
yes, a similar bug might reappear in 3 years from now, and one might want to look through old reports...
Moriarty
Tycoon
Tycoon
Posts: 1395
Joined: 12 Jun 2004 00:37
Location: United Kingdom of Great Britain and Northern Ireland
Contact:

Re: Chill's patchpack v8

Post by Moriarty »

You ask for bug reports here, so here they shall be:

a) The "- Measurement tool" has issues. If you click and do NOT drag but just hold the mouse in place, it starts randomly flickering through numbers for manhatten distances and "bird fly distance".
b) The measurement tool also shows the results of the last measurement if you click but don't drag. Surely it should start with NO results.
th the "terrageneis" generator. The arrow works in "original".

Also, maybe I'm being really dense, but how do you enable the moreheightlevels? Because my maps all have the 16 level limit, be they heightmaps (using my own 255 level heightmaps) or terra-genesis maps.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Chill's patchpack v8

Post by Kogut »

Advanced settings + construction
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2849
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpack v8

Post by ChillCore »

Moriarty wrote: You ask for bug reports here, so here they shall be:
Thank you.
a) The "- Measurement tool" has issues. If you click and do NOT drag but just hold the mouse in place, it starts randomly flickering through numbers for manhatten distances and "bird fly distance".
b) The measurement tool also shows the results of the last measurement if you click but don't drag. Surely it should start with NO results.
th the "terrageneis" generator. The arrow works in "original".
I will check if it also happens with only the measurement tools patch.
I did not have to change something in that patch so it probably exists there too.
I will report it if needed.
Also, maybe I'm being really dense, but how do you enable the moreheightlevels? Because my maps all have the 16 level limit, be they heightmaps (using my own 255 level heightmaps) or terra-genesis maps.
Advanced settings -> construction -> first entry
The patch is disabled by default.

Edit: Kogut was faster :)
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Chill's patchpack v8

Post by Kogut »

There is problem with rating colour in town name.
Also all towns without rating have red names.
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (173.12 KiB) Viewed 2815 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
Muzzly
Traffic Manager
Traffic Manager
Posts: 227
Joined: 09 Jun 2010 20:54
Location: Vilnius, LT

Re: Chill's patchpack v8

Post by Muzzly »

Hello Tycoons

One feature is not working in 8th version anymore.
Load some GRFs with new stations.
Open build station menu.
In 7th version by clicking right mouse button on station icon, yellow hint text with station name show up. In 8th version this yellow text does not appear anymore :-(

Question for Kogut
In the image above I see that city Prasov requires goods to grow.
How did you do that ?(
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Chill's patchpack v8

Post by Kogut »

muzzy wrote:Question for Kogut
In the image above I see that city Prasov requires goods to grow.
How did you do that ?(
I patched Chill's patchpack with my own patch adding improved towngroth requirements. After testing and adding support for other climates it will be published.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
thetzar
Engineer
Engineer
Posts: 28
Joined: 05 Dec 2004 22:06

Re: Chill's patchpack v8

Post by thetzar »

I think this is the measurement tool's fault:
Pressing the hotkey R now selects the tool, instead of 'remove' (rail,station, etc). This is really annoying.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2849
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpack v8

Post by ChillCore »

thetzar wrote: I think this is the measurement tool's fault:
Pressing the hotkey R now selects the tool, instead of 'remove' (rail,station, etc). This is really annoying.
Quite correct. I will change it to something else.
You can overide it in the hotkeys.cfg file for now.
While going through the file I noticed that R is also used for rocky in terraform editor, hmm.
Do you have a suggestion to what I should change it? CTRL+R is used for refresh screen ...



Here is a little update to what has been done already.

Updated:
-------
- Diesel smoke updated to v3_1. Will be back in the next version.
- Panorama screenshot updated to v3. Extended with console command.

Fixed:
-----
- Sometimes the refit options can not be selected until the gui is resized. (Kogut)
- Crash when removing the wagons from an engine in the depot while the refit window was open.
- Right click on a station tile in the improved build station gui to show the tooltip did not work properly. (Muzzy)

Todo:
----
- Hover over instead of right-click a station tile in the improved build station gui, for the "old" station tiles it works allready.

Not yet fixed:
-------------
- Sometimes copypaste crashes.
I can reproduce it using the savegame and the instruction provided by jaybud4.
Unfortunately my debug build does not give much useful information so it will not be so easy to fix ...

Not sure if the bug comes from my patch:
------------------------------------------
- There is problem with rating colour in town name. Also all towns without rating have red names.(Kogut)
I have tested some savegames and it seems to work correctly. Anybody else seeing this?

Reported:
--------
- Refit gui crash while removing wagons(me) and refit refusal under certain conditions with the split_refit patch.(Kogut)
- Measurement tools inconsistencies(Moriarty). R shortcut is already used for removal tool.(thetzar)(Will do before turning of the computer)


Thank you all for the many feedback.
It allows me to present v8_5 very soon.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Chill's patchpack v8

Post by Kogut »

So it may be conflict with my patch. I thought that it is impossible. Sorry.
Not sure if the bug comes from my patch:
------------------------------------------
- There is problem with rating colour in town name. Also all towns without rating have red names.(Kogut)
I have tested some savegames and it seems to work correctly. Anybody else seeing this?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
Hamilton2007
Transport Coordinator
Transport Coordinator
Posts: 289
Joined: 16 Nov 2008 10:57
Location: Belgium

Re: Chill's patchpack v8

Post by Hamilton2007 »

Is this patch compatible with 32bit tars? Cause i added the tars to the data folder, changed the openttd.cfg, but only the tools are changed, no graphics or so???
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2849
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpack v8

Post by ChillCore »

Kogut wrote: So it may be conflict with my patch. I thought that it is impossible. Sorry.
It could be as the patch you added refuses to grow if food and goods are not sufficiently suplied.
Maybe the towns are made unhappy because of that. I would not know how to prevent them from growing otherwise.
I only had a brief looksie through the code of that patch so I will not pretend to know how it functions.

It can also be an overflow caused by the daylengh patch, but then the town label and the town info window should correspond.
That is why I asked if someone else, with a patch that is not extended, was seeing this.
What is your daylenght setting?
Hamilton2007 wrote: Is this patch compatible with 32bit tars? Cause i added the tars to the data folder, changed the openttd.cfg, but only the tools are changed, no graphics or so???
It works for me.
Depending on which tars you are using you may need to change your setting to the original graphics and or download and activate the extra "32bppExtra NewGRF" available from ingame download content.
If you need further help, I will need to know from where you got the tars.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 21 guests