[GHC] #1483: vista: GHCi not loading 80% of the time

GHC trac at galois.com
Sat Sep 22 20:27:01 EDT 2007


#1483: vista: GHCi not loading 80% of the time
------------------------+---------------------------------------------------
    Reporter:  guest    |        Owner:  simonmar
        Type:  bug      |       Status:  reopened
    Priority:  high     |    Milestone:  6.8.1   
   Component:  GHCi     |      Version:  6.6.1   
    Severity:  normal   |   Resolution:          
    Keywords:           |   Difficulty:  Unknown 
          Os:  Windows  |     Testcase:          
Architecture:  x86      |  
------------------------+---------------------------------------------------
Changes (by haskell-ghc at j-star.org):

  * cc:  => haskell-ghc at j-star.org

Comment:

 I've had a chance to fool around and get a build (6.8.0.20070919) going
 and I think I now know what's going on: it's a Windows bug. GHCi is
 hanging on a call to setConsoleCP in compiler/ghci/InteractiveUI.hs, line
 1560). A short C program which calls SetConsoleCP also fails in the way
 described above for GHCi. Even the built-in DOS command to change the
 codepage 'chcp' fails in the same way.

 The bug doesn't seem to be particularly prevalent, but there are a few
 forum posts about it in odd places (e.g.
 [http://www.hydrogenaudio.org/forums/index.php?showtopic=50273&st=575
 here] (search for chcp)) suggesting that it's a tablet PC related problem
 (I'm using a Lenovo X60 Tablet). Interestingly there's a hotfix for
 Windows XP SP2 which sounds like it fixes this problem
 [http://support.microsoft.com/kb/925271] but I see nothing similar for
 Vista.

 I've found a rather cheezy workaround. Before running GHCi from the
 command prompt one can try and change the codepage manually with 'chcp
 28591'. This usually hangs, but it can be broken out of with Ctrl-C. This
 seems to change the codepage nontheless (or at least it reports it as
 changed). Subsequently running GHCi in that console window always leads to
 a Prelude> prompt and normal operation.

 This bug seems so niche that I'd imagine it doesn't warrant any change to
 the code, and furthermore, I can't really imagine what could be done
 without unreasonable effort. I've added an entry to the
 [http://haskell.org/haskellwiki/GHC/FAQ#GHCi_hangs_after_.22Loading_package_base_..._linking_..._done..22
 FAQ] detailing the workaround which should get people going if they run
 into this problem.


 Jony

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1483>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list