When gating with TBR on Windows, this bug is present, but it is not present when using it under Wine. It seems to be strongly related to (being an OS-specific bug) but is not guaranteed to be caused by the same source, hence the second ticket.

See also:
https://ministry.kronosaur.com/record.hexm?id=3293

assumedpseudonym 20 May 2015:

 I fixed the problem in linked ticket by commenting out the virtual station that was causing the error. Doing so also fixed this issue. Of course, there’s still the whole thing about why it was causing errors…

george moromisato 22 May 2015:

I can't reproduce it. Could you include the code to the virtual station here? That might help me figure it out.

assumedpseudonym 22 May 2015:

 I’ll give you the item and the virtual station, since the latter depends on the former:

	<!-- Advanced Mining Hold -->

	<ItemType UNID="&itAEAdvancedMiningHold;"
		name=					"advanced mining hold"
		attributes=				"commonwealth, majorItem, minersHold"

		level=					"4"
		frequency=				"rare"

		value=					"3000"
		mass=					"1250"

		description=			"This cargo hold designed for mining sacrifices a small fraction of its capacity to include a short-range scanner to find nearby ore-bearing asteroids."
		>

		<Image imageID="&rsItems1;" imageX="96" imageY="192" imageWidth="96" imageHeight="96"/>

		<CargoHoldDevice cargoSpace= "75"/>
	</ItemType>

	<!-- Advanced Mining Hold Virtual -->

	<StationType UNID="&stAEAdvancedMiningHoldVirtual;"
			name=				"(advanced mining hold virtual)"
			sovereign=			"&svIndependent;"
			scale=				"world"
			virutal=			"true"
			>

		<Events>
			<OnGlobalSystemCreated>
				(sysCreateStation &stAEAdvancedMiningHoldVirtual; nil)
			</OnGlobalSystemCreated>
			<OnCreate>
				(sysAddObjRecurringTimerEvent 1 gSource "Scanner")
			</OnCreate>
			<Scanner>
				(block (aeFoundOne)
					(enum (objGetItems gPlayership "cI") aeHoldFinder
						(if (eq (itmGetType aeHoldFinder) &itAEAdvancedMiningHold;)
							(enumWhile (sysFindObject gPlayerShip "t N:25 S:d +asteroid") (not aeFoundOne) aeOreScanner
								(if (objGetItems aeOreScanner "* +Ore")
									(block nil
										(objAddOverlay aeOreScanner &ovAEOreScanner; 2)
										(setq aeFoundOne true)
									)
								)
							)
						)
					)
				)
			</Scanner>
		</Events>
	</StationType>
george moromisato 22 May 2015:

I'll also need ovAEOreScanner.

I might not be reading the code right, but doesn't this create an infinite number of overlays? That would eventually lead to a crash, I think.

assumedpseudonym 22 May 2015:

 D’oh. My bad.

	<!-- Advanced Mining Hold Scanner Overlay -->

	<OverlayType UNID="&ovAEOreScanner;" instance="creator">
		<Effect>
			<Ray
				style=			"smooth"
				shape=			"diamond"
				length=			"36"
				width=			"12"
				primaryColor=	"#ff9933"
				secondaryColor=	"#000000"
				>
				<Events>
					<GetParameters>
						(block nil
							{
								xFormRotation: (subtract 0 (modulo (unvGetTick) 360))
							}
						)
					</GetParameters>
				</Events>
			</Ray>
			<Ray
				style=			"smooth"
				shape=			"diamond"
				length=			"36"
				width=			"12"
				primaryColor=	"#ff9933"
				secondaryColor=	"#000000"
				>
				<Events>
					<GetParameters>
						(block nil 
							{
								xFormRotation: (subtract 120 (modulo (unvGetTick) 360))
							}
						)
					</GetParameters>
				</Events>
			</Ray>
			<Ray
				style=			"smooth"
				shape=			"diamond"
				length=			"36"
				width=			"12"
				primaryColor=	"#ff9933"
				secondaryColor=	"#000000"
				>
				<Events>
					<GetParameters>
						(block nil
							{
								xFormRotation: (subtract 240 (modulo (unvGetTick) 360))
							}
						)
					</GetParameters>
				</Events>
			</Ray>
			<Ray
				style=			"smooth"
				shape=			"diamond"
				length=			"18"
				width=			"12"
				primaryColor=	"#ff9933"
				secondaryColor=	"#000000"
				>
				<Events>
					<GetParameters>
						(block nil
							{
								xFormRotation: (subtract 0 (subtract 0 (modulo (unvGetTick) 360)))
							}
						)
					</GetParameters>
				</Events>
			</Ray>
			<Ray
				style=			"smooth"
				shape=			"diamond"
				length=			"18"
				width=			"12"
				primaryColor=	"#ff9933"
				secondaryColor=	"#000000"
				>
				<Events>
					<GetParameters>
						(block nil 
							{
								xFormRotation: (subtract 0 (subtract 120 (modulo (unvGetTick) 360)))
							}
						)
					</GetParameters>
				</Events>
			</Ray>
			<Ray
				style=			"smooth"
				shape=			"diamond"
				length=			"18"
				width=			"12"
				primaryColor=	"#ff9933"
				secondaryColor=	"#000000"
				>
				<Events>
					<GetParameters>
						(block nil
							{
								xFormRotation: (subtract 0 (subtract 240 (modulo (unvGetTick) 360)))
							}
						)
					</GetParameters>
				</Events>
			</Ray>
		</Effect>
	</OverlayType>

 As for infinite overlays, the overlays only last for two ticks:
 (objAddOverlay aeOreScanner &ovAEOreScanner; 2)