News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

[11.10] [pak.german-exp.20382] "Schedule is incomplete/not finished" on line def

Started by hnz_kkk, September 09, 2013, 01:33:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hnz_kkk

[11.10] [pak.german-exp.20382] Win32

I start setting up a line. Let's say a tram (horse-drawn) line. I set up tracks for a round line, add a depot, and place road-type stations (let's say four of them). Then in depot, I buy a horse-drawn carriage, and click "Schedule". Now I define 4 stops using the stops in their order. Then I type in name of the line, hit "Promote to Line" and close schedule.

Now when I use "Copy Convoy" on vehicle with line already set to new line, I can only create one copy. On second attempt, I see a message "Schedule is incomplete/not finished". Only way I can do it is copy vehicles without line, assigning line manually for each one.

This pretty much happens on much more lines in any type of transport, round lines or not. I've noticed it started happening on 11.10.

Sarlock

I experienced this a few times last night playing.  I re-opened the schedule and closed it and that usually cleared the error and I could copy convoys.  I was going to play around a bit more today and see if I could pin down exactly how this bug is caused and how to get around it.
Current projects: Pak128 Trees, blender graphics

Philip

This one's probably my fault (before, you used to get convoys that couldn't be sent to the depot). I'm still not sure what causes convoys with ist_abgeschlossen() == false to be created, or slip through (in this case, an eingabe_abschliessen() call in simline.cc:create_schedule() would probably avoid the problem. As a workaround, try opening the schedule window again and closing it, then copying the convoy?

I'm going to make another attempt to track this down.

EDIT: I'm pretty sure now the bug is also present, though less visible, in standard, and that newly-constructed schedule_t objects were meant to be abgeschlossen. Experimental's go_to_depot() checks abgeschlossen while Standard's convoi_info_t::action_triggered does not. Here's a patch that fixes the problem for me, and that I think but cannot promise won't break anything.


diff --git a/simline.cc b/simline.cc
index f638668..a55c1f2 100644
--- a/simline.cc
+++ b/simline.cc
@@ -112,6 +112,7 @@ void simline_t::create_schedule()
default:
dbg->fatal( "simline_t::create_schedule()", "Cannot create default schedule!" );
}
+ get_schedule()->eingabe_abschliessen();
}

jamespetts

Thank you very much both for the report and the fix - I am currently working on a different issue, but will incorporate this when I am able to do so. Thank you again!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

hnz_kkk

Glad I could help.

I learned to use the <create new line> in pulldown menu instead, which does not manifest such behaviour.

It's also the only option to fill in convoy spacing right on the start (not sure, has this changed recently? As I don't see it in the schedule before promoting to line. I think this was possible before).

prissi

I could not repoduce it in standard. However, to cure this I rather suggest to add the line with the plus in simwerkz.cc


bool wkz_change_line_t::init( karte_t *welt, spieler_t *sp )
...
// first letter is now the actual command
switch(  tool  ) {
case 'c': // create line, next paraemter line type and magic of schedule window (only right window gets updated)
{
line = sp->simlinemgmt.create_line( atoi(p), sp );
while(  *p  &&  *p++!=','  ) {
}
long t;
sscanf( p, "%ld", &t );
while(  *p  &&  *p++!=','  ) {
}

// no need to check schedule for scenario conditions, as schedule is only copied
line->get_schedule()->sscanf_schedule( p );
+ line->get_schedule()->eingabe_abschliessen(); // just in case ...
if(  is_local_execution()  ) {

jamespetts

Prissi - thank you very much for your input: that is appreciated. Do you suggest doing this instead of or as well as incorporating Philip's patch?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.