The International Simutrans Forum

Development => Bug Reports => Topic started by: myagami on February 27, 2019, 02:01:21 PM

Title: r8694 curiosity builder tool crash
Post by: myagami on February 27, 2019, 02:01:21 PM
in r8694, when doing add-on rotation setting used curiosity builder tool To crash under the following conditions.

1. In an add-on with more than two directions, if the direction is set to anything other than random.
2. In an add-on that has information on only one direction, when the direction is randomly switched from 0 and then returned to 0.

Title: Re: r8694 curiosity builder tool crash
Post by: Leartin on February 27, 2019, 02:46:50 PM
Quote from: myagami on February 27, 2019, 02:01:21 PM
1. In an add-on with more than two directions, if the direction is set to anything other than random.

Just for completions sake: The add-on shown is not square, I suspect that could cause such issues. If I don't forget I'll test later, but I'm pretty sure it worked with square buildings. Nope, it actually always fails in curiosity builder, but not in factory builder
Title: Re: r8694 curiosity builder tool crash
Post by: DrSuperGood on February 27, 2019, 03:55:07 PM
The issue is that rotation 255 is defined as "random" and it looks like it may have been intended that rotation 254 be defined as "auto" and be selected immediately after "random" however no logic or selection for auto rotation was implemented hence it tried to use rotation 254 when selecting the first rotation, 0, which is not a valid rotation index for a building.

Fixed in R8695.
Title: Re: r8694 curiosity builder tool crash
Post by: myagami on February 27, 2019, 11:39:15 PM
build in r8695,checked my report bug fix and normal action.
My thanks reply to Leartin and DrSuperGood for my bug report check and Operation check.
Title: Re: r8694 curiosity builder tool crash
Post by: Dwachs on February 28, 2019, 05:59:44 PM
I tried to unify rotation selection with r8697. Hopefully, I did not broke anything.