Skip to content

Relationship problem: Maximum call stack size exceeded #17

@jonasbark

Description

@jonasbark

The following problem happens when I want to load this swagger file in start.ktor.io (Version 1.2.2):
swagger (1).json.zip

RangeError: Maximum call stack size exceeded
    at isInheritanceFromInterface (kotlin.js:1110)
    at isInheritanceFromInterface (kotlin.js:1117)
    at isInheritanceFromInterface (kotlin.js:1117)
    at isInheritanceFromInterface (kotlin.js:1117)
    at isInheritanceFromInterface (kotlin.js:1117)
    at isInheritanceFromInterface (kotlin.js:1117)
    at Object.Kotlin.isType (kotlin.js:1156)
    at toList_8 (kotlin.js:15838)
    at DynamicAccess.get_keys_mzud1t$ (ktor-generator.js:17168)
    at DynamicAccess.get_strKeys_mzud1t$ (ktor-generator.js:17186)

After debugging quite a while it seems to happen when two models have relationships that point to each other. Simplified kotlin form:

data class Model(val otherModel: OtherModel) 
data class OtherModel(val model: Model)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions