Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6601755

On loading, text box doesn't get focus. IE closes abruptly while accessing menu

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 5.0-pool
    • 5.0
    • client-libs
    • x86
    • windows_2000

      FULL PRODUCT VERSION :
      Applet keyboard focus Problem:
      ------------------------------------------
      Sun JRE 5.0 update 12

      IE Crash Problem:
      -------------------------
      Sun JRE 5.0 update 10

      ADDITIONAL OS VERSION INFORMATION :
      Windows 2000

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Applet keyboard focus Problem:
      ------------------------------------------
      Smart Card Readers: Schlumberger Reflex 20V2, HP USB Smart Card Keyboard Reader and HP Gemplus Internal PCMCIA smart card reader

      Smart card Details: Cyberflex 32k, Cyberflex 64kv2c

      Schlumberger Application: SCMS 5.22, ACS 5.1

      IE Crash Problem:
      ------------------------
      IE 6.0 SP1, Livelink 9.1

      A DESCRIPTION OF THE PROBLEM :
      Livelink 9.1 is a web-based repository whereby we store all our documents. It is an on line application where we upload and download documents. Java applets are used in some of the Livelink WebPages. This web-based repository Livelink 9.1 is accessed through the IE 6.0 SP1. Whenever a user clicks on any of the menu items on the screen from the loaded applet, an alert appears with two options saying "Send this report to Microsoft" or "Don't Send" after which, the IE window closes abruptly. This is a timing issue; which means that it is triggered only under specific conditions when the JRE removes the COM call context before the IE UI thread finish getting the "unelectable". This call is from the timeout script code, and the time the script code is called will also affect the reproducibility of this error. This issue happens in JRE 5.0_10. To overcome this, all our users were migrated to JRE 1.5.0_12. However another error was faced in this version. The smartcard personalization applet loses keyboard focus after the applet is loaded. The users cannot enter any keystrokes even through the applet is visible and appears to have focus. The cursor appears after waiting for a few minutes. The same personalization application applets are working fine with rest of the JRE’s like JRE 1.5_01, JRE 1.5_06, JRE 1.5_10, JRE 1.5_11, JRE_6, and JRE 6.0_2. This lost keyboard focus problem happens only in JRE 1.5_12 and it is reproducible with 32k, 64k as well as without smartcard in the smartcard reader too. This keyboard focus problem is due to slow loading of the applet. As our other applications also depend on these JRE 5.0 series versions, and we cannot migrate to other 6.0 versions. As a result we are expecting these two issues to be fixed together in the next JRE 1.5_13 release.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Applet keyboard focus Problem:
      ---------------------------------------------

      1. User logs on manually to the system

      2. SLBBrowse.exe would launch the smart card personalization page

      3. User click Continue and it would prompt user to insert the smart card

      4. Once the smart card (Cyberflex 32k or Cyberflex 64kv2c) is inserted, user needs to key-in a new PIN and Smart Card Question & Answer

      5. The personalization would take place on the smart card

      6. Once it is completed, user is prompted to click on Get Certificate

      7. Once the certificate is installed, user is prompted to logoff from the system.

      We are NOT able to insert the PIN & SCQA at step (d), because the personalization applet input field doesn’t get keyboard focus and the users cannot enter keystrokes into the text field even though the applet is visible and appears to have focus. But after waiting for few minutes, the cursor becomes visible, and we are able to continue with the smart card personalization. We have tried to reproduce the issue on, JRE 1.5.0-1, JRE 1.5.0.6, JRE 1.5.0-10, JRE 1.5.0-11, JRE 1.5.0-12, JRE-6,JRE-6u2. This problem shows up only in JRE 1.5.0-12. All the other JRE as perform as expected.

      Basically this is a problem of applet loading too slowly in the SLBBrowser.

      IE Crash Problem:
      -------------------------
      Whenever a user clicks on any menu item from the loaded applet within the livelink web page, an alert appears with two options saying "Send this report to Microsoft" or "Don’t Send" and the IE window closes abruptly.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Applet keyboard focus Problem:
      -------------------------------------------
      The input field should gain the focus as soon as the applet loads and appear and also the user should be able to key-in characters.

      IE Crash Problem:
      -------------------------
      User should able to upload/download the documents with livelink web server without closing the IE abruptly.
      ACTUAL -
      Applet keyboard focus Problem:
      -------------------------------------------
      The applet input field lost keyboard focus such that users cannot enter keystrokes even though the applet is visible and appears to have focus.

      IE Crash Problem:
      ------------------------
      IE abruptly closes when the end-user selects any menu-item from the applet within the livelink webpage.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Applet keyboard focus Problem:
      -------------------------------------------
      No error message appears in logs.

      IE Crash Problem:
      ------------------------
      We are getting a message stating "To send this report to Microsoft" or "Don’t send" and IE window closes abruptly.

      crash stack:
      ---------------------------------------------------------------------------------------------
      0012d474 70f47363 mshtmled!CUndoManagerHelper::BeginUndoUnit+0x8
      0012d484 70f73d57 mshtmled!CEdUndoHelper::Begin+0x15
      0012d4a0 70f76042 mshtmled!CCaretTracker::BeginTypingUndo+0xc7
      0012d4ec 70f77096 mshtmled!CCaretTracker::InsertText+0x31
      0012d54c 70f77e33 mshtmled!CCaretTracker::HandleChar+0x336
      0012d570 70f6505f mshtmled!CCaretTracker::HandleEvent+0x94
      0012d5c0 70f3fb95 mshtmled!CSelectionManager::HandleEvent+0x39c
      0012d600 635f9ed1 mshtmled!CHTMLEditor::PreHandleEvent+0x110
      0012d648 6365a5f7 MSHTML!CDoc::HandleSelectionMessage+0x1de
      0012d6cc 6365bd20 MSHTML!CDoc::PumpMessage+0x8be 0012d7dc 63680d65 MSHTML!CDoc::OnWindowMessage+0xc5a
      0012d90c 77e3a454 MSHTML!CServer::WndProc+0x86 0012d92c 77e14605 USER32!UserCallWinProc+0x18
      0012d9b8 77e15b77 USER32!DispatchMessageWorker+0x2e4
      0012d9c4 6d404041 USER32!DispatchMessageA+0xb
      WARNING: Stack unwind information not available. Following frames may be wrong.
      0012d9f8 6d402c0e jpiexp32+0x4041
      0012da54 637aeb92 jpiexp32+0x2c0e
      0012da80 6367cceb MSHTML!COleSite::GetDispID+0xc9 0012dacc 70f8cbf3 MSHTML!CBase::getAttribute+0x77 0012dafc 70f5ebd5 mshtmled!EdUtil::CheckAttribute+0x33
      0012db24 70f62c5a mshtmled!CSelectionManager::CheckUnselectable+0x2d
      0012db50 70f63190 mshtmled!CSelectionManager::CreateTrackerForContext+0x41
      0012db6c 70f634cb mshtmled!CSelectionManager::SetEditContext+0x89
      0012dbd0 70f63625 mshtmled!CSelectionManager::SetEditContextFromElement+0x302
      0012dbf0 70f63bb2 mshtmled!CSelectionManager::SetInitialEditContext+0x63
      0012dc08 70f3f84c mshtmled!CSelectionManager::Initialize+0x195
      0012dc38 635f879e mshtmled!CHTMLEditor::Initialize+0x228
      0012dc58 635fa175 MSHTML!CDoc::GetHTMLEditor+0x6d 0012dc6c 635fd4c1 MSHTML!CDoc::NotifySelection+0x4f
      0012dd34 6362126d MSHTML!CDoc::SetCurrentElem+0x357
      0012dd78 6362182f MSHTML!CElement::BecomeCurrent+0xc5
      0012ddac 63621ea0 MSHTML!CElement::focusHelper+0xca
      0012ddb4 63677487 MSHTML!CElement::focus+0x19 0012ddbc 6367d432 MSHTML!Method_void_void+0x14 0012de3c 6361826e MSHTML!CBase::ContextInvokeEx+0x453
      0012de6c 63619ad5 MSHTML!CElement::ContextInvokeEx+0x5e
      0012de9c 03eb5295 MSHTML!CElement::ContextThunk_InvokeEx+0x2f
      0012ded4 03eb5208 jscript!IDispatchExInvokeEx2+0xa9 0012df0c 03eb5323 jscript!IDispatchExInvokeEx+0x56 0012df7c 03eb577b jscript!InvokeDispatchEx+0x78
      0012dfc4 03eb57c6 jscript!VAR::InvokeByName+0x1c1
      0012e004 03eb4ab0 jscript!VAR::InvokeDispName+0x43
      0012e028 03eb5a14 jscript!VAR::InvokeByDispID+0xfb 0012e21c 03eb46d8 jscript!CScriptRuntime::Run+0x195b
      0012e2e0 03eb4ec1 jscript!ScrFncObj::Call+0x69
      0012e374 03eb4f1b jscript!NameTbl::InvokeInternal+0x218
      0012e3a0 03eb5a14 jscript!VAR::InvokeByDispID+0xd4
      0012e594 03eb46d8 jscript!CScriptRuntime::Run+0x195b
      0012e658 03eb506e jscript!ScrFncObj::Call+0x69 0012e6d0 03eb5f6a jscript!CSession::Execute+0xb8 0012e7d0 03eb672f jscript!NameTbl::InvokeDef+0x183
      0012e8a4 03eb6bd1 jscript!NameTbl::InvokeEx+0xd2
      0012e8d4 6364bff3 jscript!NameTbl::Invoke+0x55
      0012e968 6364c8c8 MSHTML!CWindow::ExecuteTimeoutScript+0x83
      0012e988 636ad99e MSHTML!CWindow::FireTimeOut+0x3e
      0012e994 636adfb4 MSHTML!OnTimer+0x2d
      0012eac0 77e3a454 MSHTML!GlobalWndProc+0x193 0012eae0 77e14605 USER32!UserCallWinProc+0x18 0012eb6c 77e1a7f2 USER32!DispatchMessageWorker+0x2e4
      0012eb78 71519b6e USER32!DispatchMessageW+0xb 0012eb90 715205c1 BROWSEUI!TimedDispatchMessage+0x35
      0012ede8 715206c0 BROWSEUI!BrowserThreadProc+0x2d5
      0012ee74 71520957 BROWSEUI!BrowserProtectedThreadProc+0x44
      0012fef0 71762a0a BROWSEUI!SHOpenFolderWindow+0x1ec 0012ff10 00401ecd SHDOCVW!IEWinMain+0x108 0012ff60 00401f7d IEXPLORE!WinMainT+0x2dc 0012ffc0 7c5989a5 IEXPLORE!ModuleEntry+0x97 0012fff0 00000000 KERNEL32!BaseProcessStart+0x3d

      When IE calls JRE (jpiexp32) to get the property, mshtmled will make a cross-thread COM call, in which SUN JVM will re-enter IE code to destroy some call context that causes the above thread crashes.

      In the original bug, the property IE query is "unselectable" and below is what I get from the dump from Shell.

      PropertyName = 0x06156654
      0:000> du 06156654
      06156654 "unselectable"
      -------------------------------------------------------------------------------------------------


      REPRODUCIBILITY :
      This bug can be reproduced often.

      ---------- BEGIN SOURCE ----------
      Applet keyboard focus Problem:
      -------------------------------------------
      N/A

      IE Crash Problem:
      -------------------------
      The crash happens when executing some JavaScript function set using setTimeOut.
      The function name and body are:

      function checkDashboardFunc()
      {
                var appletsLoaded = true;
                for ( var i = 0; i < window.document.applets.length; i++ )
                {
                           if ( typeof( window.document.applets[i] ) != "object" )
                           {
                                     appletsLoaded = false;
                           }
                 }

                 if ( appletsLoaded )
                 {
                            if ( g_focusObject != null )
                            {
                                      if ( typeof( g_focusObject ) == "string" )
                                      {
                                                g_focusObject = eval( g_focusObject );
                                      }

                                      if ( typeof( g_focusObject ) == "object" )
                                      {
                                          g_focusObject.focus();<<======= the call generates the problem.
                                       }

                                      clearInterval( g_CheckDashboardFuncID );
                             }
                  }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Applet keyboard focus Problem:
      -------------------------------------------
      No workaround


      IE Crash Problem:
      -------------------------
      No workaround

            robm Robert Mckenna
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: