I think Venkat wrote:
> 
> Hi,

Note: did you know your email messages always arrive without a
subject? Kind of bad etiquette on a mailing list.

> 
> I have GUI which accepts user inputs and asserts few facts for the
> rule engine to take over after that. At the end of each cycle "most" of 
> the asserted facts are retracted. And, I have a "Idle" rule which keeps
> the engine running. 
> 
> The above works well for all standard test cases - but when
> I continuously keep asserting (abnormal case of repeatedly clicking
> the mouse on GUI on the "SEND" button) for the same set of data  (Each 
> of them are assigned different ID and hence new facts are to be 
> asserted) - the cycle works as expected upto apoint after which the 
> Engine "Just stops" - why does this happen ??? 
> 
> It works well upto a point even to this abnormal case of flooding 
> and perfectly for all the normal test cases - hence, we could rule 
> out any source code errors. Is this some sort of running out of 
> memory  problem - when the engine stops there are not more than 20 facts
> asserted. Or is it something to do with the sleep time of the Idle rule ??
> Do we have some sort of memory limit to these facts assertions - or is working
> memory the only criteria.


There are three possibilities I would investigate:

1) Thread deadlock. Jess uses synchronization to avoid internal
corruption when being accessed by multiple threads. You've got the
idle thread going as well as the assertion thread (the AWT event
handler thread.) There may be a race condition in Jess's internal
synchronization, or there may be a problem specific to your
application.  YOu can get a Thread dump of a Java app using
Control-break on WIndows, Control-\ on UNIX, in the console window the
app was started from. Wait till it hangs, then make a dump and have a
look. Threads in state 'cw' are waiting. If you see both the main
thread and the AWT-envent-handler in the CW state, you've probably got
a deadlock problem.

2) Text Widget wedging. If your GUI is dribbling text into an AWT text
widget, weird things can happen when it gets "filled up." When this
hapens is dependent on the platform, but 32K of text can cause
problems on Windows.

3) Undisplayed exceptions. Perhaps something is throwing an exception
and you are using the classic construction

try
{
           // do something interesting
}
catch (Throwable t) { /* I don't care */ }

For every Jess method you call, make sure that all thrown exceptions
will be caught and reported somewhere. Maybe you're out of memory, or
there is some other problem; looking at the exception message will
tell you.

> 
> Any suggestions are welcome.
> 
> Thanks,
> Venkat



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9214                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to