Unity Player update broke my interface on Win2k, V32/V64

See my post here:
http://forum.unity3d.com/viewtopic.php?p=107670

After the latest Unity player update, the vertical bar button is showing where I had a GUI.Label with texture data. I suspect memory corruption, or a bad reference.

I have full source in the forum post above.

The core issue is this texture works on the mac, but is corrupted on Vista:
http://tagenigma.com/qa/Unity3d/TextureTest001/TextureTest001.html

The texture is rendered in a label:

		if (null != _Texture)
		{
			GUI.Label(new Rect(20,40,_TextureWidth,_TextureHeight), _Texture);
		}

The texture is generated with SetPixel and applied:

	void GenerateTexture()
	{
		if (_TextureWidth > 0 
		    _TextureHeight > 0)
		{
			_Texture =
				new Texture2D(
				              Mathf.Min(4096,_TextureWidth),
				              Mathf.Min(4096,_TextureHeight),
				              TextureFormat.ARGB32, false);
			
			FractalNoise fn =
				new FractalNoise(_FractalIncrement, _Lacunarity, _Octaves);//, new Perlin());
			
			System.Diagnostics.Stopwatch thinkWatch =
				new System.Diagnostics.Stopwatch();
			
			thinkWatch.Start();
			
			for (int y = 0; y < _TextureHeight; ++y)
			{
				for (int x = 0; x < _TextureWidth; ++x)
				{
					if (thinkWatch.ElapsedMilliseconds > 7000)
					{
						break;
					}
					
					float noiseF = 0;
					switch (_TextureGenerationType)
					{
					case TextureGenerationTypes.PerlinNoise:
						noiseF =
							Perlin.NoiseNormalized(
								x*_ScaleWidth/(float)_TextureWidth + _RandomX, //fake randomness
								y*_ScaleHeight/(float)_TextureHeight + _RandomY); //fake randomness
						break;
					case TextureGenerationTypes.PerlinBrownianMotion:
						noiseF =
							fn.BrownianMotion(
								x*_ScaleWidth/(float)_TextureWidth + _RandomX, //fake randomness
								y*_ScaleHeight/(float)_TextureHeight + _RandomY); //fake randomness
						break;
					case TextureGenerationTypes.PerlinHybridMultifractal:
						noiseF =
							fn.HybridMultifractal(
								x*_ScaleWidth/(float)_TextureWidth + _RandomX, //fake randomness
								y*_ScaleHeight/(float)_TextureHeight + _RandomY, //fake randomness
								_Offset);
						break;
					case TextureGenerationTypes.PerlinRidgedMultifractal:
						noiseF =
							fn.RidgedMultifractal(
								x*_ScaleWidth/(float)_TextureWidth + _RandomX, //fake randomness
								y*_ScaleHeight/(float)_TextureHeight + _RandomY, //fake randomnesss
								_Offset,
								_Gain);
						break;
					}						

					Color color =
						new Color(noiseF, noiseF, noiseF, 1);
					_Texture.SetPixel(x, y, color);
				}
			}
			_Texture.Apply(false);
		}

Huh? What update? Sorry, just a bit confused here as there hasn’t been a Unity update for months. A bug’s still a bug, of course, and the proper way to get those fixed is the Bug Reporter app.

Cheers,
-Jon

It’s possible I hadn’t updated the Vista machine that I saw it working on for a couple months.

It works on the Mac. So it should either work on both Mac and PC or be broken on both.

I found a cause of the issue. I had been using System.Diagnostics.Stopwatch which caused a bunch of mono dependencies to be included. Something about those dependencies broke the UI. FYI.

Ahh. Sounds like a great reproducible case to report to them.

Cheers,
-Jon