This site requires JavaScript, please enable it in your browser!
Greenfoot back
Busch2207
Busch2207 wrote ...

2012/7/25

Deleting References

Busch2207 Busch2207

2012/7/25

#
Hey guys! I've got a big problem: In the exported '.jar'-files or in the gallery it don't work, that files are deleted, after there is no refernce on them! What I mean is, that the scenario stops after creating too many datas in the exported mode, even if there is no reference on them any more... I created a test scenario: http://www.greenfoot.org/scenarios/5720 In Greenfoot it works perfect. (Till 22, cause there are no more files) But in the exported jar files, or in the gallery it don't work... What can I do? Or can I do anything?
nccb nccb

2012/7/25

#
It runs until 22 for me (on the website), then dies with a FileNotFoundException. What behaviour do you see, and on what version of Java?
danpost danpost

2012/7/25

#
It only ran until 7 for me! (on the site)
danpost danpost

2012/7/25

#
It might have something to due to the fact that 'Number' is a class in 'Java.lang'. Try renaming that variable.
nccb nccb

2012/7/25

#
Hmmm, it also stops for 7 for me on my home PC (Java 1.6.0.31, Windows 7). It might be a bug in Java 6, can anyone on Java 7 give it a try?
danpost danpost

2012/7/25

#
I am running Java 1.6.0.33, Windows 7, and after changing the variable name from 'Number' to 'num' it ran full course to 22.
Busch2207 Busch2207

2012/7/25

#
Well... The point is not the name, there I'm sure! Cause this is just a testscenario of how many images can be created... I think, it might be the case of the java version. I'll try to reinstall Java and Greenfoot! :)
davmac davmac

2012/7/25

#
Hmm, on my Mac (Java 6) it only gets as far as 2...
darkmist255 darkmist255

2012/7/25

#
I get to 7 in the gallery (Java 1.7.0) I get to 22 in the IDE.
Busch2207 Busch2207

2012/7/31

#
Well... I uninstalled all Java versions I had on my computer and installed that one, that is reffered here: http://www.greenfoot.org/download But it still only runs to 7 in the gallery...
davmac davmac

2012/7/31

#
I looked into this a bit further and I think you've found a legitimate bug. Images are cached permanently and as you load more and more, the heap gets full and eventually overflows. I've added an entry to our bug database and we'll fix this for a future release.
You need to login to post a reply.