godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.15k stars 21.19k forks source link

Maximum _guess_expression_type depth limit reached. Please file a bugreport. (Dictionary in 3.5) #65345

Open asperkraken opened 2 years ago

asperkraken commented 2 years ago

Godot version

3.5 stable

System information

Windows 10

Issue description

When compiling a large dictionary and attempting to code, any references to said dictionary result in this error:

Maximum _guess_expression_type depth limit reached. Please file a bugreport.

It will drop this error anytime I try to reference this dictionary. There are about 50+ entries, all basic text. (It's like a "daily quotes" kind of thing.)

I have had other people try the dictionary in question, it's just strings, with zero problem. While the error pops up in editor, it seems to not effect the actual game or functionality. Maybe an editor bug?

Steps to reproduce

Use this dictionary in code in Godot and then attempt to use references to said dictionary in code.

var _quotes = {
    "Mohatma K Gandhi" : "Be the change that you wish to see in the world.",
    "Socrates" : "Be as you wish to seem.",
    "Confucious" : "Life is really simple, but we insist on making it complicated.",
    "Mother Teresa" : "Peace begins with a smile.",
    "Maya Angelou" : "If you're always trying to be normal, you will never know how amazing you can be.",
    "Dr. Eric Williams" : "You are nobody's boss and nobody is your boss.",
    "Paulo Coelho" : "If you think small, your world will be small. If you think big, your world will be big.",
    "Pablo Neruda" : "You can cut all the flowers but you cannot keep spring from coming.",
    "Frederick Nietzsche" : "There are no beautiful surfaces without a terrible depth.",
    "Hypatia of Alexandria" : "Reserve your right to think, for even to think wrongly is better than to not think at all.",
    "Florence Nightingale" : "I attribute my success to this: I never gave or took an excuse.",
    "Coco Chanel" : "Success is often achieved by those who don't know that failure is inevitable.",
    "Eleanor Roosevelt" : "It takes as much energy to wish as it does to plan.",
    "Aang San Suu Kyi" : "The only real prison is fear and the only real freedom is freedom from fear.",
    "Albert Einstein" : "Only a life lived for others is worth living.",
    "Stephen J. Hawking" : "Quiet people have the loudest minds.",
    "Frederick Douglass" : "You are not judged by the height you have risen, but from the depth which you have climbed.",
    "Harriet Tubman" : "Every great dream begins with a dreamer.",
    "Geronimo, Ndendahe Apache Tribe" : "Wisdom and peace come when you start living the life the creator intended for you.",
    "Chief Wolf Robe, Southern Cheyenne Tribe" : "Our teacher first is our own heart.",
    "Crowfoot, Siksika Tribe" : "What is life? It is the flash of a firefly in the night. It is the breath of a buffalo in wintertime. It is the little shadow which runs across the grass and loses itself in the sunset.",
    "Oscar Wilde" : "What are you? To define is to limit.",
    "Alan Turing" : "Sometimes it is the people no one imagines anything of who do the things  that no one can imagine.",
    "Anne Frank" : "How wonderful it is that no one need wait a single moment before starting to improve the world.",
    "Virginia Woolf" : "No need to hurry. No need to sparkle. No need to be anybody but oneself.",
    "Amelia Earhart" : "The most difficult thing is the decision to act. The rest is merely tenacity.",
    "George Eliot" : "It is never too late to be what you might have been.",
    "Chief Joseph, Nez Perce Tribe" : "It does not require many words to speak the truth.",
    "Neil Gaiman" : "Whatever it is you're scared of doing, do it. Make your mistakes next year and forever.",
    "Martin Luther King Jr." : "The time is always ripe to do right.",
    "Ralph Waldo Emerson" : "Life is a journey, not a destination.",
    "Henry David Thoreau" : "The question is not what you look at, but what you see.",
    "Carl Jung" : "Until you make the unconscious conscious, it will direct your life and you will call it fate.",
    "Lao Tzu" : "If you correct your mind, the rest of your mind will fall into place.",
    "Alan Watts" : "No amount of anxiety makes any difference in what is going to happen.",
    "Japanese Proverb" : "The bamboo that bends is more durable than the oak that resists.",
    "Keigo Higashino" : "Sometimes, all you had to was exist to be someone's savior.",
    "Francine Jay" : "Make your life a haiku; simple, elegant and full of meaning.",
    "Akira Kurosawa" : "Man is a genius when he is dreaming.",
    "Isaac Asimov" : "Never let your sense of morals prevent you from doing what is right.",
    "Bertrand Russell" : "Do not fear to be eccentric in opinion, for every opinion now accepted was once eccentric.",
    "Santosh Kalwar" : "We are addicted to our thoughts. We cannot change anything if we cannot change our thinking.",
    "Haruki Murakami" : "Whatever it is you're seeking won't come in the form you're expecting.",
    "Ursula K. Le Guin" : "The only questions that really matter are the ones you ask yourself.",
    "Philip K. Dick" : "But reality really is a mess and yet it's exciting.",
    "Epicurus" : "The greater the difficulty, the more glory in surmounting it.",
    "Martin Heidigger" : "He who thinks great thoughts, often makes great errors.",
    "Maharashi Manesh Yogi" : "Happiness radiates like the fragrance from a flower and draws all good things towards you.",
    "David Hume" : "Beauty in things exists in the mind that contemplates them.",
    "Ramana Maharshi" : "Let come what comes, let go what goes. See what remains.",
    "Francis Bacon" : "The best part of beauty is that which no picture can express.",
    "William Shakespeare" : "If we are true to ourselves, we cannot be false to anyone.",
    "Emily Dickinson" : "We turn not older with years but newer every day.",
    "Sylvia Plath" : "The worst enemy to creativity is self-doubt.",
    "John Keats" : "Beauty is truth, truth beauty.",
    "Wolfgang Amadeus Mozart" : "The music is not in the notes, but the silence in between.",
    "Carl Sagan" : "The cosmos is in us. We are made of star stuff. We are a way for the universe to know itself.",
}

Minimal reproduction project

No response

Calinou commented 2 years ago

I can't reproduce this on 3.x b38ac3f09 (Linux). Can you upload a complete minimal project that exhibits the bug? The code sample doesn't suffice to reproduce the issue.

PS: Code blocks should use triple backticks like this (with an optional language name for syntax highlighting):

```gdscript code here ```

I edited your post accordingly, but remember to do this in the future :slightly_smiling_face:

asperkraken commented 2 years ago

Thanks for the info. I get the code syntax mixed up between forums.

i will upload a file when i can. I should also mention that this dictionary was put in an autoload script when this editor bug occurs.

For the record, the code is still functioning even with the console warning.