Menu

Re-linking missing elements?

Anonymous
2016-03-21
2016-03-23
  • Anonymous

    Anonymous - 2016-03-21

    One of my more complicated models became corrupted, resulting in an "Invalid class typecast" error whenever I would try to load it. I was eventually able to narrow down the problem to a problem with one particular Unit, and the only way I could find to get the model to load was by dropping and reloading the unit. Unfortunately now all the references in the rest of the model to the elements in the reloaded Unit are appearing with an "(M)", which I presume stands for "Missing".

    Is there any way to fix these? There are far too many to try to fix by hand.

     
  • Janusz Szpilewski

    Did you get "Invalid class typecast" with a recent version WhiteStarUML? I hoped it was fixed.I have no idea if the model can be fixed after such a problem. Maybe try to separate a minimal submodel that shows that error and send it to me. Debugger should show info more about it.

     
    • Anonymous

      Anonymous - 2016-03-22

      This was in 5.7.2.0. Without even the vaguest hint where the problem is occuring, trying to narrow down to something minimal is probably just as much work as manually fixing the links.

      I don't have a Delphi stack, so I presume that preclude active debugging. Besides the high-level activity shown in the Output pane, is there any lower-level trace info available?

       
  • Janusz Szpilewski

    In your previous post you mentioned that that problem was occuring when loading some specific unit. Does it happen all the time? Maybe you could just send that unit with some part of the main project loading it. I would need to try to reproduce the problem and debug it in the development environment.

     
    • Peter Halverson

      Peter Halverson - 2016-03-23

      It looks like a specific interference between the main model and the unit. I was able to load the unit into a new model without any problems, and then re-save the unit. But I was still unable to open the original model.

      I appreciate your kind offers of assistance, but it's looking like I'm just going to have to go forward with what I got. Fortunately it's just a "soft" model for documentation and reflection (vs a "hard" model for code engineering), so I can still muddle by even with the unresolved references (and rebind those on a case-by-case basis where necessary).

       
  • Janusz Szpilewski

    Once in the past I worked on a similar problem happening when loading the main project file and it led to some function GetObjectByName that was hapilly returning a random object when it was asked for an object with empty name. I fixed that but now it seems that it might have a twin somewhere in the code related to handling units. You could verify if there are any XML tags without 'name' attributes somewheres in the unit files.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.