Q: Variable in base class is null when initialized from derived class but called from super I'm having trouble converting an inherited singleton pattern from Java to Kotlin.
open class ThumbnailManager {

   lateinit var data: Data

   companion object{
       fun getInstance(): ThumbnailManager{
           return ThumbnailManager()
       }
     }
     open fun setContent()
     open fun setData(){
         data = ...// data is indeed set 
     }
}

class ThumbnailManagerLite : ThumbnailManager(){

   companion object{
       fun getInstance(): ThumbnailManagerLite{
           return ThumbnailManagerLite()
       }
   }

   override fun setContent(){
       setData()
   }
}

From one of the main classes (not lite) I call ThumbnailManager.getInstance().gameData and gameData is null, even though it was definitely initialized through ThumbnailManagerLite.
I notice that when I call ThumbnailManagerLite.getInstance() there is no call through to super.

A: Every time you call ThumbnailManager.getInstance() you create a new instance of ThumbnailManager. In Kotlin you can use object keyword to implement a Singleton pattern:
object ThumbnailManager {
    
    lateinit var data: Data

    fun setContent() { 
    }

    fun setData() {
    }
}

But it doesn't support inheritance.
You can try to use Delegation instead of inheritance in singleton:
interface IThumbnailManager {
    fun setContent()
    fun setData()
}

object ThumbnailManager : IThumbnailManager {

    lateinit var data: Data


    override fun setContent() {
    }

    override fun setData(){
    }
}

object ThumbnailManagerLite : IThumbnailManager by ThumbnailManager {

    override fun setContent(){
        setData()
    }
}

