Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault/access violation in generated code #13

Open
kelemzol opened this issue Aug 2, 2016 · 2 comments
Open

Segmentation fault/access violation in generated code #13

kelemzol opened this issue Aug 2, 2016 · 2 comments

Comments

@kelemzol
Copy link

kelemzol commented Aug 2, 2016

Hi!

I have a problem, I think this package doesnt work with new ghc.

my code:

import Network.FTP.Client
main = do
    ftpConn <- easyConnectFTP "..."
    ftpRes  <- login ftpConn "..." (Just "...") Nothing
    putStrLn $ show ftpRes
    nlst ftpConn Nothing >>= putStrLn . unlines
    quit ftpConn

and my result:

*Main> :main
(230,["Login successful."])
Segmentation fault/access violation in generated code

ghc 8.0.1
ftphs 1.0.9.1
win-7

BR,
Zoltán Kelemen

@KeesBleijenberg
Copy link

I also got a(segmentation fault) on Win7 64 bits with ftphs 1.0.9.1 and ghc 7.10.3. Sometimes I get the error while execting connect, and sometimes while execution cwd.
I'am using stack.

Kees Bleijenberg

@KeesBleijenberg
Copy link

KeesBleijenberg commented Sep 8, 2016

So the ftp program crashes. This is my code and the response I get

ftpTest =
do
FTP.enableFTPDebugging
conn <- FTP.easyConnectFTP "ftp.tbsoftware.nl"
resp_logIn <- FTP.login conn "tbsoft" (Just "XXXXXXXX") (Just "YYYYY")
print resp_logIn
resp_cwd <- FTP.cwd conn "public_html/downloads"
print resp_cwd
FTP.getbinary conn "TBSchilder_1.0.2.26.zip" >>= putStrLn .fst
-- for testing I removed the quit commands
return ""

If I run this program and I get this on the screen:

FTP received: 220 ProFTPD 1.3.3e Server ready.
FTP sent: USER tbsoft
FTP received: 331 Password required for tbsoft
FTP sent: PASS XXXXX
FTP received: 230 User tbsoft logged in
FTP sent: CWD public_html/downloads
FTP received: 250 CWD command successful
FTP sent: TYPE I
FTP received: 200 Type set to I
FTP sent: PASV
FTP received: 227 Entering Passive Mode (89,18,176,149,94,206).

And then the program crashes.
I get the same problem with putbinary, uploadloadbinary.

Kees

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants