Mapscript c# problems and apache2 scratches

Xavier Mauclaire xavier.mauclaire at GEOTER.FR
Thu Jun 29 08:21:43 EDT 2006


Hi tamas

I'm going to prepare you another little tool because i don't know if the
last one was  revealing the error i got under linux.
I remind you the error 

regards

===============================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Stacktrace:

in (wrapper managed-to-native) mapscriptPINVOKE:mapObj_draw
(System.Runtime.InteropServices.HandleRef) <0x4>
in (wrapper managed-to-native) mapscriptPINVOKE:mapObj_draw
(System.Runtime.InteropServices.HandleRef) <0xffffff81>
in mapObj:draw () <0x21>
in siteflash.GetParcelleReglement:ProcessRequest (System.Web.HttpContext)
<0x8e5>
in <Pipeline>__1:MoveNext () <0x10a0>
in System.Web.HttpApplication:Tick () <0x1f>
in System.Web.HttpApplication:Start (object) <0x37>
in
System.Web.HttpApplication:System.Web.IHttpAsyncHandler.BeginProcessRequest
(System.Web.HttpContext,System.AsyncCallback,object) <0x68>
in System.Web.HttpRuntime:RealProcessRequest (object) <0x1ab>
in System.Web.HttpRuntime:ProcessRequest (System.Web.HttpWorkerRequest)
<0x2c>
in Mono.WebServer.MonoWorkerRequest:ProcessRequest () <0xa>
in Mono.WebServer.BaseApplicationHost:ProcessRequest
(Mono.WebServer.MonoWorkerRequest) <0x43>
in Mono.WebServer.ModMonoApplicationHost:ProcessRequest
(int,string,string,string,string,string,int,string,int,string,string[],strin
g[]) <0xdc>
in (wrapper remoting-invoke-with-check)
Mono.WebServer.ModMonoApplicationHost:ProcessRequest
(int,string,string,string,string,string,int,string,int,string,string[],strin
g[]) <0xffffff0a>
in (wrapper xdomain-dispatch)
Mono.WebServer.ModMonoApplicationHost:ProcessRequest
(object,byte[]&,byte[]&,int,string,string,string,string,string,int,string,in
t,string,string[],string[]) <0xfffee24e>
in (wrapper xdomain-invoke)
Mono.WebServer.ModMonoApplicationHost:ProcessRequest
(int,string,string,string,string,string,int,string,int,string,string[],strin
g[]) <0xffffff6a>
in (wrapper remoting-invoke-with-check)
Mono.WebServer.ModMonoApplicationHost:ProcessRequest
(int,string,string,string,string,string,int,string,int,string,string[],strin
g[]) <0xffca8c24>
in Mono.WebServer.ModMonoWorker:InnerRun (object) <0x404>
in Mono.WebServer.ModMonoWorker:Run (object) <0x17>
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object
(object) <0xffffff95>
in (wrapper runtime-invoke) System.Object:runtime_invoke_void_object
(object,intptr,intptr,intptr) <0xc7371b5f>

Native stacktrace:

	/usr/lib/pkgconfig/../../bin/mono(mono_handle_native_sigsegv+0xbb)
[0x814ee2b]
	/usr/lib/pkgconfig/../../bin/mono [0x813b2cf]
	[0xffffe440]
	/usr/local/lib/libmapscript.so(msLayerClose+0x1d) [0x418eb11d]
	/usr/local/lib/libmapscript.so(msDrawVectorLayer+0x35e) [0x418f2e4e]
	/usr/local/lib/libmapscript.so(msDrawLayer+0x90) [0x418f3150]
	/usr/local/lib/libmapscript.so(msDrawMap+0x2fd) [0x418f3e1d]
	/usr/local/lib/libmapscript.so(CSharp_mapObj_draw+0x1d) [0x418a9e3d]
	[0x4185fbdc]
	[0x4185fafa]
	[0x41865026]
	[0x416f6719]
	[0x416f55a0]
	[0x416f19d8]
	[0x416f18b9]
	[0x4115049c]
	[0x4114ffcd]
	[0x4114ff8b]
	[0x4114f544]
	[0x41133dcd]
	[0x41133534]
	[0x41133313]
	[0x4112124f]
	[0x4112108b]
	[0x40dc9bdd]
	[0x40dc9730]
	[0x40dc96f4]
	[0x40dc964e]
	/usr/lib/pkgconfig/../../bin/mono [0x813b180]
	/usr/lib/pkgconfig/../../bin/mono(mono_runtime_invoke+0x27)
[0x80d63f7]
	/usr/lib/pkgconfig/../../bin/mono(mono_runtime_invoke_array+0x270)
[0x80d78c0]
	/usr/lib/pkgconfig/../../bin/mono(mono_message_invoke+0xc5)
[0x80d93d5]
	/usr/lib/pkgconfig/../../bin/mono [0x80a509f]
	/usr/lib/pkgconfig/../../bin/mono [0x80a58c9]
	/usr/lib/pkgconfig/../../bin/mono [0x8099fb2]
	/usr/lib/pkgconfig/../../bin/mono [0x80f5067]
	/usr/lib/pkgconfig/../../bin/mono [0x8113175]
	/lib/tls/libpthread.so.0 [0x400e5297]
	/lib/tls/libc.so.6(__clone+0x5e) [0x401e037e]
