Bug 1803, Upcoming breaking changes for 4.10.0-beta1

Tamas Szekeres szekerest at GMAIL.COM
Thu Aug 17 10:53:45 EDT 2006

> Daniel,
> IMO  we are talking about fixing pieces of code we are not even sure
> they are broken. For instance I have some Java mapscript tests (and an
> application) running just fine that add layers and classes at run time
> and that's why I am so reluctant in approving this proposal. Only once

> we get a test case that reproduces this errors reliably then we can go
> and change the code.
> Unfortunately I couldn't join the IRC meeting because I am on vacation
> otherwise I'd have spoken  earlier (I am writing this on the road).

Umberto, Daniel, Steve, Frank ...

As i am becoming a truthless prophet increasingly i have written a
simple C# test against layerObj.metadata as follows:


using System;

class DrawMap

  public static void Main(string[] args)

	mapObj m_obj = new mapObj(args[0]);	

	Console.WriteLine ("# Map layers " + m_obj.numlayers + "; Map name =
" + m_obj.name);

	hashTableObj ht = new hashTableObj();
	  ht.set("key0", "value0");
	  ht.set("key1", "value1");
	  ht.set("key2", "value2");
	for (int i=0; i<m_obj.numlayers; i++)

	  m_obj.getLayer(i).metadata = ht;  // this row causes the exception
comment it out to get no exceptions :-)
	  Console.WriteLine("Layer [" + i + "] name: " + m_obj.getLayer(i).name);


You should simply substute the drawmap.cs with this code and issue
'nmake -f makefile.vc' and 'nmake -f makefile.vc test' in the
mapscript/csharp directory.
And enjoy the Unhandled Exception you get.

I think it would be easy to rewrite the test for the other languages
such as java as well (i am not familiar with).


More information about the mapserver-dev mailing list