Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [cloud_firestore] Windows app crashes with Unhandled exception at 0x00007FF637C02EEA in my_app.exe: 0xC000001D: Illegal Instruction #12216

Closed
sharathGowda12 opened this issue Jan 30, 2024 · 27 comments
Assignees
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. closed-by-bot Needs Attention This issue needs maintainer attention. platform: windows Issues / PRs which are specifically for Windows. plugin: cloud_firestore resolution: no-response Customer did not respond after some time. Stale Issue with no recent activity type: bug Something isn't working type: crash A compile error or crash

Comments

@sharathGowda12
Copy link

Bug report

Describe the bug
As the title says.

Steps to reproduce

Steps to reproduce the behavior:

  1. Call await FirebaseFirestore.instance.collection('anyCollection').doc('anyId').get();(where, whereIn also generate the same crash) from the example app.
  2. The app crashes with the Lost Connection to device with no error logs in the terminal. However, if you generate the .sln file (Thanks to) and run the app with the Visual Studio you could see the crash with message Unhandled exception at 0x00007FF637C02EEA in my_app.exe: 0xC000001D: Illegal Instruction.

Following is the Disassembly generated by the Visual Studio
Disassembly.md

Expected behavior

App shouldn't crash

Sample project

flutterfire example project with a live firebase project details will create the same crash.


Additional context

OS - Windows 10 Pro
Processor - Intel(R) Core(TM) i5-3340M CPU @ 2.70GHz, 2701 Mhz, 2 Core(s), 4 Logical Processor(s)
System Model - Dell Latitude E5430 non-vPro


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
[√] Flutter (Channel stable, 3.16.9, on Microsoft Windows [Version 10.0.19045.3930], locale en-IN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.4)
[!] Android Studio (not installed)
[√] VS Code (version 1.85.2)
[√] Connected device (2 available)
[√] Network resources

! Doctor found issues in 3 categories.

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
Dart SDK 3.2.6
Flutter SDK 3.16.9
cloud_firestore_example 0.0.0

dependencies:
- cloud_firestore 4.14.0 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]      
- firebase_core 2.24.2 [firebase_core_platform_interface firebase_core_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math web sky_engine]
- http 1.2.0 [async http_parser meta web]

dev dependencies:
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math async boolean_selector characters collection material_color_utilities meta source_span stream_channel string_scanner term_glyph web]
- integration_test 0.0.0 [flutter flutter_driver flutter_test path vm_service async boolean_selector characters clock collection fake_async file matcher material_color_utilities meta source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api vector_math web webdriver]

transitive dependencies:
- _flutterfire_internals 1.3.16 [collection firebase_core firebase_core_platform_interface flutter meta]
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- characters 1.3.0
- clock 1.1.1
- cloud_firestore_platform_interface 6.1.0 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 3.9.0 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins 
js]
- collection 1.18.0
- fake_async 1.3.1 [clock collection]
- file 6.1.4 [meta path]
- firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.10.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver async boolean_selector characters clock collection matcher material_color_utilities platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api vector_math web]    
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math web]
- fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- js 0.6.7 [meta]
- matcher 0.12.16 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.5.0 [collection]
- meta 1.10.0
- path 1.8.3
- platform 3.1.2
- plugin_platform_interface 2.1.8 [meta]
- process 4.2.4 [file path platform]
- sky_engine 0.0.99
- source_span 1.10.0 [collection path term_glyph]
- stack_trace 1.11.1 [path]
- stream_channel 2.1.2 [async]
- string_scanner 1.2.0 [source_span]
- sync_http 0.3.1
- term_glyph 1.2.1
- test_api 0.6.1 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- typed_data 1.3.2 [collection]
- vector_math 2.1.4
- vm_service 11.10.0
- web 0.3.0
- webdriver 3.0.2 [matcher path stack_trace sync_http]

@sharathGowda12 sharathGowda12 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Jan 30, 2024
@danagbemava-nc danagbemava-nc added the triage Issue is currently being triaged. label Jan 30, 2024
@danagbemava-nc
Copy link

Hi @sharathGowda12, I can't seem to reproduce the crash using the plugin example app.

What actions do you perform in the app and is there any additional information that you can provide?

@danagbemava-nc danagbemava-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Jan 30, 2024
@sharathGowda12
Copy link
Author

Any call to cloud_firestore crashes the app.

I think, it happens only in few devices, as reported earlier here, so might not be able to reproduce in you system.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Jan 30, 2024
@danagbemava-nc
Copy link

danagbemava-nc commented Jan 31, 2024

That would likely explain it. I tried several calls to firestore but it did not crash on my device.

Dell XPS 13 7390 running windows 11 home

Labeling based on the information provided above.

cc @Lyokone

@danagbemava-nc danagbemava-nc added plugin: cloud_firestore type: crash A compile error or crash platform: windows Issues / PRs which are specifically for Windows. and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Jan 31, 2024
@patricknicolosi
Copy link

patricknicolosi commented Feb 4, 2024

Same issue! it happens only in few devices

@vishnuagbly
Copy link

I am also facing this issue, it is a major blocker for our team. We are building a cross-platform application, and we require firestore support for our application on windows, as most of our customer base is on windows only.

@ekrem-qb
Copy link

I have similar issue, it worked once on old sdk version 2.18.0 but after upgrading to latest sdk, it just crashes with no errors.

@jeedy20
Copy link

jeedy20 commented Feb 12, 2024

Same here. My Flutter windows app crashes on some devices because of firestore. Any solution or firestore version that works?

@ahmed951
Copy link

Same here.
The app crashes on one customer desktop only due to firebase.

@patricknicolosi
Copy link

