{"action":"created","issue":{"url":"https://api.github.com/repos/racket/drracket/issues/73","repository_url":"https://api.github.com/repos/racket/drracket","labels_url":"https://api.github.com/repos/racket/drracket/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/racket/drracket/issues/73/comments","events_url":"https://api.github.com/repos/racket/drracket/issues/73/events","html_url":"https://github.com/racket/drracket/issues/73","id":175977140,"number":73,"title":"Unchecking the options under `(define ...)' breaks DrRacket","user":{"login":"leafac","id":586813,"avatar_url":"https://avatars.githubusercontent.com/u/586813?v=3","gravatar_id":"","url":"https://api.github.com/users/leafac","html_url":"https://github.com/leafac","followers_url":"https://api.github.com/users/leafac/followers","following_url":"https://api.github.com/users/leafac/following{/other_user}","gists_url":"https://api.github.com/users/leafac/gists{/gist_id}","starred_url":"https://api.github.com/users/leafac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leafac/subscriptions","organizations_url":"https://api.github.com/users/leafac/orgs","repos_url":"https://api.github.com/users/leafac/repos","events_url":"https://api.github.com/users/leafac/events{/privacy}","received_events_url":"https://api.github.com/users/leafac/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-09T10:24:26Z","updated_at":"2016-09-12T11:10:57Z","closed_at":"2016-09-11T21:12:12Z","body":"**STEPS TO REPRODUCE**\r\n\r\n1. On DrRacket, on the upper-left, there is a `(define ...)` drop down menu. Under it, there are options regarding what kinds of definitions to show: `(module ...)` or `(define ...)`. **Uncheck both**.\r\n\r\n2. Click on the `(define ...)` drop down menu again.\r\n\r\n**CURRENT BEHAVIOR**\r\n\r\nDrRacket fails with the following **DrRacket Internal Error**:\r\n\r\n```\r\n=: contract violation\r\n  expected: number?\r\n  given: #f\r\n  argument position: 2nd\r\n  other arguments...:\r\n   +inf.0\r\n  context...:\r\n   /Applications/Racket v6.6/share/pkgs/drracket/drracket/private/get-defs.rkt:45:2: find-next\r\n   /Applications/Racket v6.6/share/pkgs/drracket/drracket/private/get-defs.rkt:36:0: get-definitions\r\n   /Applications/Racket v6.6/share/pkgs/drracket/drracket/private/unit.rkt:1098:6: fill-popup method in func-defs-canvas%\r\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mrlib/name-message.rkt:125:4: on-event method in name-message%\r\n   /Applications/Racket v6.6/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization\r\n   /Applications/Racket v6.6/collects/ffi/unsafe/atomic.rkt:72:13\r\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wx/cocoa/window.rkt:811:4: dispatch-on-event method in window%\r\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:454:6\r\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:505:32\r\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:653:3\r\n```\r\n\r\nClosing and reopening DrRacket does not make the problem go away.\r\n\r\n**EXPECTED BEHAVIOR**\r\n\r\nDrRacket does not fail, but shows an empty list of definitions and the same options as before.\r\n\r\n**WORKAROUND**\r\n\r\nGo to `Preferences`, click on `Revert All Preferences to Defaults` and restart DrRacket.\r\n\r\n**INITIAL INVESTIGATION**\r\n\r\nThe stack trace points to `drracket/private/get-defs.rkt`. I believe the issue is on line 72, which reads `(when (= +inf.0 smallest-pos)`. `smallest-pos` was initialized to `#f` on line `65` and, if `filled-in-positions` is empty, then `smallest-pos` is not changed. If this is correct, than it should suffice to change line 72 to `(when (equal? +inf.0 smallest-pos)`. But I do not know the code base enough to be confident that it solves the issue. If you would like, I can send a pull request with that change.\r\n\r\n-----\r\n\r\nIf there is anything I can do to help fixing this, please let me know.\r\n\r\nThank you for DrRacket, it is a great tool."},"comment":{"url":"https://api.github.com/repos/racket/drracket/issues/comments/246316760","html_url":"https://github.com/racket/drracket/issues/73#issuecomment-246316760","issue_url":"https://api.github.com/repos/racket/drracket/issues/73","id":246316760,"user":{"login":"leafac","id":586813,"avatar_url":"https://avatars.githubusercontent.com/u/586813?v=3","gravatar_id":"","url":"https://api.github.com/users/leafac","html_url":"https://github.com/leafac","followers_url":"https://api.github.com/users/leafac/followers","following_url":"https://api.github.com/users/leafac/following{/other_user}","gists_url":"https://api.github.com/users/leafac/gists{/gist_id}","starred_url":"https://api.github.com/users/leafac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leafac/subscriptions","organizations_url":"https://api.github.com/users/leafac/orgs","repos_url":"https://api.github.com/users/leafac/repos","events_url":"https://api.github.com/users/leafac/events{/privacy}","received_events_url":"https://api.github.com/users/leafac/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T11:10:56Z","updated_at":"2016-09-12T11:10:56Z","body":"Thank you for the fix, @rfindler."}}
{"actor":{"display_login":"leafac"}}