Thanks to visit codestin.com
Credit goes to github.com

Skip to content

flutter/test/foundation/memory_allocations_test.dart: dispatchObjectEvent handles bad listeners throws ArgumentError exception #113746

Closed
@TahaTesser

Description

@TahaTesser

Description

When running framework tests, dispatchObjectEvent handles bad listeners from flutter/test/foundation/memory_allocations_test.dart throws ArgumentError exception.

Steps to reproduce

  1. Execute flutter test test/foundation/memory_allocations_test.dart under packages/flutter

Logs

Running "flutter pub get" in flutter...                            252ms
Resolving dependencies...
  collection 1.16.0 (1.17.0 available)
  js 0.6.4 (0.6.5 available)
  stack_trace 1.10.0 (1.11.0 available)
Got dependencies!
00:03 +1: dispatchObjectEvent handles bad listeners                            
══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
The following ArgumentError was thrown MemoryAllocations while dispatching notifications for String:
Invalid argument(s)

When the exception was thrown, this was the stack:
#0      main.<anonymous closure>.badListener1 (file:///Users/tahatesser/Code/flutter/packages/flutter/test/foundation/memory_allocations_test.dart:44:7)
#1      MemoryAllocations.dispatchObjectEvent (package:flutter/src/foundation/memory_allocations.dart:238:23)
#2      main.<anonymous closure> (file:///Users/tahatesser/Code/flutter/packages/flutter/test/foundation/memory_allocations_test.dart:59:8)
#3      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:171:29)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

The String sending notification was:
  object
════════════════════════════════════════════════════════════════════════════════════════════════════
══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
The following ArgumentError was thrown MemoryAllocations while dispatching notifications for String:
Invalid argument(s)

When the exception was thrown, this was the stack:
#0      main.<anonymous closure>.badListener2 (file:///Users/tahatesser/Code/flutter/packages/flutter/test/foundation/memory_allocations_test.dart:49:7)
#1      MemoryAllocations.dispatchObjectEvent (package:flutter/src/foundation/memory_allocations.dart:238:23)
#2      main.<anonymous closure> (file:///Users/tahatesser/Code/flutter/packages/flutter/test/foundation/memory_allocations_test.dart:59:8)
#3      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:171:29)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

The String sending notification was:
  object
════════════════════════════════════════════════════════════════════════════════════════════════════
00:03 +7: All tests passed!                                                    
tahatesser@Tahas-MacBook-Pro flutter % 

Related #111615

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: tests"flutter test", flutter_test, or one of our testsc: crashStack traces logged to the consoleframeworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions