Lymkwi/python-minetest

test.py freezes on lighting test

bobombolo opened this issue · 2 comments

happens on every map I have tried

=> Lighting Complete Set/Get
^CTraceback (most recent call last):
  File "./test.py", line 317, in <module>
    main(sys.argv[1])
  File "./test.py", line 289, in main
    testLightingDone(map)
  File "./test.py", line 247, in testLightingDone
    if db.load_mapblock(i):
  File "/home/user/.minetest/mods/python-minetest-master/libminetest/map.py", line 639, in load_mapblock
    data = self.container.load(blockID)
  File "/home/user/.minetest/mods/python-minetest-master/libminetest/map.py", line 525, in load
    data = self.read(blockID)
  File "/home/user/.minetest/mods/python-minetest-master/libminetest/map.py", line 515, in read
    self.cur.execute("SELECT * from blocks where pos = {0}".format(blockID))
KeyboardInterrupt

To be quite honest I have not checked compatibility of my library with versions 0.4.15 and 0.4.16. I do know it's gonna break with versions beyond 0.4.16. I'll keep you informed.

I'm able to reproduce the same issue with a map generated on 0.4.14.
It is trying to load a block but is unable to do so. So it keeps looping and trying to load. The issue is that there are no blocks to be loaded on my side. Did you ever generate some?
This commit should change the script to detect the absence of mapblocks during the lighting test and abort that unit when there are none : 8bac60a. Let me know if it fixes things.