Got a message that says 'infinite loop detected', can move on


#1

I don’t know what to to! Noob here.

It says" The initial code to build the world never finished running. It’s probably either really slow or has an infinite loop. Or there might be a bug. You can either try running this code again or reset the code to the default state. If that doesn’t fix it, please let us know."

This is me letting someone know. Help please. :smile:


#2

Hey Deelas, what programming language are you using? If it’s not JavaScript or Python, it’s a bit easier to get infinite loops. You can try the “comment out my code” button to get into the level. Also, what level is it?

Otherwise, when it says that, please open up the Chrome JS console and look for error messages it might be giving you about why it can’t run the world. You can just paste the whole log here.

Hope to get you online soon!


#3

Thanks for replying Nick, I am using the Python language. I tried to select each button and nothing worked. I couldn’t even comment on my code. I don’t think I understand where I am suppose to create the actual code for the level. The only place I have had the opportunity to enter code is in the actually game. Like self.moveRight(). Is there a tutorial or am I suppose to learn by doing?


#4

The level is Raise the Sword, last thing I recall doing was choosing a new character, Hanzo, and purchasing spells and other equipment.


#5

Hi Nick! One more noob here )
I’ve got similar error on the “Dread Door” Level.
Error message: "Code never finished. It’s either really slow or has an infinite loop"
Mission where we need to destroy the Door
CofeeScript language.
My code:

loop
    @attack "Door"

I tried to close the loop with “return” and “moveUp”, but it didn’t help.
Will it be helpful to post all JS Console Log here?
I’m really noob with web development, so don’t be strict )


#6

Sounds like a bug! Yeah, posting the JS console log here will help a lot.


#7

lib
views/account/AccountSettingsView
views/play
ModuleLoader.coffee:92 loaded 3 files, 962 KB
v3:1 Mixed Content: The page at ‘https://checkout.stripe.com/v3’ was loaded over HTTPS, but requested an insecure image ‘http://codecombat.com/images/pages/base/logo_square_250.png’. This content should also be served over HTTPS.
ThangType.coffee:442 Trying to determine whether Bronze Shield should be a silhouetted item, but it has no gem cost.
ThangType.coffee:442 Trying to determine whether Crude Builder’s Hammer should be a silhouetted item, but it has no gem cost.
ThangType.coffee:442 Trying to determine whether Crude Glasses should be a silhouetted item, but it has no gem cost.
ThangType.coffee:442 Trying to determine whether Sundial Wristwatch should be a silhouetted item, but it has no gem cost.
ThangType.coffee:442 Trying to determine whether Wooden Shield should be a silhouetted item, but it has no gem cost.
http://codecombat.com/file/interface/menu-button-click.mp3 Failed to load resource: the server responded with a status of 404 (Not Found)
http://codecombat.com/file/interface/game-menu-close.mp3 Failed to load resource: the server responded with a status of 404 (Not Found)
CocoModel.coffee:86 Populated defaults for Level Dread Door in 38ms
ModuleLoader.coffee:91 vendor/aether-coffeescript
ModuleLoader.coffee:92 loaded 1 files, 0 KB
Level.coffee:163 Potion Master couldn’t find lc for Object of Array[29]
Level.coffee:163 Potion Master couldn’t find lc for Object of Array[29]
Level.coffee:163 Potion Master couldn’t find lc for Object of Array[29]
Level.coffee:163 Potion Master couldn’t find lc for Object of Array[29]
Level.coffee:163 Samurai couldn’t find lc for Object of Array[29]
Level.coffee:163 Samurai couldn’t find lc for Object of Array[29]
Level.coffee:163 Trapper couldn’t find lc for Object of Array[29]
Level.coffee:163 Trapper couldn’t find lc for Object of Array[29]
Level.coffee:163 Forest Archer couldn’t find lc for Object of Array[29]
Level.coffee:163 Forest Archer couldn’t find lc for Object of Array[29]
Level.coffee:163 Forest Archer couldn’t find lc for Object of Array[29]
Level.coffee:163 Forest Archer couldn’t find lc for Object of Array[29]
Level.coffee:163 Forest Archer couldn’t find lc for Object of Array[29]
Level.coffee:163 Forest Archer couldn’t find lc for Object of Array[29]
Level.coffee:163 Sorcerer couldn’t find lc for Object of Array[29]
Level.coffee:163 Sorcerer couldn’t find lc for Object of Array[29]
Level.coffee:163 Sorcerer couldn’t find lc for Object of Array[29]
Level.coffee:163 Sorcerer couldn’t find lc for Object of Array[29]
LevelLoader.coffee:379 World has been initialized from level loader.
Level.coffee:163 Potion Master couldn’t find lc for Object of Array[29]
Level.coffee:163 Potion Master couldn’t find lc for Object of Array[29]
Level.coffee:163 Potion Master couldn’t find lc for Object of Array[29]
Level.coffee:163 Potion Master couldn’t find lc for Object of Array[29]
Level.coffee:163 Samurai couldn’t find lc for Object of Array[29]
Level.coffee:163 Samurai couldn’t find lc for Object of Array[29]
Level.coffee:163 Trapper couldn’t find lc for Object of Array[29]
Level.coffee:163 Trapper couldn’t find lc for Object of Array[29]
Level.coffee:163 Forest Archer couldn’t find lc for Object of Array[29]
Level.coffee:163 Forest Archer couldn’t find lc for Object of Array[29]
Level.coffee:163 Forest Archer couldn’t find lc for Object of Array[29]
Level.coffee:163 Forest Archer couldn’t find lc for Object of Array[29]
Level.coffee:163 Forest Archer couldn’t find lc for Object of Array[29]
Level.coffee:163 Forest Archer couldn’t find lc for Object of Array[29]
Level.coffee:163 Sorcerer couldn’t find lc for Object of Array[29]
Level.coffee:163 Sorcerer couldn’t find lc for Object of Array[29]
Level.coffee:163 Sorcerer couldn’t find lc for Object of Array[29]
Level.coffee:163 Sorcerer couldn’t find lc for Object of Array[29]
aether.js:22391 Simple loop not implemented for CoffeeScript
aether.js:21173 escodegen couldn’t handle t.(anonymous function)
gave error: Error: Invalid mapping: {“generated”:{“line”:5,“column”:25},“source”:“plan”,“original”:{“line”:0,“column”:0},“name”:“accum$”}
God.coffee:69 Ptah: Let there be light upon Dread Door! (preload: false)
ThangType.coffee:214 Built sheet: Knight 896ms Async (Portrait)
Angel.coffee:47 |Ptah’s Lana| Worker initialized after 4154ms
Angel.coffee:47 |Ptah’s Pam| Worker initialized after 3940ms
Angel.coffee:47 |Ptah’s Lana| Generated random seed 3352650751 of type submissionCount from sessionIDs 5481bc75b5cf8a5f052acadc submissionCount 0
Angel.coffee:47 |Ptah’s Lana| The world ended in won on frame 63
Angel.coffee:47 |Ptah’s Lana| Worker initialized after 704ms
SpellView.coffee:261 Locking down default code.
aether.js:22391 Simple loop not implemented for CoffeeScript
2God.coffee:69 Ptah: Let there be light upon Dread Door! (preload: false)
Angel.coffee:47 |Ptah’s Pam| Generated random seed 3352650751 of type submissionCount from sessionIDs 5481bc75b5cf8a5f052acadc submissionCount 0
Angel.coffee:47 |Ptah’s Pam| The world ended in lost on frame 76
LevelLoader.coffee:277 SuperModel for Level loaded in 50876 ms
Angel.coffee:47 |Ptah’s Pam| And it was so: (12.421ms per frame, 76 frames)
Simulation : 944ms
Serialization: 26ms
Delivery : 58ms
aether.js:22391 Simple loop not implemented for CoffeeScript
PlayLevelView.coffee:135 Level unveiled after 51.47s
Angel.coffee:47 |Ptah’s Lana| Worker initialized after 1147ms
http://codecombat.com/file/interface/code-change.mp3 Failed to load resource: the server responded with a status of 404 (Not Found)
ace.js:1 ‘KeyboardEvent.keyLocation’ is deprecated. Please use ‘KeyboardEvent.location’ instead.
aether.js:22391 Simple loop not implemented for CoffeeScript
/javascripts/aether.js:2327 escodegen couldn’t handle t.(anonymous function)
gave error: Error: Invalid mapping: {“generated”:{“line”:5,“column”:25},“source”:“plan”,“original”:{“line”:0,“column”:0},“name”:“accum$”}
(program):72 Ptah: Let there be light upon Dread Door! (preload: true)
(program):6 |Ptah’s Lana| Generated random seed 3352650751 of type submissionCount from sessionIDs 5481bc75b5cf8a5f052acadc submissionCount 0
(program):6 |Ptah’s Lana| Hero Placeholder had new Programmable problem: [object Object]
(program):6 |Ptah’s Lana| The world ended in lost on frame 76
/javascripts/aether.js:2406 Simple loop not implemented for CoffeeScript
/javascripts/aether.js:2327 escodegen couldn’t handle t.(anonymous function)
gave error: Error: Invalid mapping: {“generated”:{“line”:5,“column”:25},“source”:“plan”,“original”:{“line”:0,“column”:0},“name”:“accum$”}
(program):72 Ptah: Let there be light upon Dread Door! (preload: false)
(program):6 |Ptah’s Pam| Generated random seed 3352650751 of type submissionCount from sessionIDs 5481bc75b5cf8a5f052acadc submissionCount 0
(program):6 |Ptah’s Pam| The world ended in won on frame 63
(program):72 Ptah: Let there be light upon Dread Door! (preload: false)
(program):6 |Ptah’s Lana| Generated random seed 3352650751 of type submissionCount from sessionIDs 5481bc75b5cf8a5f052acadc submissionCount 0
(program):6 |Ptah’s Lana| The world ended in won on frame 63
(program):6 |Ptah’s Pam| Worker initialized after 1414ms
(program):6 |Ptah’s Lana| Worker initialized after 984ms
http://codecombat.com/play/level/dread-door Failed to load resource: net::ERR_CACHE_MISS
3aether.js:2406 Simple loop not implemented for CoffeeScript
aether.js:2327 escodegen couldn’t handle t.(anonymous function)
gave error: Error: Invalid mapping: {“generated”:{“line”:5,“column”:25},“source”:“plan”,“original”:{“line”:0,“column”:0},“name”:“accum$”}
aether.js:2406 Simple loop not implemented for CoffeeScript
aether.js:2327 escodegen couldn’t handle t.(anonymous function)
gave error: Error: Invalid mapping: {“generated”:{“line”:5,“column”:25},“source”:“plan”,“original”:{“line”:0,“column”:0},“name”:“accum$”}
aether.js:2406 Simple loop not implemented for CoffeeScript
aether.js:2327 escodegen couldn’t handle t.(anonymous function)
gave error: Error: Invalid mapping: {“generated”:{“line”:5,“column”:25},“source”:“plan”,“original”:{“line”:0,“column”:0},“name”:“accum$”}
aether.js:2406 Simple loop not implemented for CoffeeScript
aether.js:2327 escodegen couldn’t handle t.(anonymous function)
gave error: Error: Invalid mapping: {“generated”:{“line”:5,“column”:25},“source”:“plan”,“original”:{“line”:0,“column”:0},“name”:“accum$”}


