Multiple Comment then Uncomment Either Crush the HE or do not uncomment

Started by Arthur, May 25, 2009, 06:10:09 PM

Previous topic - Next topic

Arthur

Well, try the following:

1) you have the following text
USE Northwind;
GO

2) Comment several times (2+) it when the cursor is there:

USE Northwind;
G|O

3) Uncomment and get

U/*SE Northwind;

Arthur

Oh and the crash occurs when you mix the comments up in an SQL file at least, so if you position the cursor differently within the text and comment/uncomment eventually HE will exit.

Arthur

And, at some point after that doing just an undo I am getting a window

---------------------------
HippoEDIT
---------------------------
The parameter is incorrect.


---------------------------
OK   
---------------------------

Arthur

Aha, I now can reproduce the crashes at will:

I can do

a) the -- comment by selecting the whole lines, then
b) position the cursor in the middle of the text block,
c) now if you do multiple comments (/* */) then undo them HE closes off.

alex

Hi Arthur,

I can reproduce situation with:
Quote3) Uncomment and get
U/*SE Northwind;
Would try to fix today version.

But crash I cul not reproduce even wit this example:
Quotea) the -- comment by selecting the whole lines, then
b) position the cursor in the middle of the text block,
c) now if you do multiple comments (/* */) then undo them HE closes off.

I see some problems with multi line undo, maybe they were reason, let us see with new beta.
Thanks for a bug report!

Best regards,
Alex
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Arthur

QuoteBut crash I cul not reproduce even wit this example:

Quote
a) the -- comment by selecting the whole lines, then
b) position the cursor in the middle of the text block,
c) now if you do multiple comments (/* */) then undo them HE closes off.

I could again, this is just a matter of doing that several times, do-undo - comment-uncomment. Trying to undo does not crash though, just flags off that message. Try just commenting say five times in a row then uncomment in /*-*/ mode.

Arthur

How to reproduce for sure (it is happening fairly often):
1) Put the cursor like that
USE |Northwind;
Go;
so the highlight goes/crosses from one line to another.
2) Start commenting 20+ times then just start uncommenting (perhaps you need to reposition the cursor at some point in time), boom it goes! Btw, if you make the cursor positioned this way:
USE Northwind;
G|o
or perhaps anyways HE will bomb. I also go the parameter error by just uncommenting. So the key is to comment multiple times.

So, the other time I got the exit condition I allowed the VS debugger to take over the crash, the ending was:

The thread 'Win32 Thread' (0x27c) has exited with code -1073741811 (0xc000000d).
The thread 'Win32 Thread' (0x1400) has exited with code -1073741811 (0xc000000d).
The thread 'Win32 Thread' (0x49c) has exited with code -1073741811 (0xc000000d).
The thread 'Win32 Thread' (0x3d4) has exited with code -1073741811 (0xc000000d).
The thread 'Win32 Thread' (0x7e4) has exited with code -1073741811 (0xc000000d).
The thread 'Win32 Thread' (0x1714) has exited with code -1073741811 (0xc000000d).
The program '[5752] HippoEdit.exe: Native' has exited with code -1073741811 (0xc000000d).

Not sure if this is super helpful

alex

Ok,

would try to check this once more in a week :)
New version with fix for mutiline comment just uploaded (history not yet updated, but it is there :) ). Ver 661.
Try with it, if still crashed, than I would check this later.

And thanks a lot for your efforts.

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Arthur

Thank you, and sorry, I want you to take a rest. Well, so far, after I took this build HE did not crash :)!

But after doing so many un-comments it simply stopped doing that at this:

USE /*/*/*/*/*Northwind;
Go;*/*/*/*/*/*/*/*/*/*/*/

Arthur

Aha, I can see the uncomment starts malfunctioning after some number of comments removed, e.g. I can get, and this is only if one repositions the cursor while commenting-uncommenting.

USE /*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*Northwind;
Go;*/*/*/*/*/*/*/*/

This is of course me humiliating poor HE  :-X

PS: So the count does get incorrectly as in the above even with very few un-comments like
USE N/*/*orthwind;
Go;*/*/*/