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: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpak v5_1

Post by ChillCore »

Thank you for the build ColdIce and for the compiler output.

Those warnings in the copypaste files are the same as before, I think Bilbo is having a look at them.
This is a new one for me:

Code: Select all

4>..\src\newgrf_debug_gui.cpp(627) : warning C4018: '<' : signed/unsigned mismatch
As usual I did not get that warning ...
Would you mind trying to compile a clean build to see if that warning is in trunk or if it is there because of a patch.
Thank you in advance.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.
User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 306
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: Chill's patchpak v5_1

Post by ColdIce »

you`re right.. the problem is in trunk

clean r19736, I still get this

4>network_chat_gui.cpp
4>..\src\newgrf_debug_gui.cpp(627) : warning C4018: '<' : signed/unsigned mismatch
4>music_gui.cpp

build log
http://www.heypasteit.com/clip/JES
The rest is confetti!
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpak v5_1

Post by ChillCore »

That was fast. :)
Thank you for the effort.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.
wtfspiff
Engineer
Engineer
Posts: 8
Joined: 15 May 2009 18:29

Re: Chill's patchpak v5_1

Post by wtfspiff »

Thanks a lot ColdIce :bow: and Chill! :bow:
deamonhunter11
Engineer
Engineer
Posts: 56
Joined: 10 Mar 2010 08:23

Re: Chill's patchpak v5_1

Post by deamonhunter11 »

Great patch, Chill.

The only problem is that there is a problem with saving and loading templates.

Below image is not the error. Just me and the copy and paste.
Attachments
me, trying out the copy and paste
me, trying out the copy and paste
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpak v5_1

Post by ChillCore »

ColdIce wrote: you`re right.. the problem is in trunk

clean r19736, I still get this
The warning should be gone in 19738.
Thank you Rubidium.
wtfspiff wrote: Thanks a lot ColdIce :bow: and Chill! :bow:
Enjoy.
deamonhunter11 wrote: The only problem is that there is a problem with saving and loading templates.

Below image is not the error. Just me and the copy and paste.
Sometimes it works sometimes it doesn't. I do not yet know what triggers the failing on pasting the loaded template.
If I keep the template rather small it seems to work.

There are a few more problems ...
- My stations are not copypasted.(Waypoints was a known issue.)
- When using NuTracks the pasted rail is converted to the type that is currently selected.
- Waterfeatures were not copypasted the last time I tried.

But I have not yet tested everything with the latest version and I do have quite some grfs installed.
To be continued ...
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.
deamonhunter11
Engineer
Engineer
Posts: 56
Joined: 10 Mar 2010 08:23

Re: Chill's patchpak v5_1

Post by deamonhunter11 »

I have hardly any newgrfs turned on as I have got a new computer. Does the same problem come up when the copy and paste patch is by itself?

Just seeing if it happens with my version.
deamonhunter11
Engineer
Engineer
Posts: 56
Joined: 10 Mar 2010 08:23

Re: Chill's patchpak v5_1

Post by deamonhunter11 »

I think it is your patch pack. As the only way I could recreate it is if I deleted a template and immeadiately saved another.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpak v5_1

Post by ChillCore »

It is the same for the clean copypaste patch. I have tested with no newgrf.

I can save and load templates just fine.
It is just that when you paste track the track gets converted to the tracktype you have selected.
So if you copy electrified track and monorail, then select maglev and paste all track pasted will be maglev.

I have attached a screenshot I made a while ago when I bumped the copypaste patch and fixed the save/load and open gui buttons.
There are still some things to fix.

Note: The screenshot was not while saving and loading templates.
Attachments
Dutbridge Transport, 1950-12-15.png
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.
nighthawk_c_m
Engineer
Engineer
Posts: 26
Joined: 14 Apr 2010 06:26

Re: Chill's patchpak v5_1

Post by nighthawk_c_m »

Ok, I am having a crash of the game for a yet unknow reason - I was able to narrow it down during gameplay to be around the topic of waypoints. After retrying my game several times it always happened when a train passed by a waypoint - problematic is that the waypoint setup works for several minutes before the game crashes, some waypoints even exist since the beginning of the game.

Please message me what you need in terms of logs /saves - oh and I use quite a few newgrf's.
peebee
Engineer
Engineer
Posts: 31
Joined: 08 Feb 2008 13:02

Re: Chill's patchpak v5_1

Post by peebee »

There is a problem with waypoints and auto seperation in the last build. If the schedule contains a waypiont trains will no longer be seperated. I think that I've read about this problem in another thread.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpak v5_1

Post by ChillCore »

nighthawk_c_m wrote: Ok, I am having a crash of the game for a yet unknow reason ...
Ouch ... Do not use waypoints ...
I kid, I kid. :)

