That's a very good idea - I'll try that.

Thanks again for your help

D

On Jul 14, 5:52 pm, Rujia Liu <[email protected]> wrote:
> On Wed, Jul 14, 2010 at 12:36 PM, dapdap <[email protected]> wrote:
> > Hi Rujia,
>
> > Thanks for taking the time to help.
>
> > I suspect it probably is something I'm doing. I've tried tracing
> > everything that I can and at present I just can't see where it is
> > getting the NaN coordinates.
> > I'll follow your advice and try to find the source of the problem.
>
> > The good news is that I've switched back to 3.4.2 and I've been
> > playing with the same project for over an hour without any such error.
> > Which is great as I have to submit a demo on Friday!
>
> > Can you tell me how you would 'usually' end up submitting NaN
> > coordinates? Perhaps I might be doing something similar.
>
> Well, I was creating many objects on the fly, with coordinates calculated
> from some complex calculation, which based on some external configuration
> files... sometimes the calculation function is buggy, sometimes the
> configuration file is buggy :)
>
> But once the bug comes from elsewhere: I initialized some protected
> variables in a subclass BEFORE calling super(), those variables come back to
> "uninitialized" again, in the super() call. So any calculate (including the
> coordinates) will result in NaN with the uninitialized variables.
>
> I guess you could write something like checkAll() to check all the
> coordinates of the objects and call that BEFORE rendering().
>
> - Rujia

Reply via email to