Newsgroups: comp.windows.x Path: utzoo!utgpu!watserv1!watmath!hyper.hyper.com!walter From: walter (Walter Steinemann) Subject: HELP - XmStringCreateLtoR Message-ID: <1991Apr29.192748.12558@hyper.hyper.com> Sender: walter@hyper.hyper.com (Walter Steinemann) Organization: HyperCube Inc. Date: Mon, 29 Apr 1991 19:27:48 GMT I have the following in many places within my code: char msg[80]; XmString xmMessage; ... msg gets seto to some short string (20-30 bytes)... xmMessage = XmStringCreateLtoR( msg, XmSTRING_DEFAULT_CHARSET ); I get the message "Error: Cannot perform malloc" (nothing else) and my application exits (no core file), but not always on the same call to XmStringCreateLtoR. My application code does not use this string, but I have found that this string is in libXt.a, in the Alloc.c section. I thought perhaps the Motif Library had some build in limit on the number of compound strings, so I inserted calls to XmStringFree for all my XmStringCreates - but the error still occurs. [BTW, when is it safe to do the free? ... after that SetArg or after the SetValues, or does it need to be done much later??] Am I doing something wrong? Is something wrong with Motif or Xt? We have Motif 1.1.1 and IRIX 3.3.2 on a PI 4D/25. Thanks for any help you can give me, -- WalteR -- -- Walter R. Steinemann HYPERCUBE, INC. #7-419 Phillip Street Phone: (519) 725-4040 Waterloo, Ontario email: walter@hyper.com N2L 3X2