[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: string.sub still failing, problem seems a bit weird...
- From: "Framework Studios: Hugo" <hugo@...>
- Date: Thu, 3 Nov 2005 17:01:06 +0100
Hi all!
I still have the problem string.sub is failing since I moved from LUA 5.0 to
LUA 5.1. It's becoming a bit of a mystery.
I've debugged it a bit more. If I do a string.sub("Testje", 4, 1) in the
beginning of the application, just after initialising LUA, I get "Test"
back. So in the beginning, everything is fine. At some point later in the
application however, string.sub always returns an empty string no matter
what I give it for parameters. I'm sure I'm not overwriting string.sub.
I actually zoomed in to a call to DirectX9-s CreateDevice() (which returns
successfully, I don't think it is memory leaking / writing in invalid
places). *Right* before CreateDevice() string.sub works, *right* after
CreateDevice(), string.sub fails. No other threads are active at that point.
Another weird thing about this is all other functionality of LUA seems to
remain in tact. My application starts and works fine except for the code
using string.sub... so for example string.match still works fine.
I'm using Visual C++ .NET 2003, all libraries are statically linked but
compiled as multithreading DLL (so they share the heap etc.). The problem
exists in both Debug and Release mode.
Has anyone had simular problems or can anyone give me a clue to what I could
be doing wrong?
Thanks!
Hugo