My UML code crashes the mpost or gives hundreds of errors. The code below is just a clean version of what I'm actually trying to do, but the problem arises even with this code. If I comment out two class layoutings and drawings (e.g. V, X), the code works fine. How can this be? The code is similar for each class! To me, it seems like MetaUML can't handle this many classes. That can't be the reason, can it?
I guess those layoutings are not necessary in this particular code, but the real code I'm working on needs at least a few layoutings before positioning. Don't think that could be the answer either..
I appreciate all answers and help. I'm in a hurry with this work, so the sooner the help comes the happier I am. :)
At the end is the output. It doesn't actually have any errors. When the last line is printed, mpost hangs a few seconds and then Windows gives this message and asks whether I want to send an error report:
"mpost.exe has encountered a problem and needs to close. We are sorry for the inconvenience."
I'm using Windows XP Home Edition.
First line of output of "mpost -version":
MiKTeX-MetaPost 2.4.1955 (0.901) (MiKTeX 2.4)
First line of output of "latex -version":
MiKTeX-e-TeX 2.4.1986 (2.2) (MiKTeX 2.4)
You should provide the information from both your posts, so that they can help you effectively.
My best guess is to use the latest version of "TeX Live" - but I use metapost on Linux and I don't have direct experience with the Windows distributions.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My UML code crashes the mpost or gives hundreds of errors. The code below is just a clean version of what I'm actually trying to do, but the problem arises even with this code. If I comment out two class layoutings and drawings (e.g. V, X), the code works fine. How can this be? The code is similar for each class! To me, it seems like MetaUML can't handle this many classes. That can't be the reason, can it?
I guess those layoutings are not necessary in this particular code, but the real code I'm working on needs at least a few layoutings before positioning. Don't think that could be the answer either..
I appreciate all answers and help. I'm in a hurry with this work, so the sooner the help comes the happier I am. :)
-Jaakko
--- CODE STARTS ---
input metauml;
beginfig(1);
% Classes
ClassName.A("A");
ClassName.B("B");
ClassName.C("C");
ClassName.D("D");
ClassName.E("E");
ClassName.F("F");
ClassName.G("G");
ClassName.H("H");
ClassName.I("I");
ClassName.J("J");
ClassName.K("K");
ClassName.L("L");
ClassName.M("M");
ClassName.N("N");
ClassName.O("O");
ClassName.P("P");
ClassName.Q("Q");
ClassName.R("R");
ClassName.S("S");
ClassName.T("T");
ClassName.U("U");
ClassName.V("V");
ClassName.X("X");
% Layouting (so sizes can be used)
Class_layout A;
Class_layout.B;
Class_layout.C;
Class_layout.D;
Class_layout.E;
Class_layout.F;
Class_layout.G;
Class_layout.H;
Class_layout.I;
Class_layout.J;
Class_layout.K;
Class_layout.L;
Class_layout.M;
Class_layout.N;
Class_layout.O;
Class_layout.P;
Class_layout.Q;
Class_layout.R;
Class_layout.S;
Class_layout.T;
Class_layout.U;
Class_layout.V;
Class_layout.X;
% Positioning
leftToRight.top(5)(A,B,C,D,E,F,G,H,I,J,K,L);
leftToRight.top(5)(M,N,O,P,Q,R,S,T,U,V,X);
topToBottom.left(5)(A,M);
% Drawing
drawObject(A);
drawObject(B);
drawObject(C);
drawObject(D);
drawObject(E);
drawObject(E);
drawObject(F);
drawObject(G);
drawObject(H);
drawObject(I);
drawObject(J);
drawObject(K);
drawObject(L);
drawObject(M);
drawObject(N);
drawObject(O);
drawObject(P);
drawObject(Q);
drawObject(R);
drawObject(S);
drawObject(T);
drawObject(U);
drawObject(V);
drawObject(X);
endfig;
end
--- CODE ENDS ---
Can you please post the error output that you are receiving and the version of your metapost / latex system? (I use mpost -version on my Linux system)
At the end is the output. It doesn't actually have any errors. When the last line is printed, mpost hangs a few seconds and then Windows gives this message and asks whether I want to send an error report:
"mpost.exe has encountered a problem and needs to close. We are sorry for the inconvenience."
I'm using Windows XP Home Edition.
First line of output of "mpost -version":
MiKTeX-MetaPost 2.4.1955 (0.901) (MiKTeX 2.4)
First line of output of "latex -version":
MiKTeX-e-TeX 2.4.1986 (2.2) (MiKTeX 2.4)
Is this the information you asked?
--- OUTPUT STARTS ---
(uml_gui.mp (C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml.mp
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\util_infrastructure.mp
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\util_log.mp))
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\util_object.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\util_commons.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\util_margins.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\util_picture.mp
(C:\Program Files\ProTeXt\MiKTeX\metapost\base\boxes.mp))
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\util_group.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\util_picture_stack.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\util_positioning.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\util_shade.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_base.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_links.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_paths.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_note.mp
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_defaults.mp))
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_stereotype.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_class_clipart.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_class.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_instance.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_class_relations.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_class_assoc.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_package.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_package_relations.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_behavioral_common.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_activity.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_state.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_usecase_clipart.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_usecase.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_behavioral_common.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_activity.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_state.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_usecase_clipart.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_usecase.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_component.mp)
(C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_component_relations.m
p) (C:\Program Files\ProTeXt\MiKTeX\metapost\metauml\metauml_templates.mp))
--- OUTPUT ENDS ---
Considering this, I think is best to post this question to the MetaPost mailing list, as it apparently is a metapost bug:
http://www.tug.org/mailman/listinfo/metapost
You should provide the information from both your posts, so that they can help you effectively.
My best guess is to use the latest version of "TeX Live" - but I use metapost on Linux and I don't have direct experience with the Windows distributions.
OK. Thank you for the help!
I sent mail to the mailing list, and now I hope that somebody there has the answer. :)