I need the crash log for sure.
A savegame with a setup that crashes always in the same way could be helpful too.
Also I need to know exactly what version you are playing with if you want me to be able to load your savegame.

V6_1 (with a few more patches) that I am testing for the moment crashes too sometimes. I could not pinpoint the error until now as it seems to crash at a different moment each time. That is why I have not posted it yet ...
Sometimes my savegame keeps on running when I reload it. Also I did not use waypoints in my game so the problem could be somewhere else or be a different issue.
peebee wrote: There is a problem with waypoints and auto seperation in the last build. If the schedule contains a waypiont trains will no longer be seperated. I think that I've read about this problem in another thread.
Thank you for the information. I will have to do some reading ...
I have not been reading as much as before lately as I had some family business to attend ...

Waypoints are stations where trains can not stop. They should be ignored as far as seperating trains goes. Maybe that is the problem.
My crashes I mentioned to nighthawk_c_m seem to involve depots. It could be related. Trains that are stopped in depots are taken out of the seperation list. In my game breakdowns are disabled but not the "do not service if breakdowns are disabled" option. I will try and see what happens if I do.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.
nighthawk_c_m
Engineer
Engineer
Posts: 26
Joined: 14 Apr 2010 06:26

Re: Chill's patchpak v5_1

Post by nighthawk_c_m »

I had no problems so far with taking a train out of a "automated" group and have it rest in the depot for a while. I will try to reproduce the error, sadly I have no working savegame right before the crash.

The crash screenshot shows me a train arriving at a waypoint - thus I narrowed it down to the waypoints - this train however is not part of a automated group of trains as it is the only one servicing a sideline.

I use the most recent version of your patchpack - its OenTTD r19733M.

I took another look - taking away all automate orders - it is only one specific train of the DB-SetXL that causes the game crash - I will try it with a unpatched actual game nightly to see if it happens there too.
Attachments
crash.txt
(12.3 KiB) Downloaded 158 times
crash.sav
(3.97 MiB) Downloaded 179 times
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpak v5_1

Post by ChillCore »

The crash savegame is not very helpful as it crashes as soon as I unpause.
I am still missing a few grf's.

The crashlog sais Exception: C0000005


Are you running the patchpak under linux and wine or under windows?
I had that exception some time ago and when I looked it up I blamed it on wine.
I do not remember if it was with this patchpak or if it was with the moreheightlevels patch ...

A little quote from this page. http://blogs.msdn.com/calvin_hsia/archi ... 70344.aspx
Calvin Hsia's WebLog wrote: This is called a Buffer Overrun error. If the memory accessed beyond the string is not allocated to the process, then a C0000005 exception (Access Violation) will result. If this exception is unhandled by the process, then the ‘unhandled exception handler” of the OS will be invoked. This is typically Dr. Watson. (However, the memory may be legitimately accessed, but may be overwritten by a virus that takes advantage of a buffer overrun on a strcpy Standard Library function).

In the old days of Win3.11, there was no memory protection enforcement: Accessing any memory in the process address space was fair game. strlen would just cruise merrily through the process memory, even through non-owned memory, until it found a null byte. Thus, old code may run fine on old OS’s, but when run on a new OS, it might crash.

The C Standard Library (also known as the runtime library) is not part of the C language, but it is assumed by all C development environments (particularly the linker) to be available. Microsoft’s versions have “MSVCRT” in their names. When the string functions were defined, the strings were assumed to be character arrays with a terminating null byte. This implies possible buffer overruns, as well as that no strings can have embedded nulls (like binary data).

The C++ language has just as much accessibility to the C Standard library, although string classes and objects can be used. Thus buffer overruns are still around. Most processes that run on your computer today are primarily written in C or C++.

Using managed code in .NET, a string is an object that has a length property. No null terminating byte is assumed.

What are the consequences of a crash? If it occurs in a User mode application, then that process is no longer running, but all other running processes on the machine are still valid. If it occurs in a kernel mode application, such as a device driver, all bets are off because the erroneous code had much higher access rights to the machine than a user mode program.

Except for video driver crashes, I haven’t rebooted my machines in years due to a crash.

Most of the security bulletins and Windows Updates are due to buffer overruns. If the standard library had been defined to pass in a maximum length parameter along with every string buffer, many of these security patches would never exist.

Published Wednesday, June 30, 2004 4:36 PM by Calvin_Hsia
Filed under: Programming, C++, Windows API, Debugging
Wednesday, June 30, 2004 11:51 PM by josh wrote: std::string doesn't use a terminating nul, unless you're converting it from/to a C string. But you can't really pass std::strings between binaries compiled with different compilers, or even linked against different instances of the runtime library.
Monday, May 03, 2010 5:09 PM by Jeff wrote: I just got it will a null pointer exception. Add to your code a check if your input is null.
So according to Jeff, checking for a null pointer somewhere will solve it.
There is a million other pages with the same error message ...

