GithubHelp home page GithubHelp logo

linux unit test failure about lobster HOT 5 CLOSED

aardappel avatar aardappel commented on August 24, 2024
linux unit test failure

from lobster.

Comments (5)

aardappel avatar aardappel commented on August 24, 2024

As you can see from the code just above it, it creates a cycle (a leak) on purpose consisting of 4 objects. Try printing out the return value from the GC to see what it is. Are you running any additional code besides unittest.lobster? does it do this when run by itself?

from lobster.

faassen avatar faassen commented on August 24, 2024

My invocation is this:

./lobster include/unittest.lobster

The output is this:

unittest.lobster(316): VM error: assertion failed
in function: run_test_cases -> unittest.lobster(321)
starttime = 0.008367
kk = 7
jj = 6
ii = 7
hh = 6
gg = 9
ff = 8
ee = 1
dd = 1
cc = 1
bb = 1
aa = 1
sot = [1, 2, 3, 4, 5]:__testc
sum = 45
co = (coroutine)
co2 = (coroutine)
co1 = (coroutine)
goapactions = [["kill wolf", , ]:goapaction, ....]
astar_result = ["......OXXXXXXXXXXXXXXXXXXXO......", ".....OXPPPPP..", ....]
path = [[8.000000, 0.000000, 8.000000, [7.000000, 1.000000, ....]:astar_node, ....]:astar_node, ....]
world = [[[0.000000, 0.000000, 0.000000, nil, .., nil, 0, 0, ....]:pathingcell, ....], ....]
endpos = [16, 9]:xy
startpos = [16, 1]:xy
worldsize = [33, 12]:xy
expected_result = ["......OXXXXXXXXXXXXXXXXXXXO......", ".....OXPPPPP..", ....]
initworld = [".................................", "..............", ....]
findex = 2
found = 2
sorted3 = [1, 1, 3, 3, 4, 4, 5, 5, 9, 9]
sorted2 = [1, 1, 3, 3, 4, 4, 5, 5, 9, 9]
sorted1 = [1, 1, 3, 3, 4, 4, 5, 5, 9, 9]
testvector = [3, 9, 5, 4, 1, 3, 9, 5, 4, 1]
b = [0]
a = 0
comperr1 = nil
compres1 = "3"
unicodetests = [12518, 12540, 12470, 12540, 21029, 12469, 12452, 12488]
err = nil
parsed = [1, 2, [3.000000, 4.000000, 5.000000]:xyz, "hello, ..", ....]
direct = [1, 2, [3.000000, 4.000000, 5.000000]:xyz, "hello, ..", ....]

from lobster.

faassen avatar faassen commented on August 24, 2024

Ah, and

print(collect_garbage())

gives me 5, not 4

from lobster.

aardappel avatar aardappel commented on August 24, 2024

Yeah, the output doesn't say anything.
So, that means it is somehow leaking 1 additional object. No idea how that is possible.
What you could try is removing any calls to collect_garbage(), then at the end of running it will complain about leaks, paste the contents of leaks.txt here. Mine gives:

0 = ["cycleinner", ["cycleinner", [.., ..]]]
1 = ["cycleouter", ["cycleouter", [.., .., ..], [.., ..]], ....]
2 = "cycleouter"
3 = "cycleinner"

from lobster.

aardappel avatar aardappel commented on August 24, 2024

The garbage collector was removed from Lobster a while ago, so this error, whatever it was, is gone too :)

from lobster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.