Skip to main content

removeAllLocales solves missing texture problem but is it a safe call?

2 replies [Last post]
pauldb
Offline
Joined: 2003-08-30
Points: 0

Hi,
In an earlier post, I describe a problem that I have with two canvases attached to the same view. If I preview lots of 2D images, with JFileChooser (see the Swing tutorial), and then create the universe with the view and the two canvases, in the second canvas, some of the textures are missing and the objects simply appear white.

I have stumbled across a workaround that removes the problem. If I call universe.removeAllLocales() immediately after creating the VirtualUniverse and before adding a locale or anything else, I do not get the problem.

I've taken a look at the source for VirtualUniverse removeAllLocales and the only thing that I think could be helping me is the call to the static MasterControl which performs some cleaning up operations. Quite frankly, that's where my comprehension ends.

My questions are:

1. Is my workaround safe? Is it ok for me to call removeAllLocales immediately after creating a VirtualUniverse and then going on to use that universe?

2. Wouldn't the need for my workaround suggest that there is a problem here that needs resolving?

Many thanks,
-Paul

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kcr
Offline
Joined: 2004-03-17
Points: 0

It should be safe. Since you have a test case that reproduces the problem (we were unable to reproduce a similar problem with the test case submitted with Issue 18), would you please file a new Issue and attach your test program? Thanks.

-- Kevin

pauldb
Offline
Joined: 2003-08-30
Points: 0

Hi Kevin,
I'm afraid that I cannot submit my code - it's too large and I'm not allowed to redistribute the graphics objects.

However, I will assemble a test case as soon as possible.

On the subject of 'issues', I can support the person who submitted issue number 10 aswell.

Again, I'll try to put together an example that replicates it.

For now, I'll use my workarounds.
Thanks,
-Paul