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

lanes assert failed #7

Closed
Heyter opened this issue Apr 2, 2020 · 6 comments
Closed

lanes assert failed #7

Heyter opened this issue Apr 2, 2020 · 6 comments
Assignees

Comments

@Heyter
Copy link

Heyter commented Apr 2, 2020

lua/includes/modules/lanes.lua:567: ASSERT failed: ......\lanes\src\lanes.c:2192 'nargs >= 0'

require'lanes'
lanes.configure()

Took this file https://github.com/danielga/gmod_lanes/blob/master/lanes.lua

error: timer_lane = gen( "*", { package= {}, priority = max_prio}, timer_body)() -- "*" instead of "io,package" for LuaJIT compatibility...

crash: https://github.com/danielga/gmod_lanes/releases/download/downloadables/lanes.lua

`require'lanes'
if lanes.configure then
lanes.configure()
end

function firstThread()
print('Hello World')
end

genFirstThread = lanes.gen( "*",firstThread )()`

@danielga danielga self-assigned this Apr 2, 2020
@danielga
Copy link
Owner

danielga commented Apr 2, 2020

What OS is this happening on? What branch of the game are you running this on (x86_64 and all derivatives are not supported)?

@Heyter
Copy link
Author

Heyter commented Apr 2, 2020

What OS is this happening on? What branch of the game are you running this on (x86_64 and all derivatives are not supported)?

Srcds 32 bit windows.
Windows 10.
Branch x86_64.

oh okay, i will try on default branch.

...
Nope, same problem.
Branch: public
Platform: Windows 10, srcds 32 bit.

...
Can to try this library https://github.com/effil/effil

@danielga
Copy link
Owner

danielga commented Apr 3, 2020

Use this lanes.lua and these builds please.

@Heyter
Copy link
Author

Heyter commented Apr 3, 2020

Use this lanes.lua and these builds please.

THis is code working.

f = lanes.gen( function( n) return 2 * n end)
a = f( 1)
b = f( 2)

print( a[1], b[1] )

Crash.

local body = function(param)
	print(param)
	return 1
end

print("lane result: " .. lanes.gen("*", body)("hello world!")[1])

@danielga
Copy link
Owner

danielga commented Apr 3, 2020

It's the print function. I don't know if there's much I can do about it (besides removing them) because Garry's Mod functions aren't thread safe.

@Heyter
Copy link
Author

Heyter commented Apr 4, 2020

It's the print function. I don't know if there's much I can do about it (besides removing them) because Garry's Mod functions aren't thread safe.

Then not need.

@Heyter Heyter closed this as completed Apr 4, 2020
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