There have been some changes in the code not so long ago (r19654 and a few other) that I may not have applied everywhere in the code in the patch.
This may take me some time to check ...
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Chill's patchpak v5_1

Post by Rubidium »

C0000005 is "just" what is called segmentation fault in Unices.

There is (or was) a small tool somewhere on the Microsoft website that could give you a function name (or file name) and line number given the executable and the crash location 004DD9F2. For anything more useful than that you need the .pdb from the compilation and the .dmp from the crash and load those in MSVC. That will usually give you a stack trace.
nighthawk_c_m
Engineer
Engineer
Posts: 26
Joined: 14 Apr 2010 06:26

Re: Chill's patchpak v5_1

Post by nighthawk_c_m »

Here is a savegame paused shortly before the crash occurs
Attachments
Hahnberg Transport, 22. Mai 1946.sav
(3.96 MiB) Downloaded 173 times
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpak v5_1

Post by ChillCore »

Rubidium wrote: C0000005 is "just" what is called segmentation fault in Unices.

There is (or was) a small tool somewhere on the Microsoft website that could give you a function name (or file name) and line number given the executable and the crash location 004DD9F2. For anything more useful than that you need the .pdb from the compilation and the .dmp from the crash and load those in MSVC. That will usually give you a stack trace.
Thank you for the link and the explanation Rubidium.
I will have a looksie on the microsoft site to see if I can find the tool.
nighthawk_c_m wrote: Here is a savegame paused shortly before the crash occurs
That savegame is better nighthawk_c_m.
If I stop the train it does not crash until I restart the train and it arrives at the waypoint.
I have also loaded your savegame in my v6_1_r19763 version and it crashes in the same place.
However my crashlog seems to be a bit more readable. I have attached it in case somebody, who understands better then me what is in there, wants to have a look ...
Attachments
crash_ubuntu.txt
(8.15 KiB) Downloaded 171 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.
User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 306
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: Chill's patchpak v5_1

Post by ColdIce »

hy Chillcore

any chance for an update? :D
The rest is confetti!
ReisRyos
Engineer
Engineer
Posts: 11
Joined: 27 Apr 2010 08:50

Re: Chill's patchpak v5_1

Post by ReisRyos »

yes. please update :)
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Chill's patchpak v5_1

Post by ChillCore »

New patch.
Trunk has bumped so there is no compatibility with previous versions.
There is nothing I can do about this so finish your games before upgrading.

Added:
- Split refit r19699.
- Buy bigger area r18518.
- Vehicles in tunnels viewable and clickable. Patch by SmatZ that I have found on the coopserver.

Updated:
- Progsigs to r19677.
- Moreheightlevels to v25_06_r19815.
- Cargodist to r19815.

New shortcut
- CTRL + SHIFT + C opens the cheat gui.
CTRL + ALT + C was not working on my pc and CTRL + ALT + WINDOWS + C neither. I have not removed the old shortcut, only added another one.

Retuned:
- Larger map patch:
By request maximum mapsize is now 8192 * 8192 tiles. This means that if one side is 32768 the other can be maximal 2048. (Until the previous version it was 32768 * 128 )
Be warned though. I have 1024 MB memory and when I try to generate a map of size 8192 * 8192 my game crashes because of not having sufficient memory.
Also big maps cause a serious performance hit on the system even before you have build your first vehicle.

Todo:
Change the vehicle in tunnels patch so that it does not show the vehicles in tunnels in the main menu but only ingame.
Update second post.


EDIT:
I have forgotten to include a line in smallmap_gui.cpp. Please read the post on the next page to know how to solve it before compiling. (Link below.)
http://www.tt-forums.net/viewtopic.php? ... 2&start=86
For the people that can not compile themselves:
- Please grab the previous posted binary or grab this one and do not open the cargo-links view in the smallmap if the moreheightlevels patch is enabled. (your game will crash)
In the next version this specific crash will be fixed.

Edit2:
ColdIce has removed the buggy binary. (Thank you ColdIce)
!!! The bug is still in the patch attached to this post !!!
I can not remove it because of the liscence but instead of the previous binary, you may want to grab the next. See next page or later. There is a link to the latest compiled binary in the second post.
Attachments
chipp_v6_2_r19815.diff
(980.74 KiB) Downloaded 166 times
Last edited by ChillCore on 23 May 2010 20:50, edited 3 times in total.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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: Bing [Bot] and 39 guests