Menu

Out of memory when migrating from WinXP to Win7

goulou910
2015-03-20
2015-03-23
  • goulou910

    goulou910 - 2015-03-20

    Hi,
    [First, thanks a lot for your fork] I face today an issue with WhiteStarUML when migrating from WinXP to Win7; initially, I wrote a large program (1000' of source line code) to generate .xml-dbus, .xml-dita... files (e.g. more than 500 files generated by one script) for StarUML on Windows XP 32 bits machine: the script runs fine on this old machine with 2GB of RAM and less than 1GB free.
    With WhiteStarUML 5.5.6 on the same XP machine, all my scripts run fine. Taking account WinXP is no more maintained, I desire to migrate to Win7 or more recent Windows OS: I have a second strong 64bits machine with Win7 and 16GB of RAM and more than 9GB free.
    If I try to run to run on this strong machine the same script with WhiteStartUML 5.6.1 32b running well on the XP machine, the same script stops in few milliseconds with he fatal error 'Out of Memory'. If I cut ~600 lines of source code, the script runs fine!
    With StarUML, I already 'tested' this problem (and also the 'Out of stack' error) but I always success to turn around these difficulties; today I can't explain why its works en WinXP and failed on Win7 and how can I solve this problem (JS stack engine issue, WhiteStarUML memory limitation... I don't know!).
    Do you have an idea to solve this problem ?
    Thanks a lot!
    Goulven
    PS: one of my script also generates sequence diagrams from dbus-monitor output logs, fantastic! thanks a lot for your works!

     
  • Janusz Szpilewski

    I do not have detailed knowledge how differs handling memory in a process on WinXP and Win7. I just think it is rather expected that WinXP is more optimized to consume less memory than Win7 and on both platforms the limit for a single 32 bit process is 2 GB.

    I think you should take a look at the 64 bit version of WhiteStarUML in the folder Files/Win64. It is the main program with one plugin so far but for your usage may be enough. It works correctly when launched from an external script using out of process COM and in this case no memory limits should kick in. It may be worse if it is the script that crashes as the scripting engine was not ported to 64 bit by Microsoft and even on a 64 bit platform it is still 32 bit process. But you can always run a test.

     
  • Anonymous

    Anonymous - 2015-03-20

    Thanks for your quick answer! I installed WhiteStarUML 64bits on my strong office machine with Win7 (and on my home PC now) but I don't find the classic entry of

    <Tools><Documentation generation=""> where scripts could be classicaly found and putting good files and directories containing script entries in good dir (i.e. <INSTALL_DIR><Modules><staruml-generator><templates><...>) does not have any effect.

    As you said in <<MENU>><<Tools>> I could find <<Options>> and <<Add-in manager="">> but only these!
    Where can I put my scripts files on the HDD and how could I use them with the 64bits version of WhiteStarUML ?

    By the way, my scripts use ActiveX components (to access WhiteStarUML application itself, to access Excel, to access R&W DOS files...)

    Thanks for your answer!

     
  • Janusz Szpilewski

    As I briefly mentioned before most plugins except XMI generator are not ported yet to 64 bits. But I am not sure why you need the Documentation generator plugin to execute a script. The only functionality which Generator passes to script is a logging object. Some other scripts execute like independent stand-alone processes using COM to set up communication with (White)StarUML. So simply you may just double click your script in Windows Explorer and it will find WhiteStarUML and connect to it.

     
    • Anonymous

      Anonymous - 2015-03-21

      OK I'll try it on Monday; have a good week-end!
      Regards

       
  • goulou910

    goulou910 - 2015-03-23

    Hi Janusz,
    I tried your suggestion: a) full uninstall of WSU, b) full Win7 registry cleaning, c) full reinstall of WSU 5.6.2 64b with recommended installation parameters, d) thanks to the Explorer, double-click on my 'template.cot' script file -> WSU is automatically launched (because before I explicitly associated .cot files and WSU), e) the 'New project by approach' WSU windows popup, I select my desired .uml file thanks to the thumbnail 'Recent files' and I click on OK -> my UML modeling opens in WSU and... the script is not launched! Grrr.
    If at point d) I double-click on my .cot StarUML 32bits script file (on with the ActiveX object string has been change from "StarUML.StarUMLApplication" to "WhiteStarUML.WhiteStarUMLApplication" it works fine) taking account before reinstallation I delete association .cot with WSU application, there is no COM link between my .cot file and WSU created at installation phase so there is no reason WSU starts and It doesn't start. If I remove the 64bits version and install 32bits version, asking my .cot script file to be opened by WSU 32bits then indicating on which .uml file the script must be launch thanks to the 'recent files' thumbnail, the final result is the same: .uml file is opened but the script is not launched.

    If you have an idea?!... Another question: which part of script code is Large Memory Consumer? In another words, which kind of code must I rewrite to optimize it to avoid the final error and so to allow my script (in it full acceptance ;-)) to run fine ?
    There is no error in my script, it runs fine with WSU 5.6.1 32b on XP machine and it runs fine on WSU 5.6.2 64b if I remove about 300 (useful!) source code line and when I say the script does not run fine it is when the script is loaded the 'Out of memory' error appears while not a single track line has appeared in the message window knowing that the first line of the script (except the opening of the ActiveX) is the writing of one trace in this window.
    Best regards
    Goulven

     

    Last edit: goulou910 2015-03-23
  • Janusz Szpilewski

    If I understand well you expect a script to be launched when a project file (.uml) is opened. My last suggestion was to run externally a script file (.js or .vbs) with the project being already open. You may verify it with existing sequence to collaboration diagram converters that work the same way when you launch ConvCol2Seq.vbs or ConvSeq2Col.vbs directly or use Model - Convert diagram option in WS.

    Documentation generator is slightly different. It loads the script to the program memory space to inject a logging object into it. The problem in this case is that script code, scripting runtime and the main program share the same memory space what may hit the 32 bit memory limit.

    If you do not need a logger or any initial setup you should run the script externally (like sequence-collaboration converters) what will create it in its own process with separate memory space and limits and will work with both 32 bit and 64 bit WhiteStarUML.

     

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.