Openbravo Issue Tracking System - Java Client POS
View Issue Details
0014529Java Client POS(No Category)public2010-09-13 18:552011-06-03 12:22
Aliomattux 
adrianromero 
urgentmajorrandom
newopen 
20Ubuntu 10.04
2.30.1 
2.40 
0014529: In Sales panel After a few searches search button locks and entire program freezes
I use Openbravo POS for our company which sells around 7,000 products. We have 2 sales terminals. When you click search after many searches the search button will press but then the program will lock and it will not respond. I have to force logout and log back in. It appears to happen at random. I am not sure if it is an OS issue, but I am pretty sure it isnt. I have not made any modifications to the program excepts text edits and a few receipt changes and such. Its pretty much stock although I did compile it using ant on a PC.
In the sales panel click search. Search for a product. Do this any number of times and occasionally totally at random the program will lock and not respond. I am using an internal network "wired" with the latest version of Mysql on an ubuntu virtual machine via ESX. Any suggestions to alleviate the program would be deeply appreciated. Thank you.
No tags attached.
Issue History
2010-09-13 18:55AliomattuxNew Issue
2010-09-13 18:55AliomattuxAssigned To => adrianromero
2010-09-14 16:05AliomattuxNote Added: 0031044
2010-09-16 17:34adrianromeroTarget Version => 2.40
2010-09-16 17:36adrianromeroNote Added: 0031170
2010-09-16 17:40AliomattuxNote Added: 0031171
2011-06-03 10:59dalsasuaAssigned Toadrianromero => dalsasua
2011-06-03 12:22dalsasuaAssigned Todalsasua => adrianromero
2012-11-07 09:40priyamCategory01 - General => (No Category)

Notes
(0031044)
Aliomattux   
2010-09-14 16:05   
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
        at java.awt.image.DataBufferByte.<init>(DataBufferByte.java:58)
        at java.awt.image.ComponentSampleModel.createDataBuffer(ComponentSampleModel.java:397)
        at java.awt.image.Raster.createWritableRaster(Raster.java:938)
        at javax.imageio.ImageTypeSpecifier.createBufferedImage(ImageTypeSpecifier.java:1056)
        at javax.imageio.ImageReader.getDestination(ImageReader.java:2879)
        at com.sun.imageio.plugins.png.PNGImageReader.readImage(PNGImageReader.java:1232)
        at com.sun.imageio.plugins.png.PNGImageReader.read(PNGImageReader.java:1467)
        at javax.imageio.ImageIO.read(ImageIO.java:1422)
        at javax.imageio.ImageIO.read(ImageIO.java:1326)
        at com.openbravo.data.loader.ImageUtils.readImage(ImageUtils.java:109)
        at com.openbravo.pos.ticket.CategoryInfo$1.readValues(CategoryInfo.java:82)
        at com.openbravo.data.loader.JDBCSentence$JDBCDataResultSet.getCurrent(JDBCSentence.java:119)
        at com.openbravo.data.loader.BaseSentence.fetchAll(BaseSentence.java:107)
        at com.openbravo.data.loader.BaseSentence.list(BaseSentence.java:64)
        at com.openbravo.data.loader.BaseSentence.list(BaseSentence.java:54)
        at com.openbravo.pos.ticket.ProductFilterSales.activate(ProductFilterSales.java:68)
        at com.openbravo.pos.panels.JProductFinder.init(JProductFinder.java:63)
        at com.openbravo.pos.panels.JProductFinder.showMessage(JProductFinder.java:115)
        at com.openbravo.pos.panels.JProductFinder.showMessage(JProductFinder.java:102)
        at com.openbravo.pos.sales.JPanelTicket.m_jListActionPerformed(JPanelTicket.java:1630)
        at com.openbravo.pos.sales.JPanelTicket.access$1500(JPanelTicket.java:78)
        at com.openbravo.pos.sales.JPanelTicket$8.actionPerformed(JPanelTicket.java:1331)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6134)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
        at java.awt.Component.processEvent(Component.java:5899)
        at java.awt.Container.processEvent(Container.java:2023)
        at java.awt.Component.dispatchEventImpl(Component.java:4501)
(0031170)
adrianromero   
2010-09-16 17:36   
Probably the problem is because when filtering in the search window you are retrieving a lot of products and you get the "out of memory" error.

In the mean time while we are fixing the issue. Try to narrow properly the filter before listing the results in order to not to get a lot of products in the list.
(0031171)
Aliomattux   
2010-09-16 17:40   
Hi, That is not the case as it does not fail when I return all of the products. What happens is it will hold all of the information in the memory and not release it. Every time data is requested from the database in any area of the program the results are held in the memory. The search issue is not an isolated problem. It is system wide. I could ask the program to return all of my products at once several times and it would not fail. It would fail when it reached the maximum memory after continuing to hold the objects in heap. I have a detailed post of this issue and am trying to resolve it.
http://forge.openbravo.com/plugins/espforum/view.php?group_id=101&forumid=434922&topicid=7018424&topid=7018491 [^]