This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Infinite loop in PrettyWriter


Hi Per,

When I was testing my program, certain string (FString really) will
cause the program to hang. I traced the problem to the code to

  gnu.text.PrettyWriter.

Inside the method indexColumn(), the loop 


        while (todo > 0)
        {
           ...
            int size = getQueueSize(op);
            
            todo -= size;
            op += size;
        }

But, in some cases, size will be zero and todo never reaches 0. I think
this can be a bigger problem that's beyond my knowledge of the 
implementation details.


Wen-Chun


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]