https://kotlinlang.org logo
#android
Title
# android
a

ar-g

07/02/2018, 1:53 PM
Does anyone came across issue of logging exceptions? Crashes are omitted from LogCat, but shown in Fabric.
Copy code
private fun processSelectedImages(selectedImages: LinkedHashMap<String, Image>) {
        assertMainThread()

        fun fillAdIds(
            index: Int,
            map: LinkedHashMap<String, Image>
        ) = map.values.map { image -> image.copy(adId = tempAdIds[index]!!) }

        val imagesWithAdId = listsOfImages
            .mapIndexed(::fillAdIds)
            .flatMap { it }
            .map { it.copy() }
NPE happens in internal function
fillAdIds
l

Lucas Ł

07/02/2018, 1:57 PM
I'm sometimes having issues with logcat since around v3.0 of Android Studio. Are any other logs appearing from your app in the logcat? Usually I need to restart the device/emu and android studio (possibly with invalidate cache).
a

ar-g

07/02/2018, 2:00 PM
everything else is present, although from time to time different crashes are happening and not being logged
2 Views