Re: [Dev] Random errors from UUF

2016-01-12 Thread Sajith Ariyarathna
Hi Sumedha,

Seems like this is a concurrency problem. That's why the issue appears
randomly. According to this [1] email thread, issue is in the Handlebars
library (in UUF we use handlebars-v2.0.0.js library). Seems like
handlebars.js library is not thread-safe [2].

In UUF, a separate Handlebars environment is created from a shared root
Handlebars environment [3] for each HTTP request. Hence, the root
Handlebars environment is shared between threads (HTTP requests). However
the 'Handlebars.compile()' function is not thread-safe. That is the reason
behind  this issue.

I have fixed this problem by eliminating the shared root Handlebars
environment. See PR [4].

[1] http://mail.openjdk.java.net/pipermail/nashorn-dev/2015-May/004482.html
[2] https://github.com/wycats/handlebars.js/issues/1031
[3]
https://github.com/wso2-incubator/uuf-template-app/blob/IoTS-1.0.0-M1/base-ui/org.wso2.carbon.uuf.ui.feature/src/main/resources/jaggeryapps/uuf-app/lib/modules/handlebars/handlebars.js#L658-L665
[4] https://github.com/wso2-incubator/uuf-template-app/pull/17

Thanks.

On Tue, Jan 12, 2016 at 11:46 AM, Sajith Ariyarathna 
wrote:

> will look into this
>
> On Tue, Jan 12, 2016 at 11:29 AM, Sumedha Rubasinghe 
> wrote:
>
>> Sajith/Manu,
>> Experiencing some random UI errors from UUF/template App.
>> Attached some screenshots @ https://wso2.org/jira/browse/IOTS-13.
>>
>> Could you please check?
>>
>>
>>
>> --
>> /sumedha
>>
>>
>
>
> --
> Sajith Ariyarathna
> Software Engineer; WSO2, Inc.;  http://wso2.com/
> mobile: +94 77 6602284, +94 71 3951048
>



-- 
Sajith Ariyarathna
Software Engineer; WSO2, Inc.;  http://wso2.com/
mobile: +94 77 6602284, +94 71 3951048
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Random errors from UUF

2016-01-11 Thread Sumedha Rubasinghe
Sajith/Manu,
Experiencing some random UI errors from UUF/template App.
Attached some screenshots @ https://wso2.org/jira/browse/IOTS-13.

Could you please check?



-- 
/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Random errors from UUF

2016-01-11 Thread Sajith Ariyarathna
will look into this

On Tue, Jan 12, 2016 at 11:29 AM, Sumedha Rubasinghe 
wrote:

> Sajith/Manu,
> Experiencing some random UI errors from UUF/template App.
> Attached some screenshots @ https://wso2.org/jira/browse/IOTS-13.
>
> Could you please check?
>
>
>
> --
> /sumedha
>
>


-- 
Sajith Ariyarathna
Software Engineer; WSO2, Inc.;  http://wso2.com/
mobile: +94 77 6602284, +94 71 3951048
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev