racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
447 stars 94 forks source link

DrRacket Log fails to load due to an exception #429

Open Fictitious-Rotor opened 3 years ago

Fictitious-Rotor commented 3 years ago

Unable to open the log due to the following error:

color-prefs:lookup-in-color-scheme: contract violation
  expected: known-color-scheme-name?
  given: 'framework:failed-background-color
  in: the name argument of
      (->i
       ((name known-color-scheme-name?))
       (result
        (name)
        (if (... name)
          (is-a?/c style-delta%)
          (is-a?/c color%))))
  contract from: 
      <pkgs>/gui-lib/framework/main.rkt
  blaming: <pkgs>/drracket/drracket/private/unit.rkt
   (assuming the contract is correct)
  at: <pkgs>/gui-lib/framework/main.rkt:2095.2

Instructions to repeat:

  1. Launch DrRacket
  2. Menu: View -> Show Log
  3. Error occurs
rfindler commented 3 years ago

I think this was fixed in 3e50572e16154bf92dd47b19d9d2514d21184b71 .

sorawee commented 3 years ago

@Fictitious-Rotor what version of Racket are you using? @rfindler suggests that the problem is already fixed in 7.8. Can you download it and see if there's still an issue?

Fictitious-Rotor commented 3 years ago

Apologies for the slow response regarding this - using version v7.8 did indeed resolve this issue.

I didn't respond immediately because I encountered a related issue and wasn't sure if this too was an end user issue.

While using dark theme, text in the log remains the same shade of black as the backdrop, meaning that it's impossible to read. The rest of the log window also remains in the light theme. image

rfindler commented 3 years ago

I'm not sure what commit exactly fixed this one, but it appears to be working for me in the release candidate for 7.9: https://pre-release.racket-lang.org/

Fictitious-Rotor commented 3 years ago

Using version 7.8.0.900 I find the issue to still be present, I'm afraid. The issue persists for dark theme and even into light theme until the log-level text box is emptied and filled again.

rfindler commented 3 years ago

Just to confirm: when you switch to dark mode, the colors don't switch appropriately, but if you start up when you are already in dark mode, then it looks okay?

Fictitious-Rotor commented 3 years ago

Hopefully this video will explain what I'm experiencing

sorawee commented 3 years ago

That looks bad.

I use a dark theme too but I cannot reproduce the problem.

Screen Shot 2020-10-30 at 10 33 51

The issue persists for dark theme and even into light theme until the log-level text box is emptied and filled again.

FWIW, I think this is kinda expected. When you load a new theme, you should restart DrRacket to get it 100% working correctly.

rfindler commented 3 years ago

I've not had a real chance to investigate but this might be windows specific, as that control's text might actually be being drawn by windows (and telling windows that the controls need to be drawn in dark mode isn't really a supported API, annoyingly).