From 9b02aa9cf70d24bd22fbdf82769eb90f9deca34a Mon Sep 17 00:00:00 2001 From: Greg Cooper Date: Tue, 7 Nov 2006 22:27:13 +0000 Subject: [PATCH] still don't know why it tries to read past the end of the id vector (perhaps states of different tabs are getting confused) now it will just ignore those invalid reads svn: r4804 --- collects/mztake/debug-tool.ss | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/collects/mztake/debug-tool.ss b/collects/mztake/debug-tool.ss index b7df52c812..f09b08b618 100644 --- a/collects/mztake/debug-tool.ss +++ b/collects/mztake/debug-tool.ss @@ -45,6 +45,11 @@ (string-constant intermediate-student/lambda) (string-constant advanced-student)))) + (define (robust-vector-ref vec idx) + (if (< idx (vector-length vec)) + (vector-ref vec idx) + #f)) + (define (break-at bp p) (hash-table-get bp p)) @@ -230,7 +235,7 @@ (invalidate-bitmap-cache)]) (let* ([frames (send (get-tab) get-stack-frames)] [pos-vec (send (get-tab) get-pos-vec)] - [id (vector-ref pos-vec pos)] + [id (robust-vector-ref pos-vec pos)] #; [_ (printf "frames = ~a~npos-vec = ~a~nid = ~a~n" frames pos-vec id)]) @@ -326,7 +331,7 @@ [(invalid) (let* ([frames (send (get-tab) get-stack-frames)] [pos-vec (send (get-tab) get-pos-vec)] - [id (vector-ref pos-vec pos)] + [id (robust-vector-ref pos-vec pos)] #; [_ (printf "frames = ~a~npos-vec = ~a~nid = ~a~n" frames pos-vec id)])