samth / test-bugs

2 stars 0 forks source link

DrRacket continously gives an error #187

Closed racket-bug-submit closed 9 years ago

racket-bug-submit commented 9 years ago
Originally submitted by Eric Springer on: Sat Nov 26 06:24:01 -0500 2011

vector-ref: expects type as 2nd argument, given: 11607/128; other arguments were: '#(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 ...

=== context === /home/eric/racket/collects/framework/private/text.rkt:3758:4: handle-mouse-movement method in completion-box% /home/eric/racket/collects/framework/private/text.rkt:3319:4: on-event method in ...ork/private/text.rkt:3192:2 /home/eric/racket/collects/mred/private/wxme/editor-canvas.rkt:383:2: on-event method in editor-canvas% /home/eric/racket/collects/racket/private/more-scheme.rkt:151:2: call-with-break-parameterization /home/eric/racket/collects/racket/private/more-scheme.rkt:268:2: call-with-exception-handler /home/eric/racket/collects/mred/private/wx/gtk/window.rkt:638:4: dispatch-on-event method in window% /home/eric/racket/collects/mred/private/wx/common/queue.rkt:432:6 /home/eric/racket/collects/mred/private/wx/common/queue.rkt:472:32 /home/eric/racket/collects/mred/private/wx/common/queue.rkt:618:3

Steps to Reproduce:

In the interactive window, I typed "#" then hit ctrl+/ to look at the code completion results. I started scrolling through the results, after i got a fair way through the above error was given (repeatedly). The only way to exit was kill the process

Release:
5.2
Environment:
unix "Linux espringerlaptop 3.1.1-2.fc16.x86_64 #1 SMP Mon Nov 14 15:46:10 UTC 2011 x86_64
 x86_64 x86_64 GNU/Linux" (x86_64-linux/3m) (get-display-depth) = 32
Human Language: english
(current-memory-use) 277981864
Links: (links) = (); (links #:user? #f) = (); (links #:root? #t) = (); (links #:user? #f
 #:root? #t) = ()

Collections:
("/home/eric/.racket/5.2/collects"
 (non-existent-path))
("/home/eric/racket/collects"
 ("openssl" "rackunit" "combinator-parser" "lazy" "racket" "test-engine" "version" "s-exp"
 "icons" "xml" "swindle" "profile" "drracket" "wxme" "gui-debugger" "texpict"
 "deinprogramm" "scribblings" "sgl" "plai" "dynext" "browser" "mred" "teachpack"
 "scriblib" "stepper" "scheme" "unstable" "lang" "slatex" "scribble" "frtime" "defaults"
 "launcher" "2htdp" "mrlib" "trace" "preprocessor" "readline" "typed" "schemeunit" "xrepl"
 "compiler" "db" "mzcom" "make" "planet" "rnrs" "net" "drscheme" "datalog" "algol60"
 "redex" "typed-racket" "test-box-recovery" "picturing-programs" "setup" "html" "syntax"
 "parser-tools" "eopl" "htdp" "hierlist" "srfi" "r5rs" "typed-scheme" "data" "slideshow"
 "mysterx" "info-domain" "file" "string-constants" "embedded-gui" "tex2page" "config"
 "games" "help" "racklog" "syntax-color" "framework" "errortrace" "at-exp" "r6rs" "ffi"
 "mzscheme" "mzlib" "graphics" "reader" "macro-debugger" "plot" "raco" "web-server"))

Computer Language: (("Determine language from source") (#(#t print mixed-fraction-e #f #t
 debug) (default) #() "#lang racket\n" #t #t))
This bug was converted from Gnats bug 12396.

[anon-submit; ericwspringer at gmail dot com]

samth commented 9 years ago
On Sat, 26 Nov 2011 09:11:30 -0500, samth at ccs dot neu dot edu wrote:
--0015175cb2d6dac8ec04b2a3d95f
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I can't reproduce this bug, but the attached patch should fix it and
looks like the right thing.  Robby, ok to commit?

On Sat, Nov 26, 2011 at 6:24 AM, ericwspringer@gmail.com wrote:

*\ Description: vector-ref: expects type as 2nd argument, given: 11607/128; other arguments were: '#(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 ...

 === context === /home/eric/racket/collects/framework/private/text.rkt:3758:4: handle-mouse-movement method in completion-box% /home/eric/racket/collects/framework/private/text.rkt:3319:4: on-event method in ...ork/private/text.rkt:3192:2 /home/eric/racket/collects/mred/private/wxme/editor-canvas.rkt:383:2: on-event method in editor-canvas% /home/eric/racket/collects/racket/private/more-scheme.rkt:151:2: call-with-break-parameterization /home/eric/racket/collects/racket/private/more-scheme.rkt:268:2: call-with-exception-handler /home/eric/racket/collects/mred/private/wx/gtk/window.rkt:638:4: dispatch-on-event method in window% /home/eric/racket/collects/mred/private/wx/common/queue.rkt:432:6 /home/eric/racket/collects/mred/private/wx/common/queue.rkt:472:32 /home/eric/racket/collects/mred/private/wx/common/queue.rkt:618:3

*\ How to repeat: In the interactive window, I typed "#" then hit ctrl+/ to look at the code completion results. I started scrolling through the results, after i got a fair way through the above error was given (repeatedly). The only way to exit was kill the process

 -- 
sam th
samth@ccs.neu.edu

--0015175cb2d6dac8ec04b2a3d95f
Content-Type: text/x-patch; charset=US-ASCII; 
    name="0001-Ensure-that-vector-index-is-an-integer.patch"
Content-Disposition: attachment; 
    filename="0001-Ensure-that-vector-index-is-an-integer.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gvgp79g70
rfindler commented 9 years ago
On Sat, 26 Nov 2011 08:54:19 -0600, robby at eecs dot northwestern dot edu wrote:
On Sat, Nov 26, 2011 at 8:11 AM, Sam Tobin-Hochstadt <samth@ccs.neu.edu> wrote:
> I can't reproduce this bug, but the attached patch should fix it and
> looks like the right thing.  Robby, ok to commit?

I'm not seeing why that's the right fix. At a min, if you want to just
fix the symptom like that patch does, then I think you want to check
that

  (round (inexact->exact (- y my)))

is in range of the vector (in the line above).

(But I'm not sure that rounding is the right thing; the way state is
moved around in that code and how that vector is built is confusing to
me and generally suspicious.)
rfindler commented 9 years ago
On Sat, 26 Nov 2011 19:30:34 -0500, robby at racket-lang dot org assigned this bug to robby

A commit by robby@racket-lang.org has resolved this report http://git.racket-lang.org/plt/commit/081dc6c9a1

rfindler commented 9 years ago
On Sat, 26 Nov 2011 19:30:34 -0500, robby at racket-lang dot org wrote:

A commit by robby@racket-lang.org has resolved this report: 081dc6c9a1