naushad-rahman / space-time-toolkit

Automatically exported from code.google.com/p/space-time-toolkit
0 stars 0 forks source link

Project loading quietly fails sometimes #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open a project.
2. If it works, restart STT3 and do it again
3. Eventually on my system, it fails quietly.

What is the expected output? What do you see instead?
The project appears to read, but no items are added to the SceneTree.  Now,
you can repeatedly try to open a project again, and you will never get
SceneItems.  Only stopping STT3 and restarting fixes the problem.  Maybe
this is only occurring on my system?

After debugging, the problem is occuring in
XMLModuleReader.createInstance().  With the debugger, I step to the
following line of code:
  try
  {
      return objClass.newInstance();
  } catch(...)

The debugger stops here.  objClass is a non-null class.  No Exception is
thrown.  As best I can tell, control ends up back in the ProjectReader and
the next item in the project is read.  This happens for every item/module,
though, so no SceneTree items get created.  When project reading concludes,
you have an empty SceneTree.  

Still debugging, but I did find this interesting article on Constructors
and reflection:
http://java.sun.com/docs/books/tutorial/reflect/member/ctorTrouble.html

I am implementing the ideas here, but this still has not fixed the problem.

T

Original issue reported on code.google.com by TheRest...@gmail.com on 14 Mar 2009 at 3:18

GoogleCodeExporter commented 9 years ago
One additional note.  It seems to stop execution when it hits the above code 
snippet,
and objClass == SWEProviderReader.class.  It does not go to the next item in 
the tree
or continue reading the project file from that point on.  It does not crash, 
just
stops reading the project and waits for you to try again.

Original comment by TheRest...@gmail.com on 14 Mar 2009 at 4:05

GoogleCodeExporter commented 9 years ago
The createInstance() method referenced above isis actually in
org.vast.stt.project.XMLRegistry, not XMLModuleReader

Original comment by TheRest...@gmail.com on 4 Apr 2009 at 6:12