roest's patch pack v9 (r13019)

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
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: yet another...err...my patch pack (r12930)

Post by Roest »

Might be a compiler issue. Try buildottd which uses mingw if i remember right.
Gollum
Engineer
Engineer
Posts: 16
Joined: 24 Apr 2008 13:26

Re: yet another...err...my patch pack (r12930)

Post by Gollum »

i'll try but that's not good for me, since i modify the code a lot and compile-recompile-debug it in MSVS
User avatar
Toni Babelony
Tycoon
Tycoon
Posts: 1389
Joined: 07 Jul 2006 09:34
Skype: toni_babelony
Location: Sagamihara-shi, Japan
Contact:

Re: yet another...err...my patch pack (r12930)

Post by Toni Babelony »

Dear lord... This is just too much. OTTD has entered another level for me now. Combining all these great features and great trainsets together, it's just too friggin' much! :bow:
Retired JapanSet developer and creator of TIAS.
Draakon
Director
Director
Posts: 542
Joined: 11 Mar 2007 16:50

Re: yet another...err...my patch pack (r12930)

Post by Draakon »

An update, good, now the engine pool is in. :)
Gollum
Engineer
Engineer
Posts: 16
Joined: 24 Apr 2008 13:26

Re: yet another...err...my patch pack (r12930)

Post by Gollum »

Got inside of it. Memory problem. I have no idea how in hell it works for you.....

Code: Select all

std::list<RouteDisplayInfo> stack;
		stack.push_back(RouteDisplayInfo(src, INVALID_ORDER, 0, 0, 0, 0));

		const int max_trial = 1024;
		for (int trial_count = max_trial; trial_count >= 0 && ! stack.empty(); trial_count--) {
			const std::list<RouteDisplayInfo>::iterator it = stack.begin();
			const RouteDisplayInfo &m = *it;
			stack.erase(it);

			if (m.station_id == INVALID_STATION) { // destination

stack (std::list) is defined.
One element is added to it.
Then we get inside of the loop. iterator is created pointing to the beginning of the list (on that only element in it).
Then we create a const reference to the value of iterator, thus m is a variable which is a copy of variable (*it). m is a reference to *it, which means m is not a copy of that value, it simply is another variable associated with the same thing in memory.
And then. We erase that thing in memory by calling stack.erase(it). m now points to garbage. Which is referenced in the next if statement and even more further.
User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: yet another...err...my patch pack (r12930)

Post by Roest »

I never looked deep into it. I'm on the verge of starting my own paxdest project. This patch is too big and too old to ever get it fixed for multiplayer stability.
Gollum
Engineer
Engineer
Posts: 16
Joined: 24 Apr 2008 13:26

Re: yet another...err...my patch pack (r12930)

Post by Gollum »

well, anyway, if you're going to write anything like that - you'd better prepare for this kind of stuff :))
Gollum
Engineer
Engineer
Posts: 16
Joined: 24 Apr 2008 13:26

Re: yet another...err...my patch pack (r12930)

Post by Gollum »

yep... the whole code is kinda buggy. don't want to play with these destinations anymore :)
User avatar
Two5Kid
Chief Executive
Chief Executive
Posts: 654
Joined: 26 Feb 2007 07:10
Location: Kota Bharu, Malaysia

Re: yet another...err...my patch pack (r12930)

Post by Two5Kid »

Erm, anyone could help out? Daylength + r12930 and above. No need PaxDest if it's too much of a hassle. Daylength is very important. Haha! Starting a new game.

Edit: Oops! What I meant was Roest's Patchpack + Daylength +/- PaxDest.

@Philosophus: Really? I downloaded the one on page 3, it didn't have daylength although it did have PaxDest. Maybe you're referring to the one on page 1. Will give it a go. My bad. Haha!

Edit again: Erm, nope. The one on Page 1 doesn't have daylength either.
Last edited by Two5Kid on 02 May 2008 06:14, edited 2 times in total.
Any dream worth having,
Is a dream worth fighting for!
PhilSophus
Chairman
Chairman
Posts: 776
Joined: 20 Jan 2007 12:08
Location: Germany

Re: yet another...err...my patch pack (r12930)

Post by PhilSophus »

Two5Kid wrote:Erm, anyone could help out? Daylength + r12930 and above. No need PaxDest if it's too much of a hassle. Daylength is very important. Haha! Starting a new game.

Edit: Oops! What I meant was Roest's Patchpack + Daylength +/- PaxDest.
The last version of this patchpack is for r12930 and includes daylength, so, sorry, I obviously fail to see your problem.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
ige
Engineer
Engineer
Posts: 47
Joined: 02 May 2008 17:58

Re: yet another...err...my patch pack (r12930)

Post by ige »

Sorry Philosophus, but the Windows binarys do not include the Daylength Patch :(
Draakon
Director
Director
Posts: 542
Joined: 11 Mar 2007 16:50

Re: yet another...err...my patch pack (r12930)

Post by Draakon »

User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: yet another...err...my patch pack (r12930)

Post by Roest »

Draakon wrote:Can you include this? http://www.tt-forums.net/viewtopic.php?f=33&t=36648
I'm starting to believe you aren't the brightest here. In that thread i mentioned the patch isn't working since he missed something and here you ask me if i can include it.
Draakon
Director
Director
Posts: 542
Joined: 11 Mar 2007 16:50

Re: yet another...err...my patch pack (r12930)

Post by Draakon »

Roest wrote:
Draakon wrote:Can you include this? http://www.tt-forums.net/viewtopic.php?f=33&t=36648
I'm starting to believe you aren't the brightest here. In that thread i mentioned the patch isn't working since he missed something and here you ask me if i can include it.
You weren't giving a good information on what was missing.
Gollum
Engineer
Engineer
Posts: 16
Joined: 24 Apr 2008 13:26

Re: yet another...err...my patch pack (r12930)

Post by Gollum »

the patch has already been fixed.
User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: yet another...err...my patch pack (r12951)

Post by Roest »

updated to r12951

added: Nycom's routing restrictions patch
Draakon
Director
Director
Posts: 542
Joined: 11 Mar 2007 16:50

Re: yet another...err...my patch pack (r12951)

Post by Draakon »

After the update, most of the scenarios i was able to load can't be loaded now because of the broken savegame error. Any plans on fixing it?
User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: yet another...err...my patch pack (r12951)

Post by Roest »

nice, i just found out this forum has an ignore option
niche
Engineer
Engineer
Posts: 3
Joined: 04 May 2008 16:50

Re: yet another...err...my patch pack (r12951)

Post by niche »

very nice pack :mrgreen:
can you add:
Track Sharing
Limit Road Vehicle Speed
There is a patch but i didnt know the name, it let you make subcompanys.
That would be great :mrgreen:
Sieben
Engineer
Engineer
Posts: 1
Joined: 05 May 2008 17:14

Re: yet another...err...my patch pack (r12951)

Post by Sieben »

i really like this pack. could you please add Advanced Terraform - Drag&Draw or 45° rotated rectangle clearing / leveling patch.
i also have the problem that i cannot load most of the scenarios since the last update.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests