AbdulRahmanAlHamali / flutter_typeahead

A TypeAhead widget for Flutter, where you can show suggestions to users as they type
BSD 2-Clause "Simplified" License
831 stars 351 forks source link

[Bug] failed assertion `Texture Descriptor Validation' #568

Closed AxelCorbera closed 6 months ago

AxelCorbera commented 9 months ago

Steps to reproduce

Actual results

ONLY iOS

When opening the screen where the widget is located, the app crashes, returning the following message to the console.

2024-02-07 15:35:18.237281-0300 Runner[846:104022] -[MTLTextureDescriptorInternal validateWithDevice:], line 1344: error 'Texture Descriptor Validation MTLTextureDescriptor requests 4 mipmap levels, but the dimensions (2, 2, 1) can only support a maxiumum of 2 levels ' -[MTLTextureDescriptorInternal validateWithDevice:]:1344: failed assertion `Texture Descriptor Validation MTLTextureDescriptor requests 4 mipmap levels, but the dimensions (2, 2, 1) can only support a maxiumum of 2 levels

Package Version

5.1.0

Platform

iOS

Code sample

Code sample ```dart appBar: AppBar(centerTitle:true, title: Container( height: 50, child: TypeAheadField( animationDuration: Duration(milliseconds: 200), autoFlipDirection: false, autoFlipMinHeight: 144, controller: _locationController, debounceDuration: Duration(milliseconds: 300), direction: VerticalDirection.down, hideOnEmpty: true, hideOnError: true, hideOnLoading: true, hideOnUnfocus: true, hideWithKeyboard: true, hideOnSelect: true, itemBuilder: (context, suggestion) { return ListTile(title: Text(suggestion["description"])); }, onSelected: (suggestion) async { /// }, suggestionsCallback: (pattern) async { /// }, errorBuilder: (context, error) { /// }, emptyBuilder: (context) { return ListTile( title: Text(AppLocalizations.of(context)!.translate("noInfo")!) ); }, builder: (context, controller, focusNode) { return TextField( controller: controller, focusNode: focusNode, decoration: InputDecoration( hintText: AppLocalizations.of(context)!.translate("addDirection")!, border: OutlineInputBorder( borderSide: BorderSide(color: Colors.white), borderRadius: BorderRadius.circular(15), ), ), style: TextStyle(color: Colors.white), ); }, ),)) ```

Logs

Logs ```console 2024-02-07 15:35:18.237281-0300 Runner[846:104022] -[MTLTextureDescriptorInternal validateWithDevice:], line 1344: error 'Texture Descriptor Validation MTLTextureDescriptor requests 4 mipmap levels, but the dimensions (2, 2, 1) can only support a maxiumum of 2 levels ' -[MTLTextureDescriptorInternal validateWithDevice:]:1344: failed assertion `Texture Descriptor Validation MTLTextureDescriptor requests 4 mipmap levels, but the dimensions (2, 2, 1) can only support a maxiumum of 2 levels ```

Screenshots or Video

Screenshots / Video demonstration [Upload media here]
clragon commented 9 months ago

Hi, Thanks for you bug report. The log you have sent looks very complex and like it might be an issue with the flutter framework itself. Unfortunately I dont have any iOS devices to test this issue directly or figure out what these logs mean exactly. Perhaps you could open an issue on the flutter repository? I also am not sure how you would write a reproducible minimal example for this though. However, maybe they can hazard a guess as to why this issue happens. Thank you!