Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022572Openbravo ERPA. Platformpublic2012-12-13 18:452012-12-17 13:34
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
 
3.0MP193.0MP19 
AugustoMauch
Core
No
0022572: Invalid preference value results in stack overflow when reading properties
When having a preference value which only consists of a [ (a bracket) then you get a stackoverflow exception.

a88e7e7a 2012-12-13 17:34:30,869 [ajp-8008-2] ERROR org.openbravo.client.application.PropertiesComponent - null id: OBUIAPP_RecentViewList value: [
java.lang.StackOverflowError
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:86)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:96)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
    at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:110)
    at org.codehaus.jettison.json.JSONTokener.nextValue(JSONTokener.java:313)
Goto the preference window and create a preference, for example recentview with as value only a [

Restart or relogin
This should be made robust so that the system ignores the preference and reports it in the log.
The attached diff solves it.
No tags attached.
diff stack_overflow.diff (1,397) 2012-12-13 18:45
https://issues.openbravo.com/file_download.php?file_id=5831&type=bug
Issue History
2012-12-13 18:45mtaalNew Issue
2012-12-13 18:45mtaalAssigned To => mtaal
2012-12-13 18:45mtaalFile Added: stack_overflow.diff
2012-12-13 18:45mtaalModules => Core
2012-12-13 18:45mtaalTriggers an Emergency Pack => No
2012-12-13 18:46mtaalReview Assigned To => AugustoMauch
2012-12-13 19:01hgbotCheckin
2012-12-13 19:01hgbotNote Added: 0054924
2012-12-13 19:01hgbotStatusnew => resolved
2012-12-13 19:01hgbotResolutionopen => fixed
2012-12-13 19:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2de5e4f708d8b97aeaff71f13f6c80ae27b528ae [^]
2012-12-14 12:16AugustoMauchNote Added: 0054944
2012-12-14 12:16AugustoMauchStatusresolved => closed
2012-12-14 12:16AugustoMauchFixed in Version => 3.0MP19
2012-12-17 13:34hudsonbotCheckin
2012-12-17 13:34hudsonbotNote Added: 0055007

Notes
(0054924)
hgbot   
2012-12-13 19:01   
Repository: erp/devel/pi
Changeset: 2de5e4f708d8b97aeaff71f13f6c80ae27b528ae
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Dec 13 19:01:30 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2de5e4f708d8b97aeaff71f13f6c80ae27b528ae [^]

Fixes issue 22572: Invalid preference value results in stack overflow when reading properties
Make building client side properties more robust.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/PropertiesComponent.java
---
(0054944)
AugustoMauch   
2012-12-14 12:16   
Code reviewed and verified in pi@3db450e737fd
(0055007)
hudsonbot   
2012-12-17 13:34   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c79ef1b1f830 [^]

Maturity status: Test