[mapserver-users] Threads and Mapscript

Harald Wehr hwehr at hs-harz.de
Wed Apr 3 22:40:10 PST 2002


Stephen Woodbridge wrote:

> Harald,
> 
> mapserver is not thread-safe, I think the developers have start putting
> mutex locking it but as you have found out it is not finnished. It also
> crashes with PHP/mapscript if you do NOT build it as a CGI program.
> 
> -Steve W.


Hi Steve,

I'm referring to our mails in march this year.

You write that PHP/maspcript crashes too. How do other people handle 
this problem or is mapscript not used at all?

Of course I can call the cgi-program from a java-servlet, but thats not 
so comfortable and not the intention of mapscript.

THanks a lot for your help.

Harald


> 
> Harald Wehr wrote:
> 
>>Using a cgi-script on a server for every request a new thread is opened,
>>isn't it?
>>
>>I use mapscript in a servlet. Every request makes a new thread. I save
>>one mapObject in one java-session. Several requests (from different
>>browsers) produce different mapObjects. Everything works right until
>>here. I have different objects with different c-pointers.
>>
>>Calling mapscript from one browser works fine. Calling it from another
>>browser sometimes crashes my servlet-engine. It writes:
>>"Unexpected exception outside virtual machine
>>Function=msDrawRasterLayer+0x694
>>Library=/urs/local/lib/libmapscript.so"
>>This happens when i call the map.draw()-method. Do you have any suggestions?
>>
>>What happens when i call
>>"mapscipt.saveImage(pointer,"file.png",2,1,0,95)" from different
>>threads? Is this thread-safe even in all depending libraries?
>>
>>Asking the "mapscript.get_ms_error" from different threads I always get
>>the same c-pointer of the error. Is this right? Can I somehow get
>>error-Objects related to specific thread?
>>
>>Harald
>>
> 



-- 
Hochschule Harz
Projekt Mobiharz
Tel. 03943/626654
Email: hwehr at hs-harz.de




More information about the MapServer-users mailing list