[ 
http://issues.apache.org/jira/browse/OFBIZ-259?page=comments#action_12459497 ] 
            
Jacques Le Roux commented on OFBIZ-259:
---------------------------------------

After some time on point 3 and a lot of test with different posiblities I can 
see today how to manage with this hanging !

The problem comes from  line 219 of  PosDialog.java
       dialog.setVisible(true);

The thread is locked by line 558 of jawa.awt.Dialog (I use jdk 1.5.0_07 in 
Eclipse in debug mode)
     getTreeLock().wait();

and I can't see any solutions for now. Perhaps after a rest some new ideas will 
come ?

If somebofy have ever been trapped by this kind of problem and know a solution 
here is the thread stack :

Thread [Thread[Thread-4,5,main]] (Suspended)    
        owns: java.util.Vector<E>  (id=54)      
        owns: org.ofbiz.pos.jpos.service.KeyboardService  (id=55)       
        owns: org.ofbiz.pos.adaptor.KeyboardAdaptor$KeyboardListener  (id=14)   
        waiting for: java.awt.Component$AWTTreeLock  (id=53)    
        java.lang.Object.wait(long) line: not available [native method] [local 
variables unavailable]   
        java.awt.Component$AWTTreeLock(java.lang.Object).wait() line: 474 
[local variables unavailable] 
        javax.swing.JDialog(java.awt.Dialog).show() line: 558 [local variables 
unavailable]     
        javax.swing.JDialog(java.awt.Component).show(boolean) line: 1300        
        javax.swing.JDialog(java.awt.Component).setVisible(boolean) line: 1253  
        org.ofbiz.pos.screen.PosDialog.showDialog(java.awt.Container, 
org.ofbiz.pos.screen.DialogCallback, java.lang.String) line: 219  
        org.ofbiz.pos.screen.PosScreen.showDialog(java.lang.String, 
org.ofbiz.pos.screen.DialogCallback, java.lang.String) line: 334    
        org.ofbiz.pos.screen.PosScreen.showDialog(java.lang.String) line: 317   
        org.ofbiz.pos.event.MenuEvents.addItem(org.ofbiz.pos.screen.PosScreen, 
java.awt.AWTEvent) line: 190     
        
org.ofbiz.pos.event.MenuEvents.triggerEnter(org.ofbiz.pos.screen.PosScreen, 
java.awt.AWTEvent) line: 113        
        sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, 
java.lang.Object, java.lang.Object[]) line: not available [native method]       
 
        sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, 
java.lang.Object[]) line: 39      
        sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, 
java.lang.Object[]) line: 25  
        java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) 
line: 585        
        
org.ofbiz.pos.config.ButtonEventConfig.invoke(org.ofbiz.pos.screen.PosScreen, 
java.awt.AWTEvent) line: 202      
        
org.ofbiz.pos.config.ButtonEventConfig.invokeButtonEvent(java.lang.String, 
org.ofbiz.pos.screen.PosScreen, java.awt.AWTEvent) line: 102 
        
org.ofbiz.pos.config.ButtonEventConfig.invokeButtonEvents(java.util.List, 
org.ofbiz.pos.screen.PosScreen) line: 75      
        
org.ofbiz.pos.device.impl.Keyboard$1.dataOccurred(jpos.events.DataEvent) line: 
72       
        
jpos.POSKeyboard$POSKeyboardCallbacks.fireDataEvent(jpos.events.DataEvent) 
line: not available  
        
org.ofbiz.pos.jpos.service.KeyboardService(org.ofbiz.pos.jpos.service.BaseService).fireEvent(java.lang.Object)
 line: 168        
        org.ofbiz.pos.jpos.service.KeyboardService.receiveData(int[], char[]) 
line: 143 
        org.ofbiz.pos.adaptor.KeyboardAdaptor$KeyboardListener.sendData() line: 
173     
        org.ofbiz.pos.adaptor.KeyboardAdaptor$KeyboardListener.run() line: 215  


> Character buffer is out of synch with enter key...
> --------------------------------------------------
>
>                 Key: OFBIZ-259
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-259
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: pos
>         Environment: Tested on FC3 and Win2K, using plain keyboard entry and 
> Metrologic scanner MS9520
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>
> From Ray Barlow
> Whenever the enter key is pressed (or sent via the scanner) it is imediately 
> being processed and what are effectively preceding characters get pushed to 
> the back of the buffer.
> For example with the scanner configured to send a CR suffix with the barcode, 
> which all works well when tested in text editor environment, the till will 
> process the CR code in front of the barcode. The barcode is left sitting up 
> on the screen and the log files shows that a 500 enter code was received. On 
> a subsequent scan the product is added as it is sitting in the buffer before 
> the next pre-emptive CR key comes in, and that SKU is left in the visible 
> buffer.
> This can also be reproduced by entering characters on the keypad and pressing 
> enter at a reasonable rate. You will invariably get ahead of the SKU code and 
> end up seeing the product not found screen, and when you close that the 
> buffer will show the few characters that were beaten by the enter key.
> I am guessing there is some sort of synch issue with the buffer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to