Dear SmartGWT Team,
Version:
SmartClient Version: SC_SNAPSHOT-2011-01-06/PowerEdition Deployment (built 2011-01-06) / GWT 1.7.1
Browser:
Internet Explorer 8 on Windows. I'm using NetBeans 6.9.1 which I believe uses the OS's IE in the IDE, where I get this error.
Background:
When I call fetch data on a data-bound list grid, the appropriate call on the service gets invoked. That method puts together a neat looking list of columns (i.e. no nulls, or anything unusual), and returns to handleDSRequest which just never seems to return to the client. It looks like the app crashed!
To test if it really never returns, I put a data arrived handler on the grid with a simple SC.say(..) message box. To my surprise the box popped up, so the data service returned the data to the client. Now if I hit ok on the box, the data is in the grid. But if I take the message box out, there is no data in the grid, and 'Contacting Server...' is stuck on the screen forever.
This seems to me to be a classic race condition, since the message box is blocking the JS thread, which changes what order the threads get executed. Since the message is stuck on the screen, I'm guessing that the UI thread was blocking the out of JS thread data access from completing and populating the grid. By putting in the message box I am yielding access to other threads: the http responses. Am I correct? (I know JS is technically really single threaded. I am using the word 'thread' in a conceptual sense, how things look from outside the black box)
That's my guess. But I am not sure what I can do about it. In my opinion this kind of stuff should never happen in a high level library, since I have no access to the inside of the code to debug it. The library should handle synchronization or generate an error if it can't. If it finds a resource in an inconsistent state, it should throw an exception. It should not just hang.
My question:
What is actually changed deep inside by putting that SC.say() in? Because that 'fixed' the problem. Any suggestion or idea would be greatly appreciated.
-kornel
Version:
SmartClient Version: SC_SNAPSHOT-2011-01-06/PowerEdition Deployment (built 2011-01-06) / GWT 1.7.1
Browser:
Internet Explorer 8 on Windows. I'm using NetBeans 6.9.1 which I believe uses the OS's IE in the IDE, where I get this error.
Background:
When I call fetch data on a data-bound list grid, the appropriate call on the service gets invoked. That method puts together a neat looking list of columns (i.e. no nulls, or anything unusual), and returns to handleDSRequest which just never seems to return to the client. It looks like the app crashed!
To test if it really never returns, I put a data arrived handler on the grid with a simple SC.say(..) message box. To my surprise the box popped up, so the data service returned the data to the client. Now if I hit ok on the box, the data is in the grid. But if I take the message box out, there is no data in the grid, and 'Contacting Server...' is stuck on the screen forever.
This seems to me to be a classic race condition, since the message box is blocking the JS thread, which changes what order the threads get executed. Since the message is stuck on the screen, I'm guessing that the UI thread was blocking the out of JS thread data access from completing and populating the grid. By putting in the message box I am yielding access to other threads: the http responses. Am I correct? (I know JS is technically really single threaded. I am using the word 'thread' in a conceptual sense, how things look from outside the black box)
That's my guess. But I am not sure what I can do about it. In my opinion this kind of stuff should never happen in a high level library, since I have no access to the inside of the code to debug it. The library should handle synchronization or generate an error if it can't. If it finds a resource in an inconsistent state, it should throw an exception. It should not just hang.
My question:
What is actually changed deep inside by putting that SC.say() in? Because that 'fixed' the problem. Any suggestion or idea would be greatly appreciated.
-kornel
Comment