Any updates?

@Lyokone Lyokone self-assigned this Feb 29, 2024
@Lyokone
Copy link
Contributor

Lyokone commented Feb 29, 2024

Hello, couldn't reproduce this issue using my the example app with those:

  // Get document
  final doc = await FirebaseFirestore.instance
      .collection('firestore-example-app')
      .doc('movie')
      .get();

  print(doc.data());


// Use where in
  final querySnapshot = await FirebaseFirestore.instance
      .collection('firestore-example-app')
      .where('genre', arrayContainsAny: ['fantasy'])
      .get();

  print(querySnapshot.docs.length);

@Lyokone Lyokone added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Feb 29, 2024
@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label Mar 11, 2024
@google-oss-bot
Copy link

Hey @sharathGowda12. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@sharathGowda12
Copy link
Author

@google-oss-bot I don't think, there is more information, I could possibly provide. This is such an issue, that happens only on a few devices (probably older PCs which support Windows 10). And it is confirmed by other commentators too.

If the Firebase team is checking it only on newer models, I don't think, there is a possibility to reproduce this bug.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed Stale Issue with no recent activity labels Mar 11, 2024
@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Mar 11, 2024
@Lyokone
Copy link
Contributor

Lyokone commented Mar 11, 2024

Hello @sharathGowda12, if the issue is only happening on older device, it's probably due to the underlying C++ SDK, you can report the issue here with: https://github.com/firebase/firebase-cpp-sdk

@Lyokone Lyokone added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Mar 11, 2024
@patricknicolosi
Copy link

patricknicolosi commented Mar 13, 2024

In my experience, the problem occurs not only in older devices. I think this problem should not be overlooked. Several users of my app in production can no longer use the program with relatively new PCs

@google-oss-bot
Copy link

Hey @sharathGowda12. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label Mar 22, 2024
@MominRaza
Copy link
Contributor

MominRaza commented Mar 31, 2024

Hello, couldn't reproduce this issue using my the example app with those:

Hi @Lyokone, Please try with below code it is crashing on Windows 11

// Use whereNotIn
  final querySnapshot = await FirebaseFirestore.instance
      .collection('firestore-example-app')
      .where('genre', whereNotIn: ['fantasy'])
      .get();

  print(querySnapshot.docs.length);

@google-oss-bot google-oss-bot removed the Stale Issue with no recent activity label Mar 31, 2024
@rustdesk
Copy link

rustdesk commented Apr 1, 2024

Same here, but no firebase.

@danielmarschall
Copy link

The issue 0xc000001d means that Flutter uses some CPU instruction from an instruction set (AVX, FMA3, SSE, MMX, ...) which the CPU does not support. The correct way is to check the supported CPU instruction sets first, before running instructions from that instruction set - or if the instruction is mandatory and critical - mark the CPU as unsupported.

This seems to be a bug in Flutter itself.

RustDesk crashes with the following CPU if Flutter 3.16.9 is used (3.10.6 worked fine): AMD Phenom(tm) II X4 955 Processor which supports the following instruction sets:

  • MMX instructions
  • Extensions to MMX
  • 3DNow! technology
  • Extensions to 3DNow!
  • SSE / Streaming SIMD Extensions
  • SSE2 / Streaming SIMD Extensions 2
  • SSE3 / Streaming SIMD Extensions 3
  • SSE4a
  • AMD64 / AMD 64-bit technology
  • AMD-V / AMD Virtualization technology

Important question to the people having the same issue here in flutterfire: Can you please post which CPUs you are having on the systems which crash? Maybe you could even find the exact instruction using WinDbg or any possibility to see a stack trace to machine code.

@vishnuagbly
Copy link

vishnuagbly commented Apr 1, 2024 via email

@danielmarschall
Copy link

Thank you for the quick reply. Can you please send me the exact name of the CPU as shown in the Windows "system information" tool?

@vishnuagbly
Copy link

vishnuagbly commented Apr 1, 2024 via email

@danielmarschall
Copy link

danielmarschall commented Apr 2, 2024

Ok, in this case, the CPU seems to be "Intel® Core™ i7 8565U" which DOES supports SSE 4.1 .

There is a very recently discovered bug in Flutter/Dart which causes Flutter to crash on old CPUs which DO NOT support SSE 4.1 . Although your CPU is newer (so you might not be affected by this bug), you might still want to try the new Flutter version once you have the ability.

@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label Apr 11, 2024
@google-oss-bot
Copy link

Hey @sharathGowda12. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link

Since there haven't been any recent updates here, I am going to close this issue.

@sharathGowda12 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@tranhuudang
Copy link

This bug seems to happen only on debug mode, I have my app crash right after access a firebase document, but when i release the app to store and run it on the same device, the bug no longer happens.

@Nimo11
Copy link

Nimo11 commented May 1, 2024

Same issue Windows 10 CPU i7-3740QM bug in debug and release mode. SDK 3.3.4

@TarekkMA TarekkMA added the resolution: no-response Customer did not respond after some time. label May 2, 2024
@TarekkMA
Copy link
Contributor

TarekkMA commented May 2, 2024

@tranhuudang @Nimo11, this issue is closed. Please open new issues or upvote (by adding a 👍) on issue #12707 if it matches your problem.

@firebase firebase locked and limited conversation to collaborators May 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. closed-by-bot Needs Attention This issue needs maintainer attention. platform: windows Issues / PRs which are specifically for Windows. plugin: cloud_firestore resolution: no-response Customer did not respond after some time. Stale Issue with no recent activity type: bug Something isn't working type: crash A compile error or crash
Projects
None yet
Development

No branches or pull requests