« first day (730 days earlier)      last day (2450 days later) » 

12:01 AM
RELOAD!
[retailcoder/Rubberduck] 19 commits. 745 additions. 451 deletions.
[rubberduck-vba/Rubberduck] 4 commits. 4 opened issues. 2 closed issues. 14 issue comments. 92 additions. 99 deletions.
[skiwi2/bit-vector] 3 commits. 16 additions. 39 deletions.
[Vogel612/TranslationHelper\‌​] 3 commits. 2 issue comments. 41 additions. 24 deletions.
 
 
3 hours later…
3:00 AM
> Code Explorer bitmap needs to work with larger projects, but is usable with the visible treeview area for now
 
hi @MitropoulosMitropoulos lots of parsing fixes lately. Does your project parse in new builds?
 
@ThunderFrame what up! Sorry - I've been crazy busy with work lately and havent had a second to open any new builds (or keep up with what you guys have been up to, for that matter)
I was sorta kinda thinking I would wait for the beta, but if you think now is a good time to see what happens when I open some files, I can put that at the top of my list for Monday
 
There was a parsing bug for any module that had more than 1 WithEvents statement. I think you might just have that in your codebase?
 
lol
well, I haven't seen any... but there are oceans of the codebase I try not to look at, haha
so I wouldn't be surprised if there is
 
[rubberduck-vba/Rubberduck] build for commit 45243293 on unknown branch: AppVeyor build succeeded
 
3:05 AM
(much of it wasn't written by me, or by anyone in the last 5-10 years, for that matter)
@Mat'sMug @ThunderFrame @Hosch250 @Vogel612 @awgaya Let's do this, just let me know when you would like me to pull the latest build and try opening files. I was thinking I would wait until the beta, but I am happy to do what goes best for you guys. The thing is I don't have a ton of time (sadly) to devote since things have been busier than usual lately - hence me wanting to wait until a maximally impactful exploration into the Fangorn woods that is my codebase is possible.
 
@MitropoulosMitropoulos Well, a beta is imminent. If you're pressed for time, wait for the beta. If you find a spare chunk of time, build and break rejoice.
 
 
1 hour later…
4:32 AM
> Another photo to "show and tell" using Code Explorer. I'm initially thought this is a cool feature to show the user that there is a wait icon but realised later when I think this through could be my local VS2015 letting me know that threads are still processing. Does anything need to be done here?

![capture code explorer display](https://cloud.githubusercontent.com/assets/2254567/15803612/2980f898-2b2a-11e6-8791-9858bb29be1c.PNG)
 
5:13 AM
> Using clone on commit https://github.com/rubberduck-vba/Rubberduck/commit/8428eb473057e6b92d49d56b5d6720543cf53501 but referenced to my local git objects when error is detected.

I was surprised for RD to parse fail on a VBA code I was working on. I raise this issue because I could not see how I could not understand why it failed. The debug only provided a clue that it has failed and my options were limited in regards to no further information in determining why.

![capture parse error no
 
 
3 hours later…
8:07 AM
> The icon is part of the design of the form. You should only see it while the form is refreshing. I can't see your status toolbar, so I assume you got stuck on a Parse? IIRC this icon remaining visible is indicative of a parse failing because there is more than 1 workbook open
 
8:20 AM
> Looks like we *already* get the HelpContext and HelpFile with every call to `GetDocumentation` but we throw them away (along with the docString).

I started on implementing this until I realized that @Hosch250 already has a PR that involves the reference crawler. And, IIRC, @Hosch250 is going to work on the references code this week, so I aborted.

Looks like `QualifiedModuleName`, `QualifiedMemberName`, `ComParameter` and `Declaration`s might all need HelpFile and HelpContext fields.

I
 
 
2 hours later…
10:08 AM
> Hi, I'm trying to understand how Rubberduck works and can't find a clue how releasing COM object has been resolved.
As far as I remember each and every COM object should be declared and release separately. For releasing object `Marshal.ReleaseComObject() ` should be used but it occurs only twice in Rubberduck code.

So, can someone explain me thoroughly how it has been done, please?
 
10:21 AM
> The CodeExplorer should actually start displaying things already. The code has finished Parsing and is in the Resolving step. It seems these two things are still too tightly coupled and an error during Parsing doesn't correctly update the ParserState to `ResolverError`, but to `ParserError`.

Indicative of this are:

```
ParserState changed to 'Parsed', raising OnStateChanged
InspectionResultsViewModel handles StateChanged...
RubberduckParser handles OnStateChanged (Parsed)
(handling
 
10:39 AM
When I was working on #1703 I got a NRE in the ReferenceDeclarationsCollector
member.ModuleDeclaration was null on Line 297. @Mat'sMug that's your turf, right?
 
10:54 AM
> Can you post the code here maybe? I'd be especially interested in the `restLibrary` module because it took so long to parse.

`IParseTree for component 'restLibrary' acquired in 120775ms (thread 7)`
> The default value in this example is treated as part of the "as type clause", which is wrong and probably because of the expression rule in complexType. One way to solve this could be to introduce a new typeExpression and copy over only the expression parts (e.g. without EQ) that are allowed in type expressions. That could also simplify the new / typeofis expression rules. We would have to deal with duplicate expression context classes though.

```
Public Sub Test(ByVal a As Integer, Option
[rubberduck-vba/Rubberduck] autoboosh added label bug to issue [#1706: Wrong parse tree for [basetype]](github.com/rubberduck-vba/Rubberduck/issues/1706)
[rubberduck-vba/Rubberduck] autoboosh added label vba-grammar to issue [#1706: Wrong parse tree for [basetype]](github.com/rubberduck-vba/Rubberduck/issues/1706)
[rubberduck-vba/Rubberduck] autoboosh opened issue [#1706: Wrong parse tree for [basetype]](github.com/rubberduck-vba/Rubberduck/issues/1706)
> It's possible to specify the as type with [basetype] or even [OBJECT] which currently is not treated as an actual base type but as a complex type. Also, OBJECT can be both a type and a value (Nothing).
```
Public Sub Test(ByVal a As [Integer])
End Sub
```
 
11:44 AM
eurgh... tried to work around that NRE and got one in GetHashCode() for QualifiedModuleName instead
wtf?
that should basically be impossible
 
12:17 PM
> Thanks. Looks like that parses fine here in a reasonably amount of time (1sec, times 10 on a normal PC).
> Thanks. Looks like that parses fine here in a reasonable amount of time (1sec, times 10 on a normal PC).
 
12:32 PM
> I feel like we're talking about different things? What I meant is that we don't use e.g. VBComponent anywhere in code but at one place, where it would be used to create a "normal" CLR class. We would simply extract all information we need (e.g. the name, display name, ...). The rest of the codebase would only use those non-COM classes.
 
@Vogel612 how did you trigger that bug?
example code etc?
 
12:50 PM
#1703, and then add a null-check on line 297 in ReferenceDeclarationsCollector
if (member.ModuleDeclaration != null && [...]
 
1:34 PM
> Rubberduck is running in-process with the VBE; maybe we're doing this wrong, but basically we're leaving it to the runtime to determine when to let go and GC things... [which is basically undeterministic](http://stackoverflow.com/a/2260257/1188513). Perhaps this could be why we *sometimes* run into weird issues, like a project that remains in the VBE after its host document was closed...

Thanks for bringing this up.
Generalized RD's ignorance of IDispatch and IUnknown members. (#1699)

* Generalized RD's ignorance of IDispatch and IUnknown members.

* Quickfix for LONG_PTR => LongPtr
Adds Unit Test support for MS Project, adds basic bitmap copy of Code Explorer treeview (#1701)

* Adds RTF and XML Spreadsheet data formats

Still need to RTF-escape content values
Temporary Fix in InspectionResultBase, for instances of unsaved filename
boom.

* XML Spreadsheet builds from XMLWriter instead of StringBuilder

Adds ColumnInfos helper classes, for specifying and formatting column
titles, not yet fully implemented.

* Improves Clipboard export formatter

Adds a Docum
[rubberduck-vba/Rubberduck] build for commit 1d5a7af8 on next: AppVeyor build succeeded
 
1:51 PM
about in-process COM, is this relevant to us? stackoverflow.com/questions/159313/…
 
[rubberduck-vba/Rubberduck] build for commit b96664e3 on next: AppVeyor build succeeded
 
@awgaya I wonder if it applies to VBE addins, and if anything about it changed between Office 2007 and 2010
(Q/A's from 2008)
 
2:26 PM
> Forgive me if I'm wrong but I dont think it matters if you are in proc or out of proc. Every time you access a COM object from VBE, .NET automatically creates a Runtime Callable Wrapper (RCW) and calls AddRef on the COM object. This has to be released using Marshal.ReleaseComObject () as @LNow states (actually I have read it's best to use FinalReleaseComObject but I dont have sources at the moment as on a cell). This is most likely one reason why you're getting crashes on close.

That's
> BTW... Mike Rosenblum (Mr. Excel) is a great source for this. He has written a ton of stuff on this topic. Heres one stackoverflow.com/a/159419/864414
> @transistor1 in addition if you use COM object in chain like `Application.Workbook.Worksheet.Range` ReleaseComObject will not help you, as RWC can't handle it. It will release only the first one (Application), so you will end up Excel hanging in memory even if you close it.

What I have found is NetOffice creates it's own "object tree" in memory, so at the end of the day you only have to release ONE (aka. main) object, to release every child.
> @transistor1 in addition if you use COM objects in chain like `Application.Workbook.Worksheet.Range` ReleaseComObject will not help you, as RWC can't handle it. It will release only the first one (Application), so you will end up Excel hanging in memory even if you close it.

What I have found is NetOffice creates it's own "object tree" in memory, so at the end of the day you only have to release ONE (aka. main) object, to release every child.
 
2:49 PM
> > Exception thrown in thread 7:
> System.Runtime.InteropServices.COMException (0x80070006): System Error &H80070006 (-2147024890).

I suspect this is related to the underlying cause for #1633 and #1649. See my comment [here](https://github.com/rubberduck-vba/Rubberduck/issues/1633#issuecomment-223733598).
 
here it comes...
 
> @ckuhn203 This one's for you.
[rubberduck-vba/Rubberduck] build for commit 6ac19794 on unknown branch: AppVeyor build succeeded
 
3:06 PM
what was that with outlook tests and someone eating his hat?
or his rubberdudck?
 
yep - I have reminded him
TTGTB
 
good night
 
3:48 PM
> Beautiful hack! Just a couple of things. Why the empty catch? Mind adding some comments explaining why we need the hack to begin with? The current team know, but future maintainers might not immediately understand that Outlook doesn't have an Application.Run() method.
 
should we give netoffice another try?
 
@awgaya - I've been playing around with this, and AFAICT the comment @Mat'sMug made is closer to how RD is behaving. If the RCW was forcing COM objects to stay loaded, I'm not sure we could be getting 0x80070006 errors. Those are pointing to the opposite problem - the unmanaged side is releasing objects that the managed side still has open references to.
 
 
1 hour later…
5:17 PM
[rubberduck-vba/Rubberduck] retailcoder pushed 36 commits to next (only showing some of them below)
[rubberduck-vba/Rubberduck] ThunderFrame pushed commit 81399f58 to next: Merge branch 'next' of github.com/rubberduck-vba/Rubberduck into next
[rubberduck-vba/Rubberduck] ThunderFrame pushed commit a08aaa9a to next: Fixes conflict
[rubberduck-vba/Rubberduck] ThunderFrame pushed commit 44eb5afd to next: fixes merge conflict
[rubberduck-vba/Rubberduck] ThunderFrame pushed commit 9137c48d to next: Merge branch 'next' of github.com/rubberduck-vba/Rubberduck into next
[rubberduck-vba/Rubberduck] ThunderFrame pushed commit bcca2421 to next: Merge branch 'next' of github.com/rubberduck-vba/Rubberduck into next
Adds Unit Testing for MSProject

Application.Run() does exist but doesn't seem to work, so using
Application.Macro() instead.
[rubberduck-vba/Rubberduck] ThunderFrame pushed commit 45243293 to next: Adds MS Project Application.Macro method
[rubberduck-vba/Rubberduck] ThunderFrame pushed commit 53ffeb56 to next: Merge branch 'next' of github.com/rubberduck-vba/Rubberduck into next
Adds frikkin' Unit Tests in Outlook

yep, Unit Tests. in Outlook.
Merge pull request #1707 from ThunderFrame/next

Adds Unit Tests to Outlook
 
@Mat'sMug - I just did some testing and from what I'm seeing, the GC isn't releasing COM references. Test code:
        public void GarbageCollectionReleaseTest(VBE vbe)
        {
            var unknown = GetReferenceCounter(vbe);
            //guineapig and duplicate lost scope and should be eligible for collection at this point.
            GC.Collect();
            GC.WaitForFullGCComplete();
            Debug.WriteLine("References after GC.WaitForFullGCComplete: {0}", ReadReferenceCount(unknown));
        }

        public IntPtr GetReferenceCounter(VBE vbe)
        {
            //Get a marshalled VBProject. RCW gets one reference here.
 
[rubberduck-vba/Rubberduck] build for commit ccd6225f on next: AppVeyor build succeeded
 
Output:
References after guineapig created: 3
References after duplicate created: 3
References after GC.WaitForFullGCComplete: 3
 
So.. releasing wouldn't change anything right?
 
The second line seems to confirm that the RCW only keeps a single reference (unless that gets optimized away).
Excel seems to stop crashing on exit if I release the objects in my test addin.
The real WTF is this one:
References after guineapig created: 3
References after duplicate created: 3
References after Marshal.FinalReleaseComObject(guineapig): 1
I think I may need to find a way to run the same tests without involving the marshaller at all. Might be tricky, but I think OLE has native APIs I can use.
 
5:38 PM
The best part about this is, that I have not even the slightest clue as to wtf you're doing :D
3
 
5:59 PM
> @LNow if you look at the link by Mike Rosenblum above, he suggests calling `GC.Collect()` and `GC.WaitForPendingFinalizers()`, which is supposed to get rid of those intermediate objects that are created by the "two dots" problem you mentioned above (the objects you don't have a direct reference to). Then you are supposed to explicitly free objects with `Marshal.FinalReleaseComObject()`:

```
// Cleanup
GC.Collect();
GC.WaitForPendingFinalizers();

Marshal.FinalReleaseComObject(xlRng);
> @LNow if you look at the link by Mike Rosenblum above, he suggests calling `GC.Collect()` and `GC.WaitForPendingFinalizers()`, which is supposed to get rid of those intermediate objects that are created by the "two dots" problem you mentioned above (the objects you don't have a direct reference to). Then you are supposed to explicitly free the objects that you **do** have a reference to with `Marshal.FinalReleaseComObject()`:

```
// Cleanup
GC.Collect();
GC.WaitForPendingFinalizers();
 
Gah! Trying to determine how unmanaged code reacts to Interop interactions using C# is like trying to peek at Schrödinger's IUnknown.
2
 
> NetOffice isn't going to cut it, as we found out last year (see #113). Has anyone succeeded in creating a docked toolwindow with the NetOffice PIA's? There's a number of things Office and VBE add-ins are very different about.
 
6:16 PM
OK, apparently child Interop object do not get released after the parent is released and garbage collected. I put a call to Marshal.FinalReleaseComObject(vbe); into the reference counting test above, and the guineapig gets garbage collected, but never decrements its reference count on the COM side.
I'm coming to the conclusion that we need to start explicitly releasing references.
 
> NetOffice isn't going to cut it, as we found out last year (see #113 and PR #617). Has anyone succeeded in creating a docked toolwindow with the NetOffice PIA's? There's a number of things Office and VBE add-ins are very different about.
 
@Comintern ok.. boy this is going to get ugly
 
The lifetime management would be the hard part.
 
FWIW I am NOT switching to NetOffice at this point in the project
 
God no. I wouldn't do that regardless of the point in the project. I'm too much the control freak.
 
6:20 PM
high five
 
What I still don't get is how RD can be throwing 0x80070006 errors. That points to exactly the opposite problem. Leaking COM instances should prevent those.
 
7:08 PM
Possibly relevant, and make me realize that I've never run a release build of anything after the 1.4 version.
 
7:25 PM
> The debugger usually gets them on the Wrong Path, they want the Office program to exit on demand. The appropriate way to do that is by calling GC.Collect(). But they'll discover that it doesn't work when they debug their app, leading them into never-never land by calling Marshal.ReleaseComObject(). Manual memory management, it rarely works properly because they'll easily overlook an invisible interface reference. GC.Collect() actually works, just not when you debug the app.
Very interesting
 
Even Microsoft can't agree on this: One the one hand, Marshal.ReleaseComObject Considered Dangerous. On the other, Mixing deterministic and non-deterministic cleanup.
 
 
1 hour later…
8:38 PM
I think @Vogel612 just came up with a new inspection title:
> The best part about this is, that I have not even the slightest clue as to wtf you're doing :D
 
lol
 
OK, tested in release mode. All of the COM objects get released properly by the GC. The issue that causes Excel to remain open then crash with an access violation is related to concurrent garbage collection. If I disable it, everything seems to work just fine.
 
 
1 hour later…
@Comintern awesome!
 
10:31 PM
@Mat'sMug - Actually, I think that may also prove to be problematic. Although it does indicate that the GC is doing it's job at releasing COM objects. I do think that the thread pool needs to be rejoined into the main process before the final GC runs. A couple times I was able to trap errors that suggested that they were making COM calls on objects that had been already been released as the GC was running.
 
Can we do that in the app teardown code?
 
Yep, I think so. App gets held open as RD is closing because it's the last thing that gets disposed before the Ninject kernel in OnDisconnection.
 
I'm running 32-bit Excel, so I can add ActiveX controls to a worksheet. Does anyone that is using 64-bit know what the Developer Insert menu looks like, and what Excel does when it open a workbook with ActiveX controls on the sheets?
^ That's the 32-bit Tab.
 
10:48 PM
 
Thanks, so there are ActiveX controls in 64-bit...
 
11:59 PM
[retailcoder/Rubberduck] retailcoder pushed 40 commits to next (only showing some of them below)
inspection fix (#1696)

* added AsTypeName to the context-sensitive commandbar

* clear built-in references at every resolution; fixed issue with null parse trees, given built-in modules get a module state instance.

* fixed OverflowException in GetTypeName; built-in parameters now have return type info :)

* returning built-in members now have return type info as well

* removed hard-coded defaults in ClassModuleDeclaration

* added IsBadReadPtr check in COM declarations collector
[retailcoder/Rubberduck] ThunderFrame pushed commit bcca2421 to next: Merge branch 'next' of github.com/rubberduck-vba/Rubberduck into next
Adds Unit Testing for MSProject

Application.Run() does exist but doesn't seem to work, so using
Application.Macro() instead.
 

« first day (730 days earlier)      last day (2450 days later) »