5

I am developing in flutter and my logcat is always full of these logs

W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
I/ample.wmbsende( 6845): Background concurrent copying GC freed 126466(5699KB) AllocSpace objects, 6(184KB) LOS objects, 49% free, 7638KB/14MB, paused 476us total 240.336ms
W/ample.wmbsende( 6845): Reducing the number of considered missed Gc histogram windows from 135 to 100
W/System  ( 6845): A resource failed to call release. 
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
I/flutter ( 6845): Instance of 'QuerySnapshot'
D/HostConnection( 6845): HostConnection::get() New Host Connection established 0xf163ba70, tid 7580
D/EGL_emulation( 6845): eglMakeCurrent: 0xf1420a00: ver 2 0 (tinfo 0xf176df30)
D/HostConnection( 6845): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2 
D/EGL_emulation( 6845): eglCreateContext: 0xc1a46600: maj 1 min 0 rcv 1
D/EGL_emulation( 6845): eglMakeCurrent: 0xc1a46600: ver 1 0 (tinfo 0xbd76b5d0)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist,core-platform-api, linking, allowed)
W/ample.wmbsende( 6845): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)

It is talking about some "greylist" API, which I gave a read and the most I could make out of the docs was that greylist APIs are security concerns.

With that said, I do wish to get rid of these exceptions, but I can't afford to change any API.

The libraries which I suspect to be problematic are:

flutter_google_maps: ^3.8.0

Everytime this particular code runs, the logcat is full of junk exceptions.

  class Map extends StatelessWidget {
  final GlobalKey<GoogleMapStateBase> _key;

  Map(this._key);

  @override
  Widget build(BuildContext context) {
    return Consumer<ReceiverDataModel>(
      builder: (context, state, child) => StreamBuilder<QuerySnapshot>(
        stream: Db.getStream(state.code),
        builder: (context, snapshot) {
          print(snapshot.data);
          return GoogleMap(
            key: _key,
            initialPosition: GeoCoord(30.1290, 77.2674),
            initialZoom: 20,
            mapType: MapType.roadmap,
            //markers: markers,
            mobilePreferences: MobileMapPreferences(
                myLocationEnabled: true, myLocationButtonEnabled: true),
          );
        },
      ),
    );
  }
}

The logcat makes it very hard to see some important information that I am trying to print. I just wish to suppress these exceptions.

Thanks for your time.

Lakshay Dutta
  • 455
  • 5
  • 20
  • are you using android studio? You can use regex to filter information on logcat see [this post](https://stackoverflow.com/questions/34770159/how-to-filter-multiple-words-in-android-studio-logcat) – pedro pimont Jul 15 '20 at 19:00
  • I am using flutter and it prints results to a different kind of console, and that console doesnt provide any search or filter options – Lakshay Dutta Jul 16 '20 at 03:08
  • Facing same issue with "google_maps_flutter" package – Pruthvi Sep 22 '20 at 05:51

1 Answers1

0

If using IntelliJ Console you can "fold" these useless lines with a right-click + Fold Lines Like This.

If using a terminal you can pipe the output to a grep command.

Patrick
  • 3,578
  • 5
  • 31
  • 53