isar / isar/hive

Dart compiler closes unexpectedly if an error occurs while reading contents of a box

Open
#1,247 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

Unhandled exception:
FormatException: Invalid radix-10 number (at character 1)
dart:async
^

#0 int._handleFormatError (dart:core-patch/integers_patch.dart:126:5)
#1 int._parseRadix (dart:core-patch/integers_patch.dart:137:16)
#2 int._parse (dart:core-patch/integers_patch.dart:98:12)
#3 int.parse (dart:core-patch/integers_patch.dart:60:12)
#4 parseDefinitionTypes (package:front_end/src/api_prototype/expression_compilation_tools.dart:113:36)
#5 createDefinitionsWithTypes (package:front_end/src/api_prototype/expression_compilation_tools.dart:32:7)
#6 IncrementalCompiler.compileExpression (package:vm/incremental_compiler.dart:219:50)
#7 FrontendCompiler.compileExpression (package:frontend_server/frontend_server.dart:981:45)
#8 listenAndCompile. (package:frontend_server/frontend_server.dart:1452:26)
#9 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
#10 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#11 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#12 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)
#13 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)
#14 _StringAdapterSink.add (dart:convert/string_conversion.dart:228:11)
#15 _LineSplitterSink._addLines (dart:convert/line_splitter.dart:164:13)
#16 _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:131:7)
#17 StringConversionSink.add (dart:convert/string_conversion.dart:39:5)
#18 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
#19 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
#20 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#21 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#22 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)
#23 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)
#24 _StringAdapterSink.add (dart:convert/string_conversion.dart:228:11)
#25 _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:233:7)
#26 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:307:20)
#27 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:300:5)
#28 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:69:18)
#29 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
#30 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
#31 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#32 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#33 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784:19)
#34 _StreamController._add (dart:async/stream_controller.dart:658:7)
#35 _StreamController.add (dart:async/stream_controller.dart:606:5)
#36 _Socket._onData (dart:io-patch/socket_patch.dart:2447:41)
#37 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
#38 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#39 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#40 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784:19)
#41 _StreamController._add (dart:async/stream_controller.dart:658:7)
#42 _StreamController.add (dart:async/stream_controller.dart:606:5)
#43 new _RawSocket. (dart:io-patch/socket_patch.dart:1936:33)
#44 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1379:14)
#45 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#46 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#47 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:123:13)
#48 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:190:5)

3
the Dart compiler exited unexpectedly.

Flutter Version: 3.13.4
Hive version :2.2.3

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the compiler exit with Flutter 3.13.4 and Hive 2.2.3, then trace the stack from package:front_end/src/api_prototype/expression_compilation_tools.dart, especially parseDefinitionTypes and createDefinitionsWithTypes, into IncrementalCompiler.compileExpression. Done means the same box-reading error is handled without the Dart compiler exiting unexpectedly, with regression coverage for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.