Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Challanges #85

Closed
PSLLSP opened this issue Feb 22, 2014 · 11 comments
Closed

Challanges #85

PSLLSP opened this issue Feb 22, 2014 · 11 comments

Comments

@PSLLSP
Copy link

PSLLSP commented Feb 22, 2014

Challange TheMaze; it complains that map was designed for engine 2 but I run version 5. But it works...

I finished first round and after reload, game crashed with this error:

Error: Scripts/statistics.lua:209: attempt to index a nil value
stack traceback:
Scripts/statistics.lua:209: in function 'passengerPickedUp'
Scripts/passenger.lua:207: in function 'boardTrain'
Scripts/ai.lua:396: in function 'foundPassengers'
Scripts/train.lua:322: in function 'new'
Scripts/train.lua:182: in function 'handleNewTrains'
Scripts/map.lua:1620: in function 'handleEvents'
main.lua:556: in function 'update'
[string "boot.lua"]:421: in function <[string "boot.lua"]:387>
[C]: in function 'xpcall'

@PSLLSP
Copy link
Author

PSLLSP commented Feb 22, 2014

Challange SmallTown2. Once it was running OK, second time it crashed shortly after start.
Details:

OWNER: 1 Challange2 nil
starting thread...train.renderTrainImage /home/test//.local/share//love/trAInsported/AI/Challange2.lua
Generating new tutorial map. Width: 10 Height: 7
Image Thread: nil
tutorialMap: string
new curMap: table: 0xaf1dfc20
Generating done!
Finished Map:


  • C C C C C C C C - - -
  • C H H C H H H - - - -
  • C H H C H - - - - - -
  • C C C C C - C C C C -
  • - - - - C - C H H C -
  • - - - - C C C STORE H C -
  • - - - - - - C C C C -

Start rendering: table: 0xaf1dfc20
Rendering Map...
Rendering done!
Rendered map with 10x7 tiles.
Initialising AI: ID: 1 Name: Challange2 /home/test//.local/share//love/trAInsported/AI/Challange2.lua
Error: Scripts/train.lua:664: attempt to index field 'image' (a nil value)
stack traceback:
Scripts/train.lua:664: in function 'showAll'
Scripts/map.lua:1532: in function 'show'
main.lua:697: in function 'draw'
[string "boot.lua"]:425: in function <[string "boot.lua"]:387>
[C]: in function 'xpcall'

@Germanunkol
Copy link
Owner

I have fixed the second crash. The problem was that, if an AI had errors in it, the AI's train image would not be rendered, so when reloading, the AI didn't find any image.

But I cannot recreate what you posted in your first issue. Do you still have this problem? And if so, could you send me the AI it happens with?

@PSLLSP
Copy link
Author

PSLLSP commented Feb 25, 2014

TheMaze challenge. I think that AI is not important; it was basic AI created during tutorial and it finished maze because it was designed in "easy" way. Just try to run TheMaze with any AI and after a few seconds select RELOAD. Try several times. In my case, TheMaze crashed on Reload action... I will retest later.

@Germanunkol
Copy link
Owner

Yes, I've tested it as you describe, and it never crashes for me...
I've fixed a few small bugs related to this, though. Your crash may just have been the result of one of those...

@PSLLSP
Copy link
Author

PSLLSP commented Feb 26, 2014

I updated game to the latest git version. I tried hard and I cannot repeat the issue.

Game crashed once but it was different situation, it crashed after start, this is the error and I cannot repeat it:

Rendering Map...
Rendering done!
Rendered map with 35x25 tiles.
Initialising AI: ID: 1 Name: Challange2 /home/test//.local/share//love/trAInsported/AI/Challange2.lua
After execution: true nil
C: [Challange2] Welcome!
After execution: true table: 0xaec8c2b8
Error: Scripts/train.lua:665: attempt to index field 'image' (a nil value)
stack traceback:
Scripts/train.lua:665: in function 'showAll'
Scripts/map.lua:1535: in function 'show'
main.lua:697: in function 'draw'
[string "boot.lua"]:425: in function <[string "boot.lua"]:387>
[C]: in function 'xpcall'

@Germanunkol
Copy link
Owner

Okay, thanks. I will need to look into the the train-image rendering once more. I think the issue is a timing thing: Sometimes, the train's images are not done rendering before the map starts - this should never be the case.

I might get around to it next tuesday, I don't have any time till then...

Germanunkol added a commit that referenced this issue Mar 3, 2014
@PSLLSP
Copy link
Author

PSLLSP commented Mar 4, 2014

I upgraded to the latest version from GIT.

I started the game, entered menu Challanges and selected TheMaze. This is the crash I observe:

Setting resolution to default values because no configuration has been found: 1024x600
OS Detected: Linux
Will look for AIs in: /home/test//.local/share//love/trAInsported/AI/
Deutsch.lua 8 3
English.lua 8 3
Español.lua 9 3
Finnish.lua 8 3
Russian.lua 8 3
Turkish.lua 8 3
Loading language file: Languages/English.lua
User Challenge Map found: 1. Smalltown1.lua
User Challenge Map found: 2. Smalltown2.lua
User Challenge Map found: 3. Smalltown3.lua
User Challenge Map found: 4. TheMaze.lua
Challenge Map found: 1. ExampleChallenge.lua
Error: Scripts/menu.lua:726: tesT
stack traceback:
[C]: in function 'error'
Scripts/menu.lua:726: in function 'event'
Scripts/button.lua:102: in function 'handleClick'
Scripts/input.lua:29: in function <Scripts/input.lua:3>
[string "boot.lua"]:412: in function <[string "boot.lua"]:387>
[C]: in function 'xpcall'

@Germanunkol
Copy link
Owner

Sorry! This was my fault - that's just an error I added manually for debugging. I removed it now.

@PSLLSP
Copy link
Author

PSLLSP commented Mar 4, 2014

I upgraded to the latest version from GIT.

When I run challenge, like TheMaze, I see a warning that map size is not set correctly and should be fixed. This message is visible few seconds on the screen and it is not visible in console, so I cannot do copy&paste to document the issue.

@PSLLSP
Copy link
Author

PSLLSP commented Mar 4, 2014

I have one more note on TheMaze challange. The map is random. I can reload the same AI several times on the same maze. But I cannot change AI. To change AI I had to EndMatch and select TheMaze again and select different AI from the list but because TheMaze is generated by random,I will run new AI on different map, so I cannot directly compare what AI is better. I would like to see a button like "select AI". Or EndMatch will not navigate me to the main menu but just return one level back, so I can select AI from the list and run the same TheMaze again.

Generally, I don't like that EndMatch button sends me to the main (root) menu and I would prefer to return just one level back.

@Germanunkol
Copy link
Owner

I'm going to copy your last post into a new issue ( #94 ) because I want to close this one - I believe all the bugs you mentioned here have been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants