I'm currently developing a g3d based game for a wide range of handset. I'm using the 6630 as my base development platform as it's fast and quite reliable. So far I've had no problems untill today. Suddenly I get a ClassCast Exception when I'm trying to duplicate a Material.
The code is something like:
My first hunch was that it was related to memory issues, but I had to rule this out because the exception only occured when I did NOT load my sky dome texture, which is 256x256 pixels..
A collegue of mine suggested that I should try to insert a sleep before duplicating the material, which actually solved the problem. This would be a really ugly and unreliable solution in my oppinion!.. Not the way to go.
The exception does NOT occur in the DP2 beta emulator, but only on the 6630 (havn't tested on any other Nokia handsets as they are not to my avail at the moment).. I tested the application on a competing handset with g3d support, which didn't fail with the ClassCastException.
The material I'm trying to duplicate is loaded at the application startup, where as the duplicate it self is not executed before the application enters the main game loop (i.e. selects start game from the menu).
Anyone had any expirience with this bizarre problem?