haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 212 forks source link

HIE crashing: Index too large #1668

Open mdunnio opened 4 years ago

mdunnio commented 4 years ago

I'm getting the following error in hie:

hie-8.6.5: Data.Text.Internal.Fusion.Common.index: Index too large
CallStack (from HasCallStack):
  error, called at libraries/text/Data/Text/Internal/Fusion/Common.hs:943:24 in text-1.2.3.1:Data.Text.Internal.Fusion.Common

This is showing up in the hie:stderr buffer in my emacs.

I have hie running with the debug log, but it's quite large and might need some help figuring out what I need to look for.

Is there anything else I can add to help debug the issue?

Thanks.

fendor commented 4 years ago

Do you have a repeatable test-case or did it just happen once?

mdunnio commented 4 years ago

It only happened once. I'll keep my eye out and see if it's something that I can easily trigger.

Ptival commented 4 years ago

Happened to me today on a quite large but not huge project (64 modules): https://github.com/GaloisInc/what4 (though some modules are fairly huge, e.g. https://github.com/GaloisInc/what4/blob/master/what4/src/What4/Expr/Builder.hs )

It also happened in this issue that was closed: https://github.com/haskell/haskell-ide-engine/issues/518

mpickering commented 4 years ago

This looks almost certainly to be a bug in the text library.

Similar in flavour to https://github.com/haskell/text/pull/230 perhaps.

mdunnio commented 4 years ago

Just to give an update: I haven't seen this issue again. Is there anything I can do to possibly trigger it?