<div dir="ltr">Thank you very much! <br><div><br></div><div>I confirmed the replaced haddock executable can successfully generate the docs!</div></div><br><div class="gmail_quote"><div dir="ltr">2018年7月21日(土) 4:42 Shao Cheng <<a href="mailto:astrohavoc@gmail.com">astrohavoc@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Yamamoto-san,</div><div><br></div><div>I've encountered the same problem before, and there's a haddock issue tracking this problem: <a href="https://github.com/haskell/haddock/issues/837" target="_blank">https://github.com/haskell/haddock/issues/837</a>. A simple fix is building latest version of haddock and replacing the haddock binary for ghc-8.4.3.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 20, 2018 at 4:29 PM, Yuji Yamamoto <span dir="ltr"><<a href="mailto:whosekiteneverfly@gmail.com" target="_blank">whosekiteneverfly@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you Michael and Vanessa!<div><br></div><div>Here're what I've tried and their results:</div><div><br></div><div>A. `cabal new-haddock` in a project depending on haskell-src-exts as you suggested.</div><div>    Resulted in another, non-related error..:</div><div>    > cabal new-haddock --with-ghc='C:\Users\yuji-yamamoto\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\bin\ghc.exe'</div><div><div>    Resolving dependencies...</div><div>    Build profile: -w ghc-8.4.3 -O1</div><div>    In order, the following will be built (use -v for more details):</div><div>     - happy-1.19.9 (exe:happy) (requires build)</div><div>     - haskell-src-exts-1.20.2 (lib) (requires build)</div><div>     - proceedings-bot-0.1.0.0 (lib) (first run)</div><div>    Configuring happy-1.19.9 (all, legacy fallback)...</div><div>    cabal.exe: Failed to build happy-1.19.9 (which is required by</div><div>    proceedings-bot-0.1.0.0). The failure occurred during the configure step. The</div><div>    exception was:</div><div>    output of</div><div>    C:\Users\yuji-yamamoto\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\bin\ghc.exe:</div><div>    hGetContents: invalid argument (invalid byte sequence)</div></div><div><br></div><div>B. Running a command extracted a log from `stack haddock --verbose haskell-src-exts`.</div><div>    Resulted in the same error</div><div>    >  C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.3.exe --builddir=.stack-work\dist\7d103d30 haddock --html --hoogle  --haddock-option=--hyperlinked-source --verbose</div><div>    ...</div><div>    Access violation in generated code when reading 0x36f00000</div><div><br></div><div>     Attempting to reconstruct a stack trace...</div><div><br></div><div>       Frame        Code address</div><div>     * 0x440daf0    0xe63d37 C:\Users\yuji-yamamoto\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\bin\haddock.exe+0xa63d37</div><div>     * 0x440daf8    0x7e1100049f40 C:\Users\yuji-yamamoto\p\cmder_mini\vendor\conemu-maximus5\ConEmu\ConEmuHk64.dll+0x49f40</div><div><br></div><div>C. Plus I found `stack haddock` after `stack unpack haskell-src-exts-1.20.2 && cd 

<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">haskell-src-exts-1.20.2</span>

</div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">     Sounds weird...</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I'm happy if getting some more advice to make smaller case.</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Thanks,</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div>    </div></div><br><div class="gmail_quote"><div dir="ltr">2018年7月19日(木) 22:35 Michael Snoyman <<a href="mailto:michael@snoyman.com" target="_blank">michael@snoyman.com</a>>:<br></div><div><div class="m_3119716529667538894h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Given that the haddock.exe executable itself is crashing, it seems highly unlikely to be a bug in either Stack or Cabal. I can think of three possibilities here:<div><br></div><div>* There's a bug in Haddock itself, such as an FFI call or some embedded C code</div><div>* There's a bug in GHC which is generating invalid code</div><div>* The GHC bindist itself has included a corrupted haddock.exe</div><div><br></div><div>I agree with Vanessa: trying to reproduce this with another build tool (`cabal haddock` or `cabal new-haddock`) would be a good next step, followed by a bug report against (most likely) GHC.</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 19, 2018 at 9:29 AM Yuji Yamamoto <<a href="mailto:whosekiteneverfly@gmail.com" target="_blank">whosekiteneverfly@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I always get an " Access violation in generated code when reading 0x28900000" error when</div><div>executing</div><div><br></div><div>> stack haddock haskell-src-exts</div><div><br></div><div>since LTS 12.0.</div><div><br></div><div>I'm not sure to which project I should submit a bug report.</div><div>GHC? Haddock? Or Stack?</div><div>And how can I make a smaller case  to reproduce the same error?</div><div><br></div><div>I  attached a log when executing with --verbose --cabal-verbose for your info.<br></div><div><br></div>-- <br><div dir="ltr" class="m_3119716529667538894m_6665841802335621625m_3704622488823218940m_-689045448396499295gmail_signature"><div dir="ltr"><div>山本悠滋<br>twitter: @igrep<br>GitHub: <a href="https://github.com/igrep" target="_blank">https://github.com/igrep</a></div><div>GitLab: <a href="https://gitlab.com/igrep" target="_blank">https://gitlab.com/igrep</a><br>Facebook: <a href="http://www.facebook.com/igrep" target="_blank">http://www.facebook.com/igrep</a><br>Google+: <a href="https://plus.google.com/u/0/+YujiYamamoto_igrep" target="_blank">https://plus.google.com/u/0/+YujiYamamoto_igrep</a></div></div></div></div>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>
</blockquote></div></div></div><div class="m_3119716529667538894HOEnZb"><div class="m_3119716529667538894h5"><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_3119716529667538894m_6665841802335621625gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>山本悠滋<br>twitter: @igrep<br>GitHub: <a href="https://github.com/igrep" target="_blank">https://github.com/igrep</a></div><div>GitLab: <a href="https://gitlab.com/igrep" target="_blank">https://gitlab.com/igrep</a><br>Facebook: <a href="http://www.facebook.com/igrep" target="_blank">http://www.facebook.com/igrep</a><br>Google+: <a href="https://plus.google.com/u/0/+YujiYamamoto_igrep" target="_blank">https://plus.google.com/u/0/+YujiYamamoto_igrep</a></div></div></div>
</div></div><br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.<br></blockquote></div><br></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>山本悠滋<br>twitter: @igrep<br>GitHub: <a href="https://github.com/igrep" target="_blank">https://github.com/igrep</a></div><div>GitLab: <a href="https://gitlab.com/igrep" target="_blank">https://gitlab.com/igrep</a><br>Facebook: <a href="http://www.facebook.com/igrep" target="_blank">http://www.facebook.com/igrep</a><br>Google+: <a href="https://plus.google.com/u/0/+YujiYamamoto_igrep" target="_blank">https://plus.google.com/u/0/+YujiYamamoto_igrep</a></div></div></div>