-
Notifications
You must be signed in to change notification settings - Fork 28
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
Some stuff for Windows #12
base: master
Are you sure you want to change the base?
Conversation
Trying this again, now just editing lines by hand, so the whole thing doesn't get reformatted.
Moved around structs to appease MSVC.
Hi!
It created a luaproc.dll, and i could run the test file.
Any ideas? |
Well, since it is running actual threads, maybe it's complaining because they're not done? Do you have any better luck doing a |
Does not help. It even crashes when i just execute
|
Hmm, weird. What are you using to run the Lua files? The DLL registers a __gc that will do an implicit wait on Does any of this suggest anything: Similar problem? |
I had similar problems in the past: The culprit was lunitx: https://github.com/dcurrie/lunit/blob/master/lua/lunitx/atexit.lua |
@ggcrunchy i compiled Lua with mingw/msys using the provided makefile. |
it also crashes when i use the lua interpreter interactively |
Ok, here is some fix: The bug seems to be related to the "libgcc_s_dw2-1.dll crashes on exit" bug, which is floating around some while. Recompiled Lua and luaproc, now it works like this: If I put So in the end I have the following results: Compiled with dwarf mingw32:
Compiled with seh posix threads mingw-w64:
At least it does not crash, but I dont understand why in the second case the message is not shown. |
@blasti Good to hear you've solved it. The newer issue (not specific to luaproc) might simply be a matter of buffering; if so, you could try something like |
@ggcrunchy using ` |
Hi!
I've started making plugins for the Corona SDK and decided it might be fun to have a go at doing luaproc. I'm on Windows, so I've approached it from that angle.
I ran into a couple issues. As far as I can tell, this must be the pthreads library in use: pthreads-win32. Unfortunately, the pthread_t type seems to be a struct, throwing off the lua_pushlightuserdata() calls.
_MSC_VER is probably not the appropriate define; it's tied more to that library, but I didn't find any key constants in my admittedly brief search. The Lockless library, on the other hand, seems light userdata-friendly.
That's in lpsched.c; in luaproc.c, Visual Studio doesn't seem to like the
static luaproc mainlp;
line unless I move the struct beforehand, so I moved the two non-proc structs up with that in mind. Maybe there's a way to allow this, but I don't know it.After doing the above, plus a couple Corona-specific export details, the test script ran fine.
Anyhow, I just wanted to bring these details to your attention; do with them as you wish.