I have a window with several prompts, whose values i change by calling a custom made keyboard screen.
After editing the values, i check each of those for their respective ranges, and if found not in the ranges, prepare a string (by string catenating) to be set later on on a multi line view in a modally executed window( an error window). The resultant string is quite long but in the size of multi line text view.
I observe various strange behaviors when i try to set the string on the multi view.
observation 1) In some cases only a small part of the string is printed, the rest of the space in the multi line view remains blank.
observation 2) while in some attempts a small part of the string is printed repeatedly till the end of the view.
observation 3) a small part of string is printed repeadtedly in one half of the the view and again the other small part of the it is printed repeatedly on the other half.
** i have tried making the multi line text view as private copy, and passing the required allocate and deallocator functions for dynamic memory but the repeated printing of small part remains same.
** i also tried increasing the display list memory as suggested in one of the threads but even that did not solve the problem.
** i can even send the code( as to how i am catenating a error message string on a global array, calling a modal window etc)
** also i have checked the catenated message string by using printf function and it has been made as required. line by line perfectly.
In reply to heman:
Good day, heman! How are things going so far? I hope you could wait for others who have idea on this issue. But, if you can't get an answer from this forum, feel free to submit a ticket to Renesas Technical Support. Best Regards, Sai RenesasRulz Forum Moderator https://renesasrulz.com/ https://academy.renesas.com/ en-us.knowledgebase.renesas.com/
In reply to Sai:
Hello heman, I'm having trouble reproducing this in my own project. Do you have a minimal application on one of kits that exhibits this problem? One thing I observed is that char local in check_validity() is not zero-ed out before calling strcat(). Contents of this buffer are undefined until they're explicitly set. If I were to make an assumption that stack area this deep is not used elsewhere, it's likely that local will contain the text from previous check_validity() invocation. strcat() will look for the first 0-byte to find the end of the buffer before appending its text - hence you would observe multiple copies in local, and then in error_string. Setting local = 0; at the beginning of check_validity() should resolve this problem. Regards
In reply to Renesas Karol: