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?


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.


  -- Jon


Re: Crash using >> with Lua language pack


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.


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:


This will be officially available in 2.2.8.


  -- Jon


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.


Works great, both issues fixed!  Thanks!

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


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


Re: Crash using >> with Lua language pack

This is finally fixed in 2.2.8, see details here: