[Bug 54291] New: vbscript stuck in endless for loop when UBound on Empty and On Error Resume Next
https://bugs.winehq.org/show_bug.cgi?id=54291 Bug ID: 54291 Summary: vbscript stuck in endless for loop when UBound on Empty and On Error Resume Next Product: Wine Version: 7.21 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs(a)winehq.org Reporter: jsm174(a)gmail.com Distribution: --- I ran across some code similar to the following: WScript.echo "Start" Dim ii Dim tmp Dim vpmMultiLights() : ReDim vpmMultiLights(0) On Error Resume Next For Each tmp In vpmMultiLights For ii = 1 To UBound(tmp) : tmp(ii).State = tmp(0).State : Next Next On Error Goto 0 WScript.echo "Done" In real vbscript, the result is: Start Done In wine vbscript, this code will get stuck in an endless loop. To work around this I hacked UBound to return 0 with VT_EMPTY, but I think real vbscript treats this differently. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54291 --- Comment #1 from Nikolay Sivov <bunglehead(a)gmail.com> --- Actual error code should be 13 (type mismatch), and we should fix that. However the real issue is likely wrong jump that happens on error. Maybe error in loop bounds are not handled correctly. It gets stuck in inner loop, right? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54291 --- Comment #2 from Jason Millard <jsm174(a)gmail.com> --- Correct, the inner loop. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54291 Robert Wilhelm <sloper42(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sloper42(a)yahoo.com Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #3 from Robert Wilhelm <sloper42(a)yahoo.com> --- After https://gitlab.winehq.org/wine/wine/-/commit/f23a50d1db59aafce76fba64a798041... we get now type mismatch for UBound(Empty). Exception handling still needs to be fixed. There are already some FIXMEs in compile.c compile_forto_statement(). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54291 --- Comment #4 from Jason Millard <jsm174(a)gmail.com> --- (In reply to Robert Wilhelm from comment #3)
After https://gitlab.winehq.org/wine/wine/-/commit/ f23a50d1db59aafce76fba64a7980417feb74679 we get now type mismatch for UBound(Empty). Exception handling still needs to be fixed. There are already some FIXMEs in compile.c compile_forto_statement().
Awesome. Thanks for fixing the first part of this! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=54291 francisdb <francisdb@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |francisdb@gmail.com --- Comment #5 from francisdb <francisdb@gmail.com> --- https://gitlab.winehq.org/wine/wine/-/merge_requests/10366 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=54291 --- Comment #6 from Gijs Vermeulen <gijsvrm@gmail.com> --- The output with wine-11.6-112-g504683b22d3: Start 0128:fixme:vbscript:variant_call unsupported on 00007FFFFE91C358 {VT_EMPTY} Done The MR from the comment above was merged as <https://gitlab.winehq.org/wine/wine/-/commit/44483ede48f7c999cfc81c4bd7381a6...>. Is this one fixed now? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=54291 --- Comment #7 from francisdb <francisdb@gmail.com> --- This is indeed fixed. The FIXME is also fixed but not yet merged: https://gitlab.winehq.org/wine/wine/-/merge_requests/10454 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=54291 Gijs Vermeulen <gijsvrm@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |44483ede48f7c999cfc81c4bd73 | |81a6e2352c87e Resolution|--- |FIXED --- Comment #8 from Gijs Vermeulen <gijsvrm@gmail.com> --- (In reply to francisdb from comment #7) Thank you, resolving FIXED in that case. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=54291 Alexandre Julliard <julliard@winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #9 from Alexandre Julliard <julliard@winehq.org> --- Closing bugs fixed in 11.7. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
WineHQ Bugzilla -
WineHQ Bugzilla