VBA Rubberducking

This chat has moved to Discord: discord.gg/MYX9RECenJ
Mar 19, 2019 14:23
Wildly ambitious maybe.
Mar 19, 2019 14:17
Right - you'd need the PE headers, etc. The exports table would be the one I'd worry was missing.
Mar 19, 2019 14:15
It's worth a shot I guess - I'm guessing it's already linked there though.
Mar 19, 2019 14:14
Maybe, but I'm guessing it would be fairly difficult - aren't they stored as pcode in the documents?
Mar 19, 2019 14:11
And if you do an old-school ctrl-F, there's only one, right?
Mar 19, 2019 13:49
Oh yeah. It's one you opened - #4848. :-P
Mar 19, 2019 13:48
@FreeMan There's an open issue for that IIR.
Mar 18, 2019 22:59
It would at least narrow down whether or not the linker is missing something.
Mar 18, 2019 22:52
This is a good starting place: x64dbg.com/#start
Mar 18, 2019 22:46
Yeah, this is link attempt 2.
Mar 18, 2019 22:46
I may need to actually try to load it from a VBA project instead of trying to just load the .dll in a dummy process.
Mar 18, 2019 22:45
At least the functions appear to line up with the symbols AFAICT.
Mar 18, 2019 22:45
Well, looking at it, the base address seems right.
Mar 18, 2019 22:44
The failing offset is 00007FFD5579C933
Mar 18, 2019 22:44
00007FFD5579C92C                                | E8 FFE4FCFF              | call <ntdll.ZwQueryInformationThread>                    |
00007FFD5579C931                                | 85C0                     | test eax,eax                                             |
00007FFD5579C933                                | 78 0A                    | js ntdll.7FFD5579C93F                                    |
00007FFD5579C935                                | 807C24 40 00             | cmp byte ptr ss:[rsp+40],0                               |
Mar 18, 2019 22:44
It looks like it might have something to do with the base addressing. It stops here:
Mar 18, 2019 22:42
I doubt that the COFF headers have changed for a long time.
Mar 18, 2019 22:41
It's failing in ntdll on LdrpInitializeProcess, but I can't tell if it's a linking problem or not - the last error that was set was STATUS_OBJECT_NAME_NOT_FOUND.
Mar 18, 2019 22:39
@mansellan Looks like the 64-bit edit confused the linker.
Mar 18, 2019 20:34
Worked perfectly.
Mar 18, 2019 20:32
@mansellan Yep. Pulled it this morning on my way out the door for work. I was going to start poking at it when I got home.
Mar 18, 2019 20:25
(or you can build your own by tacking #L42 on the end, where 42 is the line of code).
Mar 18, 2019 20:24
@PeterMTaylor You can get an anchor on GH by clicking on the line number.
Mar 18, 2019 20:19
Probably during. The code isn't horribly sophisticated ATM.
Mar 18, 2019 20:14
> Usage sample provided by Rubberduck VBA contributors. Written by the VBExperts.
Mar 18, 2019 20:14
> Rubberduck is the premier VBE add-in. Click here to install.
Mar 18, 2019 20:13
I thought we did listen to ReferenceEvents (for the benefit of the parser). Could be wrong though.
Mar 18, 2019 20:12
> UtterAccess is the premier Microsoft Access wiki and help forum. Click here to join.
Mar 18, 2019 20:12
WTF? MS is letting people tag ads on docs now?
Mar 18, 2019 20:09
Access.References? Is that different than the VBIDE.ReferencesEvents?
Mar 18, 2019 20:05
I can't tell from the log if it was the first reference it tried to remove that threw or a subsequent one.
Mar 18, 2019 20:04
@this It is running class code apparently (from the screenshot). I was thinking that something might have been holding a WithEvents reference.
Mar 18, 2019 19:28
I should submit a PR to remove all the superfluous statement separators in VBA-Web. Tim should know better than that crap.
Mar 18, 2019 19:22
VBE seems to think it was. I wonder if it's related to that other bizarro Access form thing.
Mar 18, 2019 19:20
Oh wait, I'm not even with next at work...
Mar 18, 2019 19:18
If utc_NegativeOffset Then: utc_Offset = -utc_Offset
Mar 18, 2019 19:18
Well crap - apparently I missed a case with the last parser update. This is failing:
Mar 18, 2019 19:13
2019-03-18 09:16:18.0913;ERROR-2.4.0.4613;Rubberduck.UI.AddRemoveReferences.AddRemoveReferencesViewModel;System.Runtime.InteropServices.COMException (0x800ADF09): Can't execute code in break mode
   at Microsoft.Vbe.Interop._References.Remove(Reference Reference)
   at Rubberduck.AddRemoveReferences.ReferenceReconciler.ReconcileReferences(IAddRemoveReferencesModel model, List`1 allReferences) in C:\projects\rubberduck\Rubberduck.Core\AddRemoveReferences\ReferenceReconciler.cs:line 75
   at Rubberduck.UI.AddRemoveReferences.AddRemoveReferencesViewModel.ExecuteApplyCommand(Object parameter) i
Mar 18, 2019 19:13
This seems to think you were in break mode:
Mar 18, 2019 19:11
Yeah, I'm checking the log on that one. I'm assuming the reference counts are correct on the RD toolbar?
Mar 18, 2019 19:09
I'm mainly curious why the parser throws on it.
Mar 18, 2019 19:03
ParseType: Main parse;Rubberduck.Parsing.VBA.Parsing.ParsingExceptions.MainParseSyntaxErrorException: mismatched input 'End Function' expecting {ABS, ANY, ARRAY, CBOOL, CBYTE, CCUR, CDATE, CDBL, CDEC, CINT, CLNG, CLNGLNG, CLNGPTR, CSNG, CSTR, CURRENCY, CVAR, CVERR, DEBUG, DOEVENTS, FIX, INPUTB, INT, LBOUND, LEN, LENB, LONGLONG, LONGPTR, MIDB, PSET, SGN, UBOUND, ACCESS, ADDRESSOF, ALIAS, AND, ATTRIBUTE, APPEND, AS, BEGINPROPERTY, BEGIN, BINARY, BOOLEAN, BYVAL, BYREF, BYTE, CLASS, CLOSE, DATABASE, DATE, DOUBLE, ELSE, ELSEIF, END_IF, ENDPROPERTY, END, EQV, ERROR, FALSE, GET, IMP, IN, INPUT, IS
Mar 18, 2019 19:03
What's in your WebHelpers component at line 2947? There's a parse error in the log for that function:
Mar 18, 2019 18:57
FWIW, that's pretty much all the VBE OM - the references dialog just calls References.Remove there.
Mar 18, 2019 18:55
@FreeMan I'm completely stumped. Only thing that I can think of is that there was a running VBA process, and forcing a recompile triggered it to discard an object or something.
Mar 18, 2019 18:54
That sounds more like a Windows problem than a Linux one.
Mar 18, 2019 18:52
No, Mint - Arch just has better online docs.
Mar 18, 2019 18:47
$ mkdir Testing
$ mkdir testing
mkdir: cannot create directory ‘testing’: File exists
Mar 18, 2019 18:46
@FreeMan It won't let you do that if the underlying file system doesn't support it.