Comments (5)
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.
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.
Ah, and
print(collect_garbage())
gives me 5, not 4
from lobster.
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.
The garbage collector was removed from Lobster a while ago, so this error, whatever it was, is gone too :)
from lobster.
Related Issues (20)
- meshgen: subtractive/negative geometry HOT 2
- Build failure on OpenBSD HOT 3
- Missing include dir for libtcc HOT 4
- Assertion failed on size for small_vector<> HOT 6
- Grammar railroad diagram HOT 2
- Use of anonymous arguments multiple times in an expression causes a name collision HOT 1
- Passing too many arguments to an anonymous function doesn't yield compile time error HOT 3
- Crash due to possible heap use after free HOT 6
- Assertion in debug version of lobster with maybe incorrect code. HOT 2
- SpecializationIsCompatible assertion with implicit type in method parameter. HOT 2
- conv int to float - (float) HOT 1
- UNIX/Linux/Mac/BSD support? HOT 7
- [enhancement] shebang support in lobster scripts HOT 2
- "is" type test not usable with structs. HOT 1
- Only right multiplying float vectors by numerics is allowed HOT 2
- Assertion failure with debug lobster after updating to latest. HOT 3
- Android buld fail HOT 2
- Assertion failure with *= operator HOT 1
- SIGSEGV when function is passed as defult argument HOT 1
- release binaries does not run on some recent ubuntu version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lobster.