grover
grover

Reputation: 977

Xview Memory Buffer in C

I am using a program written in C and Fortran that uses Xview to create GUIs. When I do some calculations in the program, occasionally I receive the following error which displays as a panel and halts the program:

"Notice: Insertion failed - The memory buffer is full. If this is an isolated case, you can circumvent this condition by undoing the operation you just performed, storing the contents of the subwindow to a file using the text menu, and then redoing the operation. Or, you can change the size of this buffer by changing the appropriate value in the .Xdefaults file (Text.MaxDocumentSize)."

There is a button at the bottom "Continue" and clicking it allows the program to continue without issue.

I am running a program that needs to be automated, and I cannot have the program halt and require user input. Does anyone know how to remove this notice from popping up and halting the program? I have tracked this down to something inside Xview itself and not the program I am using.

I have tried editing the .Xdefaults file and increasing the Text.MaxDocumentSize value, but this did not work.

I have also tried writing C++ programs that will continuously pass the "Enter" command to the X-Window to try to get around this when the notice panel pops up, but this did not work with Xview. It does work with other programs in X11 though.

Does anyone have any suggestions for a work-around for this?

Upvotes: 1

Views: 167

Answers (1)

user3629249
user3629249

Reputation: 16540

open your editor

edit the .Xdefaults file (probably in your home directory)

scroll down to the text: Text.MaxDocumentSize

this text is followed by a value. Increase that value, say, double it.

save the .Xdefaults file

exit the editor.

problem is solved unless you make REALLY LARGE source files, then you may want to quad the value rather than just doubling it.

Upvotes: 1

Related Questions