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

nyagos.exec() panic? at redirecting #73

Closed
hymkor opened this issue Jun 4, 2015 · 2 comments
Closed

nyagos.exec() panic? at redirecting #73

hymkor opened this issue Jun 4, 2015 · 2 comments
Assignees
Labels

Comments

@hymkor
Copy link
Collaborator

hymkor commented Jun 4, 2015

~.nyagos

nyagos.alias.svn = function(args)
    if args[1] == "amdc" then
        nyagos.exec("svn.exe status | findstr ^[AMDC]")
        return
    end
    args[0] = "svn.exe"
    if args[1] == "exclude" then
        args[1] = "update"
        table.insert(args,2,"--set-depth=exclude")
    elseif args[1] == "emptyup" then
        args[1] = "update"
        table.insert(args,2,"--depth=empty")
    elseif args[1] == "emptyadd" then
        args[1] = "add"
        table.insert(args,2,"--depth=empty")
    end
    nyagos.exec(args)
end

And type as below :

$ svn amdc | head
Exception 0xc0000005 0x0 0x38 0x629853b9
PC=0x629853b9
signal arrived during cgo execution

syscall.(*Proc).Call(0x11fd22a0, 0x11fe7c0c, 0x6, 0x6, 0x3dc48, 0x0, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/syscall/dll_windows.go:140 +0x65a
syscall.(*LazyProc).Call(0x11f9a880, 0x11fe7c0c, 0x6, 0x6, 0x4, 0x3dc48, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/syscall/dll_windows.go:279 +0x5f
_/C_/Users/hayama/GoSrc/nyagos/lua.Lua.Call(0x315c4, 0x1, 0x1, 0x0, 0x0)
        C:/Users/hayama/GoSrc/nyagos/lua/lua.go:240 +0xb5
main.newArgHook(0x12027b00, 0x11f6e3b0, 0x1, 0x1, 0x0, 0x0, 0x0)
        C:/Users/hayama/GoSrc/nyagos/main/lua.go:92 +0x245
_/C_/Users/hayama/GoSrc/nyagos/interpreter.(*Interpreter).Spawnvp(0x12027b00, 0x2d2f40, 0x0, 0x0)
        C:/Users/hayama/GoSrc/nyagos/interpreter/interpreter.go:130 +0x104
_/C_/Users/hayama/GoSrc/nyagos/interpreter.(*Interpreter).Interpret(0x12027440,0x12053330, 0xf, 0x12053318, 0x0, 0x0)
        C:/Users/hayama/GoSrc/nyagos/interpreter/interpreter.go:214 +0x5b8
main.main()
        C:/Users/hayama/GoSrc/nyagos/main/nyagos.go:202 +0xebe

goroutine 5 [syscall]:
os/signal.loop()
        C:/Users/hayama/Local/Program Files/go/src/os/signal/signal_unix.go:21 +0x21
created by os/signal.initツキ1
        C:/Users/hayama/Local/Program Files/go/src/os/signal/signal_unix.go:27 +0x34

goroutine 6 [chan receive]:
_/C_/Users/hayama/GoSrc/nyagos/conio.ctrlCHandler(0x11f56dc0)
        C:/Users/hayama/GoSrc/nyagos/conio/getch.go:55 +0x50
created by _/C_/Users/hayama/GoSrc/nyagos/conio.DisableCtrlC
        C:/Users/hayama/GoSrc/nyagos/conio/getch.go:63 +0xc3

goroutine 13 [syscall, locked to thread]:
syscall.WaitForSingleObject(0x3bc, 0xffffffff, 0x1, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/syscall/zsyscall_windows.go:689 +0x66
os.(*Process).wait(0x12069810, 0x0, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/os/exec_windows.go:16 +0x7f
os.(*Process).Wait(0x12069810, 0x12068670, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/os/doc.go:45 +0x38
os/exec.(*Cmd).Wait(0x120272c0, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/os/exec/exec.go:364 +0x19f
os/exec.(*Cmd).Run(0x120272c0, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/os/exec/exec.go:246 +0x65
_/C_/Users/hayama/GoSrc/nyagos/interpreter.(*Interpreter).Spawnvp(0x120272c0, 0x2d2f40, 0x0, 0x0)
        C:/Users/hayama/GoSrc/nyagos/interpreter/interpreter.go:146 +0x352
_/C_/Users/hayama/GoSrc/nyagos/interpreter.(*Interpreter).Interpret(0x12027500,0x120067a0, 0x20, 0x11fe8028, 0x0, 0x0)
        C:/Users/hayama/GoSrc/nyagos/interpreter/interpreter.go:214 +0x5b8
main.cmdExec(0x315c4, 0x3bc38)
        C:/Users/hayama/GoSrc/nyagos/main/lua_cmd.go:125 +0x7d9
syscall.(*Proc).Call(0x11fd22a0, 0x11fe5ef8, 0x6, 0x6, 0x3dc88, 0x0, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/syscall/dll_windows.go:140 +0x65a
syscall.(*LazyProc).Call(0x11f9a880, 0x11fe5ef8, 0x6, 0x6, 0x4, 0x3dc88, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/syscall/dll_windows.go:279 +0x5f
_/C_/Users/hayama/GoSrc/nyagos/lua.Lua.Call(0x315c4, 0x1, 0x0, 0x0, 0x0)
        C:/Users/hayama/GoSrc/nyagos/lua/lua.go:240 +0xb5
main.LuaFunction.Call(0x315c4, 0x11fd38f0, 0x10, 0x12027500, 0x0, 0x0, 0x0)
        C:/Users/hayama/GoSrc/nyagos/main/lua.go:31 +0x151
main.(*LuaFunction).Call(0x11fd3910, 0x12027500, 0x0, 0x0, 0x0)
        <autogenerated>:2 +0x8f
_/C_/Users/hayama/GoSrc/nyagos/alias.doClose(0x2d2e18, 0x11fd3910, 0x12027500)
        C:/Users/hayama/GoSrc/nyagos/alias/alias.go:81 +0x34
created by _/C_/Users/hayama/GoSrc/nyagos/alias.hook
        C:/Users/hayama/GoSrc/nyagos/alias/alias.go:96 +0x11e

goroutine 14 [syscall, locked to thread]:
syscall.WaitForSingleObject(0x3e0, 0xffffffff, 0x1, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/syscall/zsyscall_windows.go:689 +0x66
os.(*Process).wait(0x12069060, 0x0, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/os/exec_windows.go:16 +0x7f
os.(*Process).Wait(0x12069060, 0x12068630, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/os/doc.go:45 +0x38
os/exec.(*Cmd).Wait(0x12026180, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/os/exec/exec.go:364 +0x19f
os/exec.(*Cmd).Run(0x12026180, 0x0, 0x0)
        C:/Users/hayama/Local/Program Files/go/src/os/exec/exec.go:246 +0x65
_/C_/Users/hayama/GoSrc/nyagos/interpreter.funcツキ006()
        C:/Users/hayama/GoSrc/nyagos/interpreter/interpreter.go:139 +0x33
created by _/C_/Users/hayama/GoSrc/nyagos/interpreter.(*Interpreter).Spawnvp
        C:/Users/hayama/GoSrc/nyagos/interpreter/interpreter.go:144 +0x259
eax     0x8
ebx     0x629ac4f4
ecx     0x322dfb14
edx     0x3235fa14
edi     0x322dfaf0
esi     0x0
ebp     0x32368388
esp     0x322dfa64
eip     0x629853b9
eflags  0x10202
cs      0x23
fs      0x53
gs      0x2b
<MARKEDONE:~/GoSrc/nyagos>
$ FINDSTR: 書き込みエラー
@hymkor
Copy link
Collaborator Author

hymkor commented Jun 4, 2015

memo

http://stackoverflow.com/questions/27681094/go-exception-signal-arrived-during-cgo-execution

0xc0000005 is EXCEPTION_ACCESS_VIOLATION. It means somewhere in your program, you are trying to read / write memory that does not exist. For example reading at 0 address or similar. The problem is most likely because your syscall.Syscall9(_swe_jdut1_to_utc...) parameters do not match corresponding function arguments inside your DLL. You have to make sure that these two match exactly: parameter numbers and types. – alex Dec 29 '14 at 2:52

@hymkor hymkor added the bug label Jun 8, 2015
@hymkor hymkor self-assigned this Jun 8, 2015
@hymkor
Copy link
Collaborator Author

hymkor commented Jun 11, 2015

Fixed on 777db31 : more than one nyagos.argsfilter ran at once on the same lua-instance

@hymkor hymkor closed this as completed Jun 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant