Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-8267

Android: App crashes when reusing a WebView instance on an Activity window

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 2.0.0
    • Fix Version/s: Release 2.0.0, Sprint 2012-06
    • Component/s: Android
    • Environment:

      Description

      Application crashes on reopening a web view button (Titanium.UI.WebView Acceptance TIMOB-4357)

      Steps To Reproduce:

      1. Launch app on Android device or emulator
      2. Navigate to acceptance tab and run timob_4357
      3. Press the open WebView button
      4. Press the back hardware button
      5. Press the open WebView button again.

      Expected Result:
      After Step 5: App should not crash

      Actual Result:
      After Step 5, the app crashes.

      app.js

       
      var win = Ti.UI.createWindow({
      	backgroundColor : 'black'
      });
      		
      		var button = Ti.UI.createButton({
      			title : 'Open WebView'
      		});
      		
      		var browser = Ti.UI.createWebView();
      		var html = '<html><body><select><option value="Feedback">Feedback</option><option value="Bug">Bug</option></select></body></html>';
      		button.addEventListener('click', function() {
      			var w = Ti.UI.createWindow({
      				fullscreen : true
      			});
      			
      			w.add(browser);
      			w.open();
      			browser.html = html;
      		});
      	
      	
      	win.add(button);
      win.open();
      

        Attachments

        1. Crash_log.txt
          5 kB
        2. error.png
          error.png
          16 kB
        3. motorola.png
          motorola.png
          36 kB

          Activity

            People

            • Assignee:
              mculpepper Marshall Culpepper
              Reporter:
              nchhabra Neha Chhabra
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code