question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NullPointerException at org.dartlang.vm.service.element.Element.jsonArrayToListString(Element.java:64)

See original GitHub issue

Thanks for the feedback! If your issue is related to the Flutter framework itself, please open an issue at github.com/flutter/flutter.

Steps to Reproduce

Launched my application in the Android simulator. This error started showing up after added some new code to test out isolates / background jobs. See the // new tags in the code below.


import ‘package:flutter/material.dart’; import ‘default_route.dart’; import ‘TimeChart.dart’; import “dart:io”; import ‘package:flutter/foundation.dart’; import ‘dart:async’;

//add import to rendering library (for debugPaintSizeEnabled) import ‘package:flutter/rendering.dart’;

void main() async{ //debugPaintSizeEnabled=true; compute(_backgroundJob,0); // new runApp(App()); }

class App extends StatelessWidget { @override Widget build(BuildContext context) { print(“in App:build”); return MaterialApp( debugShowCheckedModeBanner: true, title: ‘My Application’, theme: ThemeData( primaryColor: Colors.blue, dialogBackgroundColor: Colors.blue, ), home: DefaultRoute(), ); } }

// new Future<String> _backgroundJob(int dummy) async { print(“starting backgroundJob”); while (true) { print(“in backgroundJob”); sleep(Duration(seconds: 10)); } return “done”; }

Version info

Please paste the output of running flutter doctor -v here (available from the command line or from Tools > Flutter > Flutter Doctor). It will provide the version of the Flutter framework as well as of the IntelliJ plugin.

Android Studio 3.1.4 • Flutter plugin io.flutter 28.0.1 • Dart plugin 173.4700

flutter doctor -v [√] Flutter (Channel beta, v0.7.3, on Microsoft Windows [Version 10.0.17134.285], locale en-US) • Flutter version 0.7.3 at C:\Users\rtola\dev\flutter • Framework revision 3b309bda07 (2 weeks ago), 2018-08-28 12:39:24 -0700 • Engine revision af42b6dc95 • Dart version 2.1.0-dev.1.0.flutter-ccb16f7282

[√] Android toolchain - develop for Android devices (Android SDK 28.0.1) • Android SDK at C:\Users\rtola\AppData\Local\Android\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.1 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02) • All Android licenses accepted.

[√] Android Studio (version 3.1) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 28.0.1 • Dart plugin version 173.4700 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[√] Connected devices (1 available) • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

• No issues found!

Exception

null

java.lang.NullPointerException
	at org.dartlang.vm.service.element.Element.jsonArrayToListString(Element.java:64)
	at org.dartlang.vm.service.element.Element.getListString(Element.java:38)
	at org.dartlang.vm.service.element.Isolate.getExtensionRPCs(Isolate.java:67)
	at io.flutter.perf.PerfService$2$1.lambda$received$0(PerfService.java:85)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:650)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
devoncarewcommented, Sep 14, 2018

I’m surprised it doesn’t have that member, but we likely should throw here. We can move this to the protocol library repo.

0reactions
ghostcommented, Sep 14, 2018

This issue was moved by devoncarew to dart-lang/vm_service_drivers#185.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java Downloads for All Operating Systems
Java manual download page. Get the latest version of the Java Runtime Environment (JRE) for Windows, Mac, Solaris, and Linux.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found