Rubberduck icon indicating copy to clipboard operation
Rubberduck copied to clipboard

Can't work with office 2019 in PowerPoint

Open tyysoft opened this issue 3 years ago • 5 comments

Rubberduck version information The info below can be copy-paste-completed from the first lines of Rubberduck's log or the About box:

Rubberduck version [2.5.2.6119]
Operating System: [Windows 10 professional. Windows nt 10.0.19042.0 x64]
Host Product: [Microsoft office x64]
Host Version: [16.0.10389.20033]
Host Executable: [PowerPoint.exe]

Description Can not parse VBA code , click refresh button on menu, it end immediately, and tool bar shows "unexpected error"

To Reproduce Steps to reproduce the behavior:

  1. Open a pptm file
  2. Alt + F11 open the VBA Editor
  3. Click menu rubberduck->refresh
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Logfile Rubberduck generates extensive logging in TRACE-Level. If no log was created at %APPDATA%\Rubberduck\Logs, check your settings. Include this log for bug reports about the behavior of Rubberduck.

For some reason, can't upload log file, the key message is : Rubberduck.parsing.vba.parsecoordinator; unexpected exception thrown in parsing run . (Thread 45).; System.overflowexception: value for int16 is too big or small.

Additional context Add any other context about the problem here.

tyysoft avatar Sep 08 '22 10:09 tyysoft

Same error here, log:

2023-11-08 17:34:03.7020;INFO-2.5.9.6304;Rubberduck.Common.LogLevelHelper;
	Rubberduck version 2.5.9.6304 loading:
	Operating System: Windows 10 Education 2009 x64 (Microsoft Windows NT 10.0.19045.0)
	Host Product: Microsoft Office 2013 x64
	Host Version: 15.0.5589.1000
	Host Executable: EXCEL.EXE;
2023-11-08 17:34:05.2053;INFO-2.5.9.6304;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState.StateChanged invocation 22 sets status to 'Started'.;
2023-11-08 17:34:05.4800;INFO-2.5.9.6304;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState.StateChanged invocation 23 sets status to 'LoadingReference'.;
2023-11-08 17:34:05.5839;INFO-2.5.9.6304;Rubberduck.Parsing.Common.ParsingStageTimer;Loaded ComProjects for user projects in 98ms.;
2023-11-08 17:34:05.6049;ERROR-2.5.9.6304;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run on thread 14.;System.OverflowException: value for int16 is too big or small.
   at System.Convert.ToInt16(Char value)
   at Rubberduck.Parsing.VBA.Extensions.StringExtensions.ToVbExpression(String managed, Boolean useConsts)
   at Rubberduck.Parsing.ComReflection.DeclarationsFromComProjectLoader.GetDeclarationsForModule(IComType module, QualifiedModuleName moduleName, ProjectDeclaration project)
   at Rubberduck.Parsing.ComReflection.DeclarationsFromComProjectLoader.LoadDeclarations(ComProject type, String projectId)
   at Rubberduck.Parsing.VBA.DeclarationResolving.UserComProjectSynchronizer.LoadProjects(IEnumerable`1 projectIds)
   at Rubberduck.Parsing.VBA.DeclarationResolving.UserComProjectSynchronizer.SyncUserComProjects()
   at Rubberduck.Parsing.VBA.ParseCoordinator.SyncDeclarationsFromUserComProjects(IReadOnlyCollection`1 toParse, CancellationToken token, HashSet`1 toReresolveReferences)
   at Rubberduck.Parsing.VBA.ParseCoordinator.ExecuteCommonParseActivities(IReadOnlyCollection`1 toParse, IReadOnlyCollection`1 toReresolveReferencesInput, IReadOnlyCollection`1 newProjectIds, CancellationToken token)
   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token)
   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor)
2023-11-08 17:34:05.6149;INFO-2.5.9.6304;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState.StateChanged invocation 24 sets status to 'UnexpectedError'.;
2023-11-08 17:34:05.6149;INFO-2.5.9.6304;Rubberduck.Parsing.VBA.ParseCoordinator;Parsing run on thread 14 completed in 411ms.;

void285 avatar Nov 08 '23 09:11 void285

Thanks for reporting.

There seems to be conversion from Char to int16 in that method, which is not safe. I will change that to the appropriate int32 later.

MDoerner avatar Nov 08 '23 19:11 MDoerner

I am assuming that since the fix by @MDoerner this issue has no longer been appearing, as such I am closing this issue. If the problem persists, please reopen the issue with a logfile from the latest version :)

Vogel612 avatar Dec 23 '23 13:12 Vogel612

Hi, I just installed the latest version, and found the problem still there.

2023-12-25 01:37:43.7279;INFO-2.5.9.6316;Rubberduck.Common.LogLevelHelper;
   Rubberduck version 2.5.9.6316 loading:
   Operating System: Windows 10 Education 2009 x64 (Microsoft Windows NT 10.0.19045.0)
   Host Product: Microsoft Office 2013 x64
   Host Version: 15.0.5589.1000
   Host Executable: EXCEL.EXE;

2023-12-25 01:39:56.2759;INFO-2.5.9.6316;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState.StateChanged invocation 31 sets status to 'Started'.;
2023-12-25 01:39:56.3410;INFO-2.5.9.6316;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState.StateChanged invocation 32 sets status to 'LoadingReference'.;
2023-12-25 01:39:56.3510;INFO-2.5.9.6316;Rubberduck.Parsing.Common.ParsingStageTimer;Loaded ComProjects for user projects in 5ms.;
2023-12-25 01:39:56.3510;ERROR-2.5.9.6316;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run on thread 6.;System.OverflowException: value for int16 is too big or small.
   at System.Convert.ToInt16(Char value)
   at Rubberduck.Parsing.VBA.Extensions.StringExtensions.ToVbExpression(String managed, Boolean useConsts)
   at Rubberduck.Parsing.ComReflection.DeclarationsFromComProjectLoader.GetDeclarationsForModule(IComType module, QualifiedModuleName moduleName, ProjectDeclaration project)
   at Rubberduck.Parsing.ComReflection.DeclarationsFromComProjectLoader.LoadDeclarations(ComProject type, String projectId)
   at Rubberduck.Parsing.VBA.DeclarationResolving.UserComProjectSynchronizer.LoadProjects(IEnumerable`1 projectIds)
   at Rubberduck.Parsing.VBA.DeclarationResolving.UserComProjectSynchronizer.SyncUserComProjects()
   at Rubberduck.Parsing.VBA.ParseCoordinator.SyncDeclarationsFromUserComProjects(IReadOnlyCollection`1 toParse, CancellationToken token, HashSet`1 toReresolveReferences)
   at Rubberduck.Parsing.VBA.ParseCoordinator.ExecuteCommonParseActivities(IReadOnlyCollection`1 toParse, IReadOnlyCollection`1 toReresolveReferencesInput, IReadOnlyCollection`1 newProjectIds, CancellationToken token)
   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token)
   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor)
2023-12-25 01:39:56.3510;INFO-2.5.9.6316;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState.StateChanged invocation 33 sets status to 'UnexpectedError'.;
2023-12-25 01:39:56.3590;INFO-2.5.9.6316;Rubberduck.Parsing.VBA.ParseCoordinator;Parsing run on thread 6 completed in 83ms.;

void285 avatar Dec 24 '23 17:12 void285

System.OverflowException: value for int16 is too big or small.

Different host and system, but there must be another invalid pointer somewhere.

retailcoder avatar Dec 24 '23 19:12 retailcoder