Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349649

Summary: [Table] JavaScript Error when disposing the table in same cases
Product: [RT] RAP Reporter: Sabine Neubauer <neubauer>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: alex_straub, beirti.x.onunain
Version: 1.4   
Target Milestone: 1.5 M1   
Hardware: All   
OS: All   
Whiteboard: sr141
Attachments:
Description Flags
JavaScript Code of error console
none
Patch of table.js
none
Proposed patch for v14_Maintenance branch
ivan: review?, rsternberg: review+
Used client.js with further problem none

Description Sabine Neubauer CLA 2011-06-17 03:01:15 EDT
Build Identifier: 

In our application which uses RAP 1.4 (RC2) libraries we use content proposals in order to provide autocompletion in context of search text fields and cell editors. 

The following Javascript error occurs if the user closes the proposal popup by pressing ESC while the proposals are still filled in. It is very easy to reproduce in our context by using the cell editors. The proposal popup of the search text field seems to be more robust.

Javascript error occurred:

'this._rows.length' ist Null oder kein Objekt

I have reproduced the problem on Linux as well as on Windows 7. The browsers I used are Internet Explorer 8, Firefox 3.6 and Firefox 4.0.

I tried to create a snippet for reproducing the problem but with no success. It seems that the computation (time) of the proposals affects the occurrence of this problem. However, it is not possible to me to simulate this by a small snippet.

Reproducible: Sometimes
Comment 1 Ivan Furnadjiev CLA 2011-06-17 03:08:05 EDT
Sabine, could you provide the complete text from the JavaScript error page when running in Firefox?
Comment 2 Ivan Furnadjiev CLA 2011-06-17 03:15:14 EDT
And one more thing... would you mind to test your application against CVS HEAD? Recently we merged the client-side Tree and Table code (see bug 332524) in HEAD and probably the bug does not occur any more.
Comment 3 Sabine Neubauer CLA 2011-06-17 03:29:21 EDT
Created attachment 198161 [details]
JavaScript Code of error console

(In reply to comment #1)
> Sabine, could you provide the complete text from the JavaScript error page when
> running in Firefox?

This is the complete text of the error page. There are no more information.

In the error console I can access the js code and there I get the information that the error occurs in line 61454. I attach the code and hope this help you understanding and solving my problem.

I will test our application against CVS HEAD as soon as possible.
Comment 4 Ivan Furnadjiev CLA 2011-06-17 04:21:56 EDT
Thanks for the information. I can see where is the problem - the request for resolving items is not sent immediately, but it's scheduled to execute in next 500 ms. It's possible in this time frame to dispose the Table (execute Table destruct and set this._rows to null) before the execution of Table.js#_sendResolveItemsRequest. Probably, this bug does not exist in CVS HEAD.
Comment 5 Sabine Neubauer CLA 2011-06-17 11:24:54 EDT
Created attachment 198187 [details]
Patch of table.js

I tested our application against CVS HEAD and there the problem does not exist.

Furthermore, I patched Table.js#_sendResolveItemsRequest in our used bundles by adding a check if this._rows is null. Now the java script error does not occur anymore and all works fine.

Thanks for your help.

@Ivan: Is it possible to fix this issue like in the patch on the v14_Maintenance branch?
Comment 6 Ivan Furnadjiev CLA 2011-06-17 11:47:28 EDT
Created attachment 198189 [details]
Proposed patch for v14_Maintenance branch

The patch skips the code in Table.js#_sendResolveItemsRequest if Table is disposed. Sabine, could you check this patch too? Thanks
Comment 7 Sabine Neubauer CLA 2011-06-20 03:01:27 EDT
(In reply to comment #6)
> Created attachment 198189 [details]
> Proposed patch for v14_Maintenance branch
> 
> The patch skips the code in Table.js#_sendResolveItemsRequest if Table is
> disposed. Sabine, could you check this patch too? Thanks

The patch solves the problem in our context. It would be great to have this fix on RAP 1.4. Thanks.
Comment 8 Sabine Neubauer CLA 2011-07-12 03:22:44 EDT
Created attachment 199469 [details]
Used client.js with further problem

Unfortunately, the problem is not yet solved. There is a further problem which is located in the _onClientAreaMouseMove method. I attach the used client.js. The error message on IE is the following:

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET
CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3;
MS-RTC LM 8; .NET4.0C; .NET4.0E)
Timestamp: Wed, 6 Jul 2011 14:18:01 UTC

Message: 'null' is null or not an object
Line: 170
Char: 32390
Code: 0
URI: ...
Comment 9 Ivan Furnadjiev CLA 2011-07-12 03:46:42 EDT
(In reply to comment #8)
Sabine, I think that this is a completely different issue. Would you mind to open a separate bug for it? Can you provide a snippet to reproduce it? Is this IE issue only? The code in Table.js#_onClientAreaMouseMove is executed only if cell tooltips are activated. Do you have cell tooltips active?
Comment 10 Sabine Neubauer CLA 2011-07-12 10:20:22 EDT
(In reply to comment #9)
Thanks for your response. I opened issue 351849 and tried to answer your questions there.
Comment 11 Ivan Furnadjiev CLA 2011-07-20 04:16:04 EDT
*** Bug 352535 has been marked as a duplicate of this bug. ***
Comment 12 Ivan Furnadjiev CLA 2011-07-21 06:16:19 EDT
*** Bug 352535 has been marked as a duplicate of this bug. ***
Comment 13 Ivan Furnadjiev CLA 2011-07-26 04:11:15 EDT
Applied patch to v14_Maintenance branch.
Comment 14 Ivan Furnadjiev CLA 2011-08-22 05:53:44 EDT
*** Bug 355353 has been marked as a duplicate of this bug. ***