Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java MapScript crash while setting the webObj #1798

Closed
mapserver-bot opened this issue Apr 3, 2012 · 4 comments
Closed

Java MapScript crash while setting the webObj #1798

mapserver-bot opened this issue Apr 3, 2012 · 4 comments
Assignees

Comments

@mapserver-bot
Copy link

Reporter: mapserver@geochem.de
Date: 2006/06/07 - 06:33
Trac URL: http://trac.osgeo.org/mapserver/ticket/1798

t try to to construct a map from the scratch and build all object by hand.
Sadly mapscript crashes outside the VM when i set the web Object.
When i do the same thing using a map-file everything is fine.
I attached to files (wms_client.map and wms_client_part.java) which
shows my problem using a WMS layer.
@mapserver-bot
Copy link
Author

Author: unicoletti
Date: 2006/06/08 - 10:00

The problem is that the webObj has only the default constructor created by swig
which does not call initWeb.
Added web.i with constructor and destructor.

@mapserver-bot
Copy link
Author

Author: szekerest
Date: 2006/06/17 - 00:33


I think this is not the only problem. setWeb will copy the webObj structure
itself to the mapObj member but the subsequent objects are not duplicated. Both
mapObj and webObj will own same memory segments and both of them will call free
on it.
As a resolution the entire object tree should be cloned, or the original webObj
should be "disowned".

For more details visit:

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1803

Tamas

@mapserver-bot
Copy link
Author

attachment http://trac.osgeo.org/mapserver/attachment/ticket/1798/wms_client.map :

   MapFile  wms_client.map (works)

@mapserver-bot
Copy link
Author

attachment http://trac.osgeo.org/mapserver/attachment/ticket/1798/wms_client_part.java :

   Java Class wms_client_part.java (shows the crash)

@ghost ghost assigned unicolet Apr 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants