[Gvsig_english] POTENTIAL ERROR gvSIG 1.9 (BN 1253) -- Jave Heap Error while editing table

Benjamin Ducke benjamin.ducke at oxfordarch.co.uk
Sat Jan 9 11:41:17 CET 2010


Simon,

you should seriously consider switching to a Linux machine for your
data-intensive work. Any recent version of the Linux kernel has
memory management, file systems and process schedulers that offer
far better performance than Win32. I myself had one run-in with Windows.
It was the end of 1994 and Windows 95 had just been released. I installed it,
it crashed about a hundred times on me, I deleted it, switched to Linux
and never had a reason to try my luck with Windows again.

Recently I had a look at Windows 7, because everyone talked about it so much.
It took 10 minutes to boot up on my 5 year old PC which boots up Ubuntu
in about 90 seconds. It then blinked and whistled for a long time before
it came up with a terribly ugly GUI, popped up message bubbles all over
the place and asked me to start some activation process. I deleted it.

Nowadays, I use Windows to port software to it, because a lot of people
are running Windows systems, so it needs to be done.

Having said that, legacy applications are of course a problem if they 
represent heavy investment. But if the VM does not cut it, why not simply get a
cheap laptop or find an old PC, put the Windows stuff on there and do 
the rest of the work on a Ubuntu PC?

Ben

----- Original Message -----
From: "Simon Cropper (Botanicus Australia Pty Ltd)" <scropper at botanicusaustralia.com.au>
To: "Users and Developers mailing list" <gvsig_internacional at listserv.gva.es>
Sent: Saturday, January 9, 2010 11:24:47 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: Re: [Gvsig_english] POTENTIAL ERROR gvSIG 1.9 (BN 1253) -- Jave Heap Error while editing table

Ben,

Having this error occur intermittently, I have not noticed that much of 
an increase in data being used or what I have asked it to do. That is, I 
don't see an increased workload as the culprit.

That said this job is the largest GIS project that I have and requires 
the generation of multiple maps and low to moderately complex analysis. 
When using ArcView it to struggled.

Personally I don't think it is the size of the project or data being 
manipulated I think it is the complexity of the tasks being requested. I 
get the impression, a please anyone out there who have tested gvSIG 
please don't take this the wrong way, most testing involves individual 
elements. Yes, you can add a layer. Yes, you can have labels based on 
two fields. Yes, you can categorize a field based on a particular field. 
Where I think I am pushing it is in asking gvSIG to juggle too many 
items - 33 ECW files (w/ scale criteria, put into group) and one 
moderately sized shapefile with ~300 geometries overing 100 km², 
multiple instances in the ToC with varying symbology and labeling 
strategies. It was only after the 4 instance of the same shapefile was 
inserted into the ToC and new labels were being inserted I ran into 
problems with memory.

So the short response 'complexity' not 'size' appears to be the problem 
-- and following my analogy the juggler dropped a ball.

Again it is debatable whether the program requested more memory than the 
VM could provide so a subroutine crashed when it could not create an 
array or whether the program has a fundamental flaw that has resulted in 
an error. If it was the latter I expect I would be able to reproducer 
the error - which I haven't. Therefore I think I am pushing the 
boundaries of gvSIG and the Java Machine it is contained within.

I have knocked up my memory to 1000MB (half my memory) -- hopefully this 
will allow me to work through this project, which is nearly at an end.

Interestingly I have just been offered an even larger mapping project 
covering a similar area. This will really be pushing the size limits. 
Interestingly it will be relatively simple. One shapefile, many ECWs, 
typology checking and attribute verification. I will post updates on how 
this goes.

As a side note, you appear to have done work on Windows and Ubuntu. What 
are you currently using and which do you prefer?

I am migrating towards Ubuntu but have stalled in replacing an in-house 
Visual Foxpro program that uses dual monitors (VM does not use dual 
monitors), so at present I am stuck as this program has 10-years of 
legacy programming that can not be readily replaced.

Cheers Simon

Simon Cropper
Botanicus Australia Pty Ltd
PO Box 160, Sunshine, Victoria 3020.
P: 9311 5822. M: 041 830 3437.
mailto: scropper at botanicusaustralia.com.au 
<mailto:scropper at botanicusaustralia.com.au>
web: www.botanicusaustralia.com.au <http://www.botanicusaustralia.com.au>


On 9/01/2010 8:53 PM, Benjamin Ducke wrote:
> Hi Simon,
>
> I have tried setting Xmx>  1500 on a 4 GB WinXP machine and
> got the same errors. On a Linux machine, I could easily increase
> to>  2000 (stopped testing there). The reason is that the
> JVM wants that much memory in one *contiguous* block and
> Windows' memory manager is incapable of delivering that.
>
> Finding an optimal setting for all the Java VM memory settings
> is something of a black art. Java tries to do all mem management
> automatically, but that automatism is controlled by the interaction
> of a number of options.
> Even Sun seem to be struggling with the complexities of it:
>
> http://java.sun.com/performance/reference/whitepapers/tuning.html
>
> The error log you attached clearly shows that the VM ran out
> of memory. Whether that is because it actually couldn't handle
> the amount of data you threw at it or there is a bug in the
> program code that leads to it trying to allocate too much
> memory is a matter that needs looking into.
>
> Ben
>
>
> ----- Original Message -----
> From: "Simon Cropper (Botanicus Australia Pty Ltd)"<scropper at botanicusaustralia.com.au>
> To: "Users and Developers mailing list"<gvsig_internacional at listserv.gva.es>
> Sent: Saturday, January 9, 2010 4:54:24 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
> Subject: Re: [Gvsig_english] POTENTIAL ERROR gvSIG 1.9 (BN 1253) -- Jave Heap Error while editing table
>
> Ben,
>
> 500M - gvSIG Opened OK
> 800M - gvSIG Opened OK
> 1000M - gvSIG Opened OK
> 1300M - gvSIG Opened OK
>     - could open projects
> 1500M - gvSIG Opened OK
> 1501M - gvSIG Opened OK
> 1600M - gvSIG Opened OK
> 1700M - Error "Could not create Java machine"
> 1800M - Error "Could not create Java machine"
> 1600M - gvSIG Opened OK, plug-in services could not open
> 1500M - gvSIG Opened OK, plug-in services could not open
> 1300M - gvSIG Opened OK, could open project
>
> I would imaging this would be dependent on your available memory (2GB on
> my system). I think I will set at 800M at present and see what happens
> as I usually have more than my email client open when running gvSIG.
>
> Cheers Simon
>
> Simon Cropper
> Botanicus Australia Pty Ltd
> PO Box 160, Sunshine, Victoria 3020.
> P: 9311 5822. M: 041 830 3437.
> mailto: scropper at botanicusaustralia.com.au
> <mailto:scropper at botanicusaustralia.com.au>
> web: www.botanicusaustralia.com.au<http://www.botanicusaustralia.com.au>
>
>
> On 8/01/2010 9:06 PM, Benjamin Ducke wrote:
>    
>> Also note that under Linux you can set the heap space
>> much larger than under Windows. In my experiments on Win XP,
>> gvSIG would no longer start up if I set Xmx to>   1500 or so.
>> Try how far you can go.
>>
>> Ben
>>
>> ----- Original Message -----
>> From: "Jorge Piera"<jorge.piera at iver.es>
>> To: "Users and Developers mailing list"<gvsig_internacional at listserv.gva.es>
>> Sent: Friday, January 8, 2010 8:45:48 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
>> Subject: Re: [Gvsig_english] POTENTIAL ERROR gvSIG 1.9 (BN 1253) -- Jave Heap Error while editing table
>>
>> Hi.
>>
>> The optimum setting for memory depends on your environment and the
>> application that your are running. I would try values from 500MB up to 1GB.
>>
>> Regards,
>> Jorge.
>>
>> Simon Cropper (Botanicus Australia Pty Ltd) wrote:
>>
>>      
>>> Jorge,
>>>
>>> My settings are command = #JAVA#
>>> -Djava.library.path="#GVSIG_INSTALL_PATH#\lib" -cp #CLASSPATH# -Xmx500M
>>> -Xss1024k com.iver.andami.Launcher gvSIG gvSIG/extensiones #ARGS#
>>>
>>> What is the optimum setting for memory? I run a Windows XP SP3 2GB of
>>> memory.
>>>
>>> Cheers Simon
>>>
>>> Simon Cropper
>>> Botanicus Australia Pty Ltd
>>> PO Box 160, Sunshine, Victoria 3020.
>>> P: 9311 5822. M: 041 830 3437.
>>> mailto: scropper at botanicusaustralia.com.au
>>> <mailto:scropper at botanicusaustralia.com.au>
>>> web: www.botanicusaustralia.com.au<http://www.botanicusaustralia.com.au>
>>>
>>>
>>> On 8/01/2010 5:52 PM, Jorge Piera wrote:
>>>
>>>
>>>        
>>>> Hello Simon.
>>>>
>>>> Hi.
>>>>
>>>> You can run gvSIG using more memory. Just edit the gvSIG.sh (or the
>>>> gvSIG.ini) file located in the installation directory (folder bin) and
>>>> find the text "-Xmx500M". 500M is the number of MB that you want to use
>>>> when you execute the Java Virtual Machine. You can change this number by
>>>> the number of MB that you want and next time that you run gvSIG, it will
>>>> use this number of MB./
>>>> /
>>>> Regards,
>>>> Jorge.
>>>>
>>>>
>>>> Simon Cropper (Botanicus Australia Pty Ltd) wrote:
>>>>
>>>>
>>>>
>>>>          
>>>>> Hi,
>>>>>
>>>>> I managed to generate a Java Heap error in gvSIG.
>>>>>
>>>>> Unfortunately I was unable to capture any error details.
>>>>>
>>>>> I can tell you what I was doing and hopefully you can reproduce.
>>>>>
>>>>> I was editing a shapefile's attribute table. Specifically I was changing
>>>>> the values of a field used in complex labeling in individually defined
>>>>> labeling classes - 10W = 10m high white writing, 5W = 5m high white
>>>>> writing, etc.
>>>>>
>>>>> The shapefile is present 3 times in ToC. The first is site #, second
>>>>> vegetation type, third quality. The label sizre is based on a field
>>>>> called [LglGrp]. I was editing this field when I asked myself what the
>>>>> previous instance of the shapefile looked like. Without really thinking
>>>>> I clicked on the first instance (Site #) of the shapefile to view the
>>>>> labels (without saving my changes) and BANG all hell broke loose - I had
>>>>> numerous Java Heap Errors.
>>>>>
>>>>> I exited the program without saving and reentered. The shapefile was
>>>>> intact but the recent edits were lost (obviously). I have scoured the
>>>>> system but no error log was found.
>>>>>
>>>>> I have tried to repeat my steps but have not been able to triggered the
>>>>> error again.
>>>>>
>>>>> Anyone know what would have triggered such a response? Memory issues?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>            
>>>>
>>>>
>>>>          
>>> _______________________________________________
>>> Gvsig_internacional mailing list
>>> Gvsig_internacional at listserv.gva.es
>>> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>>>
>>>
>>>
>>>
>>>        
>>
>>      
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at listserv.gva.es
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
>
>
> ------
> Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.
>
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at listserv.gva.es
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
>
>    
_______________________________________________
Gvsig_internacional mailing list
Gvsig_internacional at listserv.gva.es
http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional



------
Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.



More information about the Gvsig_internacional mailing list