Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013712Openbravo ERPA. Platformpublic2010-06-21 18:432011-11-17 10:30
shuehner 
iperdomo 
normalminorhave not tried
closedout of date 
5
pi 
 
No
Core
No
0013712: DirectLinking has race condition between opened window and the menuFrame content.
Using direct linking both some window/tab and the menu are loaded at the same time. As all windows have a data dependency on data inside the menuFrame (i.e. all data coming from DynamicJS) this opens a race-condition, making the opened window fails if its request finished before finishing the menu-load.

Because of the nature of a race condition this failure case only happens somtimes....

Easy way to get it to reprodce always is to change VerticalMenu.java and add a 2s sleep time via Thread.sleep to the menuFrame processing to make it much slower.
I.e. follow steps in support ticket8143..
No tags attached.
related to defect 0014160 closed dbaz "arrMessages is undefined" error when openning a window 
related to defect 0014566 closed mtaal 3.0RC2: In manual window in a randomly basis the content of the window is empty 
diff VerticalMenu.java.diff (570) 2010-08-12 11:18
https://issues.openbravo.com/file_download.php?file_id=2843&type=bug
diff messages.js.diff (373) 2010-08-12 11:28
https://issues.openbravo.com/file_download.php?file_id=2845&type=bug
Issue History
2010-06-21 18:43shuehnerNew Issue
2010-06-21 18:43shuehnerAssigned To => alostale
2010-06-21 18:43shuehnerOBNetwork customer => No
2010-06-21 18:49shuehnerNote Added: 0028636
2010-06-21 19:00iciordiaStatusnew => acknowledged
2010-06-21 19:00iciordiaAssigned Toalostale => iperdomo
2010-06-21 19:00iciordiaStatusacknowledged => scheduled
2010-06-21 19:00iciordiafix_in_branch => pi
2010-08-12 11:05iperdomoRelationship addedrelated to 0014160
2010-08-12 11:18iperdomoFile Added: VerticalMenu.java.diff
2010-08-12 11:19iperdomoNote Added: 0029908
2010-08-12 11:28iperdomoFile Added: messages.js.diff
2010-08-16 09:15iperdomoNote Added: 0029978
2010-08-16 09:15iperdomoStatusscheduled => closed
2010-08-16 09:15iperdomoResolutionopen => no change required
2010-08-16 17:55iperdomoNote Added: 0030028
2010-08-16 17:55iperdomoStatusclosed => new
2010-08-16 17:55iperdomoResolutionno change required => open
2010-08-16 18:40iperdomoStatusnew => scheduled
2010-09-15 17:33shuehnerRelationship addedrelated to 0014566
2011-11-17 10:30iperdomoNote Added: 0042911
2011-11-17 10:30iperdomoStatusscheduled => closed
2011-11-17 10:30iperdomoResolutionopen => out of date

Notes
(0028636)
shuehner   
2010-06-21 18:49   
Note this only applies to usage of DirectLinking, as normal erp usage never opens a window/tab at the same time with a menu. So its garanteed that the menuFrame is always present before/when opening a window.
(0029908)
iperdomo   
2010-08-12 11:19   
As shuener mentioned, the easiest way to reproduce the issue is a sleep in the Menu generation. Attached a simple .diff
(0029978)
iperdomo   
2010-08-16 09:15   
The fix was applied in issue 0014160
(0030028)
iperdomo   
2010-08-16 17:55   
Reopened as we'll try to synchronize the loading of the application. Note: This will add a bit of latency.

The idea is when doing deep-linking, store the source of the application frame, and on the 'onload' event of the Menu, set the location of the right frame. With this strategy we synchronize the loading of the application. The Menu will always be available for the right frame.
(0042911)
iperdomo   
2011-11-17 10:30   
The race condition has not been reported in any 2.50 production system. The support ticked mentioned here was closed several months ago.

In Openbravo 3, the direct-link is a totally different component and doesn't rely on the Menu.html servlet.