#8

Here’s the JS console

The page at ‘https://checkout.stripe.com/v3’ was loaded over HTTPS, but displayed insecure content from ‘http://codecombat.com/images/pages/base/logo_square_250.png’: this content should also be loaded over HTTPS.
v3:1
Trying to determine whether Bronze Shield should be a silhouetted item, but it has no gem cost. ThangType.coffee:442
Trying to determine whether Crude Builder’s Hammer should be a silhouetted item, but it has no gem cost. ThangType.coffee:442
Trying to determine whether Crude Glasses should be a silhouetted item, but it has no gem cost. ThangType.coffee:442
Trying to determine whether Faux Fur Hat should be a silhouetted item, but it has no gem cost. ThangType.coffee:442
Trying to determine whether Programmaticon I should be a silhouetted item, but it has no gem cost. ThangType.coffee:442
Trying to determine whether Sundial Wristwatch should be a silhouetted item, but it has no gem cost. ThangType.coffee:442
Trying to determine whether Wooden Shield should be a silhouetted item, but it has no gem cost. ThangType.coffee:442
Failed to load resource: the server responded with a status of 404 (Not Found) http://codecombat.com/file/interface/game-menu-close.mp3
Failed to load resource: the server responded with a status of 404 (Not Found) http://codecombat.com/file/interface/menu-button-click.mp3
Populated defaults for Level The Raised Sword in 44ms CocoModel.coffee:86
vendor/aether-python ModuleLoader.coffee:91
loaded 1 files, 0 KB ModuleLoader.coffee:92
Potion Master couldn’t find lc for Object of Array[31] Level.coffee:163
Potion Master couldn’t find lc for Object of Array[31] Level.coffee:163
Potion Master couldn’t find lc for Object of Array[31] Level.coffee:163
Potion Master couldn’t find lc for Object of Array[31] Level.coffee:163
Trapper couldn’t find lc for Object of Array[31] Level.coffee:163
Trapper couldn’t find lc for Object of Array[31] Level.coffee:163
Forest Archer couldn’t find lc for Object of Array[31] Level.coffee:163
Forest Archer couldn’t find lc for Object of Array[31] Level.coffee:163
Forest Archer couldn’t find lc for Object of Array[31] Level.coffee:163
Forest Archer couldn’t find lc for Object of Array[31] Level.coffee:163
Forest Archer couldn’t find lc for Object of Array[31] Level.coffee:163
Forest Archer couldn’t find lc for Object of Array[31] Level.coffee:163
Sorcerer couldn’t find lc for Object of Array[31] Level.coffee:163
Sorcerer couldn’t find lc for Object of Array[31] Level.coffee:163
Sorcerer couldn’t find lc for Object of Array[31] Level.coffee:163
Sorcerer couldn’t find lc for Object of Array[31] Level.coffee:163
Trapper couldn’t find lc for Object of Array[31] Level.coffee:163
Trapper couldn’t find lc for Object of Array[31] Level.coffee:163
Potion Master couldn’t find lc for Object of Array[31] Level.coffee:163
Potion Master couldn’t find lc for Object of Array[31] Level.coffee:163
Potion Master couldn’t find lc for Object of Array[31] Level.coffee:163
Potion Master couldn’t find lc for Object of Array[31] Level.coffee:163
World has been initialized from level loader. LevelLoader.coffee:379
Potion Master couldn’t find lc for Object of Array[31] Level.coffee:163
Potion Master couldn’t find lc for Object of Array[31] Level.coffee:163
Potion Master couldn’t find lc for Object of Array[31] Level.coffee:163
Potion Master couldn’t find lc for Object of Array[31] Level.coffee:163
Trapper couldn’t find lc for Object of Array[31] Level.coffee:163
Trapper couldn’t find lc for Object of Array[31] Level.coffee:163
Forest Archer couldn’t find lc for Object of Array[31] Level.coffee:163
Forest Archer couldn’t find lc for Object of Array[31] Level.coffee:163
Forest Archer couldn’t find lc for Object of Array[31] Level.coffee:163
Forest Archer couldn’t find lc for Object of Array[31] Level.coffee:163
Forest Archer couldn’t find lc for Object of Array[31] Level.coffee:163
Forest Archer couldn’t find lc for Object of Array[31] Level.coffee:163
Sorcerer couldn’t find lc for Object of Array[31] Level.coffee:163
Sorcerer couldn’t find lc for Object of Array[31] Level.coffee:163
Sorcerer couldn’t find lc for Object of Array[31] Level.coffee:163
Sorcerer couldn’t find lc for Object of Array[31] app.js:165
Trapper couldn’t find lc for Object of Array[31] app.js:165
Trapper couldn’t find lc for Object of Array[31] app.js:165
Potion Master couldn’t find lc for Object of Array[31] app.js:165
Potion Master couldn’t find lc for Object of Array[31] app.js:165
Potion Master couldn’t find lc for Object of Array[31] app.js:165
Potion Master couldn’t find lc for Object of Array[31] app.js:165
Locking down default code. (program):1040
Wepwawet: Let there be light upon The Raised Sword! (preload: false) (program):72
Built sheet: Samurai 1264ms Async (Portrait) app.js:264
|Wepwawet’s Krieger| Worker initialized after 4696ms (program):6
|Wepwawet’s Cheryl| Worker initialized after 4620ms (program):6
|Wepwawet’s Krieger| Generated random seed -3630880435 of type submissionCount from sessionIDs 5482ab960c555f3f0533cc10 submissionCount 0 (program):6
|Wepwawet’s Krieger| The world ended in lost on frame 150 (program):6
|Wepwawet’s Krieger| Worker initialized after 816ms (program):6
2Failed to load resource: net::ERR_CACHE_MISS http://codecombat.com/play/level/the-raised-sword


#9

Hey Nick, I figured it out thanks!


#10

Deelas, what was the solution? you can’t just say you figured it out and not explain how!! :smile: but seriously…


#11

LOL, sorry. Well I thought about the last thing I did. Before that level I upgraded my armor and shield. After looking at the JS I saw it mentioning that it kept saying it couldn’t find certain things. So I just went back and removed the items that I equipped. I don’t think we are suppose to manipulated things at that stage of the game. Afterward everything worked fine.

I concluded it was either that or nick fixed something and didn’t say, and I just happened to change my armor afterward( lucky timing) lol.


#12

@R_A I see it’s a CoffeeScript bug that I haven’t been able to work around yet. Sorry about this; it’s on my list. For now, I’d suggest trying JS or Python when CoffeeScript doesn’t work like this.


#13

I actually don’t think it is an error. The error is that you allow and even recommend completion using this method. Sure the goal will be achieved, but the loop would continue. Of course this requires teaching conditions and loop breaks.

Used CoffeeScript with 3 hidden statements (if, not(!), break) to break the loop:

loop
    enemy = @findNearestEnemy()
    if !enemy
        break
    @attack enemy

Although yea the loop would continue until time runs out, so maybe not that bad.


#14

Well i don’t know if it’s really the solution but an hour ago i encountered the same problem.
And when i opened it in an Incognito Browser it worked :slight_smile: silly, right?)