[mapserver-users] Threads and Mapscript

Lowell Filak lfilak at medinaco.org
Thu Mar 21 08:54:26 EST 2002


In your saveImage call are you using a unique file name for "file.png" or is that an actual snippet from your code?
Lowell F.

The following message was sent by "Harald Wehr" <hwehr at hs-harz.de> on Thu, 21 Mar 2002 10:29:28 +0100.

> 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
> 
> 
> 
> 
> 
> 
> 




More information about the mapserver-users mailing list