ghc-vis icon indicating copy to clipboard operation
ghc-vis copied to clipboard

segmentation fault

Open mantkiew opened this issue 10 years ago • 3 comments

GHC 7.8.3 32bit, Windows

Consider the following example:

data Pair2 = Pair2 !Int !Int
let p2 = Pair2 (1+2) (3+4)
:vis
:view p2

the window is empty and nothing works. When I close the window and do

:vis
:view p2

I get

Prelude> Segmentation fault. That's a minimal example I constructed; however, this exact same bug happened to me many times when trying to work with ghc-vis on a small program.

mantkiew avatar Oct 09 '14 19:10 mantkiew

Looks like this issue in ghc-heap-view: https://github.com/nomeata/ghc-heap-view/issues/3

def- avatar Oct 10 '14 13:10 def-

To quote from the ghc-heap-view issue:

PR 23 deleted the code of ghc-heap-view to read the heap. instead ghc-heap-view now uses the standard GHC library GHC.Exts.Heap. Since this change, I could NOT reproduce any of the Unknown opcode 0exceptions. So I think, PR 23 also fixed this issue.

However, the issue is only fixed in GHC with version >= 8.6. Nothing was done for older versions.

def- avatar Dec 04 '19 17:12 def-

stack ghc -- --version
The Glorious Glasgow Haskell Compilation System, version 8.8.1
$ stack repl
λ> :script ghci
λ> :vis
λ> let g = [1..]
λ> :view g

This also leads to a segfault on my Linux machine.

I'll look a bit into this and see if there are more details which could be useful, but it seems the ghc version isn't the problem

tippenein avatar Oct 22 '21 17:10 tippenein