[Thu Jun 29 09:36:47 2006] [notice] caught SIGTERM, shutting down
[Thu Jun 29 09:36:48 2006] [notice] Apache/2.2.0 (Unix) mod_mono/1.1.14
configured -- resuming normal operations 


-----------------------------------------
Xavier Mauclaire
Service informatique
GEOTER SAS
3, rue Jean Monnet
34830 Clapiers France
Tél.: +33 (0)4.67.59.18.11
Fax: +33 (0)4.67.59.18.24 
Email: xavier.mauclaire at geoter.fr
Web site: http://www.geoter.fr
-------------------------------------------------------

 

-----Message d'origine-----
De : UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la
part de Tamas Szekeres
Envoyé : mercredi 28 juin 2006 00:08
À : MAPSERVER-USERS at LISTS.UMN.EDU
Objet : Re: [UMN_MAPSERVER-USERS] Mapscript c# problems and apache2
scratches

Xavier,

After digging into your code i have found the following problems:

In pMapSetSelection:  "layerObj pLayer = new layerObj(pMapQuery);"
will implicitly add the newly created layer to the map (to the end of the
layers list) with index=1 (you have already a layer with index =
0)
You will have the following layers then:
0 - zonage_reglementaire
1 - selection

After that you are calling "pMapQuery.insertLayer(pLayer, 0);" which will
shift the layers upwards:
0 - zonage_reglementaire
1 - zonage_reglementaire
2 - selection

Free the layer with index = 0  !!!!
0 - freed
1 - zonage_reglementaire
2 - selection

Copy the given layer to index = 0
0 - zonage_reglementaire
1 - zonage_reglementaire
2 - selection

After freeing zonage_reglementaire the resultache of the layer will be
cleared so the subsequent call of pLayerParcelle.getResults() will return
null and a nullreference exception will be raised.

I think the previously described operation is unexpected and you might want
to add the selection layer only once. Therefore you must not call inserLayer
when creating the layer using the constructor with a map object.

If you will use the current CVS version MS_POSITIONS_ENUM.MS_CC should be
used instead of MS_LABEL_POSITIONS.MS_CC.

I have tested your code on windows.

Best Regards,

Tamas


2006/6/27, Xavier Mauclaire <xavier.mauclaire at geoter.fr>:
> Hi tamas
> You will find joined a sample application that produce an error. I 
> don't know if this error is the same as the one that occurs with the web
site.
> This sample application uses theads to simulate asp.net requests. Each 
> thread loads 3 time  a mapfile and do a searchbypoint. After this a 
> dynamic layer is created with the pMapSetSelection(pMapQuery, pShape); 
> function If this function is launched the program scratches otherwise all
works well.
> Finally ne image is generated.
> mY problem is that i don't know if thr generated error is the same as 
> the mapObj_Draw error i get on my server
>
> On the linux server i changed the csmodule.i and append your update 
> code request at the end of the file
>
> %typemap(csconstruct, excode=SWIGEXCODE) layerObj(mapObj map) %{:
> this($imcall, true) {
>   if (map != null) this.swigCMemOwn = false;$excode } %} 
> %typemap(csconstruct, excode=SWIGEXCODE) classObj(layerObj layer) %{:
> this($imcall, true) {
>   if (layer != null) this.swigCMemOwn = false;$excode } %} 
> %typemap(csconstruct, excode=SWIGEXCODE) styleObj(classObj
> parent_class) %{: this($imcall, true) {
>   if (parent_class != null) this.swigCMemOwn = false;$excode } %}
>
> Hope this will help
>
> regards
>
>
> -----------------------------------------
> Xavier Mauclaire
> Service informatique
> GEOTER SAS
> 3, rue Jean Monnet
> 34830 Clapiers France
> Tél.: +33 (0)4.67.59.18.11
> Fax: +33 (0)4.67.59.18.24
> Email: xavier.mauclaire at geoter.fr
> Web site: http://www.geoter.fr
> -------------------------------------------------------
>
>
>
> -----Message d'origine-----
> De : Tamas Szekeres [mailto:szekerest at gmail.com] Envoyé : lundi 26 
> juin 2006 17:55 À : Xavier Mauclaire Cc : 
> MAPSERVER-USERS at lists.umn.edu Objet : Re: Mapscript c# problems and 
> apache2 scratches
>
> Xavier,
>
> Could you extract the problem as a sample application, like you have 
> done with the previous issue?
> How did you make the test? How many requests should be made? Is the 
> problem deterministic of occurs randomly at different functions.
>
> Tamas
>
>
> 2006/6/26, Xavier Mauclaire <xavier.mauclaire at geoter.fr>:
> >
> >
> > HI
> >
> > New problem with the mapscript c# library.
> > I'm doing a web site using, among others, querybyshape function. If 
> > there are several requests using this function i scratches the 
> > server
> >
> >
>
>
>



More information about the mapserver-users mailing list