1

Re: Crash using >> with Lua language pack

I use ViEmu in VS 2005 SP1 for hybrid C++/Lua development, and I use the Lua language pack here: http://luaforge.net/projects/lualangpack/

There's two bugs that I've seen with it and ViEmu so far.  One, if the first file opened in a solution is a lua file, ViEmu does not turn on -- I have to switch to a C++ file, then switch back.  Not very obnoxious, but something.

The other thing is that VS immediately crashes if I use >> in a Lua file. << is fine, but >> crashes.  The VS "Increase Indent" button works fine too.

Is there a place I can get a crash report/callstack/dump so I can post it to file a genuine bug?

2

Re: Crash using >> with Lua language pack

Before I look into this, do you use any other 3rd party tool? It can easily affect the working of ViEmu enough to cause the crash. The delay before ViEmu intercepts the LUA file makes me think of Visual Assist X. If you go to Help|About, copy the contents there, and paste them back here or mail them to me, it will be helpful in trying to fix the problem.

On the other hand, in principle there is no need of a crash dump, I ask for one the few times it's necessary. VS allows generating one from its Debug | Save Minidump menu.

Regards,

  -- Jon

3

Re: Crash using >> with Lua language pack

jlong,

I've looked into this. I've fixed the problem where ViEmu would crash. This will be available in the next release of ViEmu (2.2.8, expected in the next few days, together with fixes for the % motion and for Resharper interaction issues).

But I can't make >> work correctly, there is some problem with the Lua language service that pack implements, which causes the call to

  IVsTextManager.GetUserPreferences(0, 0, LANGPREFERENCES *lp, 0)

to return E_INVALIDARG, even if the lp array seems to be filled with correct values. This is the way I can access the user's preferences about tabs-vs-spaces and indent size.

I adscribe this to a bug in their language service, rather than in ViEmu, because this call has to be and has been rock-solid with all other language services for several years now. I can't pay attention to values in the array if the return value is E_INVALIDARG.

It's probably easy for them to reproduce the problem, by calling that function from somewhere and seeing where it gets in their language service (I'm not an expert in that area of VS).

Meanwhile, ViEmu will insert a hard TAB when trying to indent.

I've also added code so that ViEmu won't wait for Visual Assist on Lua files, probably the best thing to do as VA is unlikely to do anything on those files, and it may be the fix you are looking for.

4

Re: Crash using >> with Lua language pack

jlong, if you want to give it an early test-drive, the 2.2.7.R#2 version I mention at the bottom of the following thread has the fixes:

  http://www.viemu.com/forums/viewtopic.php?id=485

This will be officially available in 2.2.8.

Regards,

  -- Jon

5

Re: Crash using >> with Lua language pack

Thanks!  I do use Visual Assist, so that's probably the delay problem.  Honestly, I'd be perfectly fine with >> not functioning, as long as it doesn't crash.  I'll check out the fixes.

Thanks.

edit:
Works great, both issues fixed!  Thanks!

Last edited by jlongstreet (2009-03-06 16:51:09)

6

Re: Crash using >> with Lua language pack

You're welcome. This will be official in 2.2.8. I'd try to get the Lua guys to fix their stuff, it will certainly cause other problems!

  -- Jon

7

Re: Crash using >> with Lua language pack

This is finally fixed in 2.2.8, see details here:

  http://www.viemu.com/blog/2009/03/12/viemuvs-228-released-better-resharper-support/