[Iup-users] Still can't get IUP to work properly in Windows
Brought to you by:
scuri
From: Simon O. <so...@go...> - 2010-07-05 11:02:40
|
I have posted several times now with various problems in getting IUP to work with Lua under Windows. Unfortunately I'm still having problems. On 18th June I posted about IUP tending to crash. I thought at the time that the problem was caused by the fact that I was building with MSVCR100.DLL and both Lua and IUP were using a different runtime. I had various problems in getting a build of IUP and Lua that used the same runtime as me, but there are now binaries available that do, and I used those. Another problem was solved when it was pointed out by Scuri that I had to keep the IUP.DLL in the same folder as my EXE. Unfortunately, now that I've done all that, I've discovered that it hasn't fixed my original crashing problem of 18th June. To quote: >> I can run an ordinary Lua script OK but when I try to run a script using >> IUP it tends to crash. When I run an IUP script I put require ("iuplua") at the top of the script. If I run a simple IUP-using script which just calls "iup.Alarm" it seems to work, the first few times I run it. But I run it from a script-selection dialog box. And if I close and re-open this dialog box, and then try and run the script again, my application usually crashes immediately with an unhandled exception (sometimes it just disappears). This doesn't happen if I run a non-IUP Lua script. << Debugging is tricky because the debug version of my app uses a different runtime (a debug runtime) to the Lua and IUP binaries. It seems more prone to crashing in the debug version - it happens a little less frequently in the release build. But the pattern is similar. For what it's worth, the call stack after a crash in the debug version goes through numerous layers of user32.dll calls, then a call to mfc100d.dll!_AfxActivationWndProc, then 4 more user32.dll calls, followed by a note saying "[Frames below may be incorrect and/or missing, no symbols loaded for iup.dll]. And the final call stack item is iup.dll!04040942. I tried using the latest 3.2 version of IUP (with VC10 pre-buildt binaries) but it doesn't seem to have made any difference. I also experimented with not freeing the lua library after running the script (which I normally do), but it didn't help. It may even have made it worse - i.e. crash more frequently. Incidentally the reason I've waited 2 weeks before posting was because I had another problem with Visual 2010, which was causing exceptions in some builds, and I wanted to wait till I'd fixed it to make quite sure it wasn't related. That problem is now fixed and it wasn't related. So - back to IUP. Perhaps the way forward is for me to work out how to build the Lua and IUP dlls myself so that I can debug them; but I struggled a bit when I tried that before. Any help and/or suggestions much appreciated. Simon |