Bug 23703 - SearchBar combined with ListView in vertical StackLayout crashes app
Summary: SearchBar combined with ListView in vertical StackLayout crashes app
Status: RESOLVED DUPLICATE of bug 23315
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.3
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-09 09:34 UTC by rphillips
Modified: 2014-11-05 12:42 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Example solution (44.61 KB, application/zip)
2014-10-09 09:34 UTC, rphillips
Details
Stacktrace grabbed from logcat dump (8.99 KB, text/plain)
2014-10-09 09:36 UTC, rphillips
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 23315

Description rphillips 2014-10-09 09:34:43 UTC
Created attachment 8362 [details]
Example solution

---To reproduce in the attached, example solution...
1.) On the first screen that loads click the 'three' button.
2.) Attempt to enter text into the searchbar view.
3.) If debugging from Xamarin then no text will display in the searchbar even though you type on the devices soft keyboard. Eventually, after a while, the device will say that the app is not responding. If you publish a package then the app will just crash.

---Issue
I am unable to enter any text into a search bar when it is displayed with a list view in a stack layout. I type on the soft keyboard and nothing appears in the entry. Eventually the device pops up a warning that my app isn't responding anymore asking me if I would like to wait or exit. If I remove the list view I can enter text into the search bar.

To test I have a simple screen defined as a vertical stacklayout containing a search bar and a list view. No bindings for the search bar to simplify things. I also have a list view (textcells) with some randomly generated data pushed into an ObservableCollection in the backing ViewModel. Very minimal code just trying to get a baseline working. The listview contents display correctly; everything displays correctly I just can't enter text into the search bar entry.

---Devices used for testing (all with the same result)
Android 4.0.3 (API 15) -- debugging and published APK
        4.2.2 (API 17) -- debugging
        4.4   (API 19) -- published APK

---Project configuration
Target framework --> latest (4.4)
Minimum version --> Android 4.0.3 (API 15)

---System
=== Xamarin Studio ===

Version 5.5 (build 227)
Installation UUID: 55827ea6-e29e-4750-b5f5-f6d7e4515a6b
Runtime:
	Mono 3.10.0 ((detached/47db868)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000019

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.Mac ===

Version:

=== Xamarin.Android ===

Version: 4.18.0 (Business Edition)
Android SDK: /Users/rphillips/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Xamarin.iOS ===

Version: 8.2.0.193 (Business Edition)
Hash: 959c1e4
Branch: 
Build date: 2014-10-03 00:25:37-0400

=== Build Information ===

Release ID: 505000227
Git revision: 7b721eeec7a2fa4c4f4de0ecd2aed4dc25edac95
Build date: 2014-10-02 15:53:38-04
Xamarin addins: 99ed56b428b31eba1efaace4d82188d6f334e6ca

=== Operating System ===

Mac OS X 10.9.5
Darwin **** 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 1 rphillips 2014-10-09 09:36:03 UTC
Created attachment 8363 [details]
Stacktrace grabbed from logcat dump
Comment 2 Parmendra Kumar 2014-10-09 11:37:49 UTC
I have checked this issue and I am able to reproduce it, To reproduce this issue I have followed steps mentioned in the bug description.

Screencast:http://www.screencast.com/t/oUibWhKBST
Output Log: https://gist.github.com/saurabh360/c9a6c74a2fab8fad144a
IDE Log: https://gist.github.com/anonymous/1978ac883c144c0182fe
Device Log: https://gist.github.com/saurabh360/edb9459a4d78385136d6

Environment Info:
=== Xamarin Studio ===

Version 5.5 (build 227)
Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
Runtime:
	Mono 3.10.0 ((detached/47db868)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000019

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.iOS ===

Version: 8.2.0.193 (Business Edition)
Hash: 959c1e4
Branch: 
Build date: 2014-10-03 00:25:37-0400

=== Xamarin.Android ===

Version: 4.18.0 (Business Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Xamarin.Mac ===

Version: 1.10.0.13 (Business Edition)

=== Build Information ===

Release ID: 505000227
Git revision: 7b721eeec7a2fa4c4f4de0ecd2aed4dc25edac95
Build date: 2014-10-02 15:53:38-04
Xamarin addins: 99ed56b428b31eba1efaace4d82188d6f334e6ca

=== Operating System ===

Mac OS X 10.9.4
Darwin ShrutiMac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 3 rphillips 2014-10-15 13:02:44 UTC
An additional note, not sure if it should be a separate bug, but if you comment out adding the listview to the stacklayout on screen "three" the soft keyboard acts strangely while entering text into the searchbar.

I can enter text into the search bar. The issue is that if I switch to numeric input and enter a digit character the soft keyboard automatically switches back to alpha input. To enter a string of digits I have to manually switch to numeric input before entering each digit.
Comment 4 Eric Maupin 2014-11-05 12:12:37 UTC

*** This bug has been marked as a duplicate of bug 23315 ***
Comment 5 rphillips 2014-11-05 12:42:46 UTC
I don't understand how this is a duplicate of 23315. I understand that I used the same example project, but from my perspective these are different scenarios that I tested within the same project for simplicity reasons.

In 23315 I attempt to hide controls in a relative layout when certain actions are performed on a different screen/view. For this tracker I am attempting to use a SearchBar that doesn't work when another control, the ListView, is added to the screen. I am not hiding/showing controls when attempting to use the SearchBar in this tracker. Would you please explain how attempting to hide/show controls at runtime in a RelativeLayout is the same as attempting to use a SearchBar control in a StackLayout?

I am struggling to make the connection between these two trackers and would appreciate it if you explained your reasoning. Thanks.