Comments (4)
你直接改一改源代码啊,再编译它。
加个,你得把你运行的命令写一写,不然鬼知道你是怎样测试导致问题的啊。
from proxypool.
panic: runtime error: invalid memory address or nil pointer dereference
`# ./proxy
2019/12/30 11:40:57 [TRACE] Log path:
2019/12/30 11:40:57 [TRACE] Log Mode: File (Info)
2019/12/30 11:40:57 [ INFO] ProxyPool
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xd0 pc=0x817006]
goroutine 1 [running]:
github.com/go-xorm/xorm.(*Session).Init(0xc00018c700)
/usr/local/gopath/pkg/mod/github.com/go-xorm/[email protected]/session.go:94 +0x1e6
github.com/go-xorm/xorm.(*Engine).NewSession(...)
/usr/local/gopath/pkg/mod/github.com/go-xorm/[email protected]/engine.go:317
github.com/go-xorm/xorm.(*Engine).Where(0x0, 0xa198e0, 0xbb0100, 0xc0000f2c40, 0x1, 0x1, 0xc00013def8)
/usr/local/gopath/pkg/mod/github.com/go-xorm/[email protected]/engine.go:601 +0x56
github.com/henson/proxypool/pkg/models.countIps(0x8)
/usr/local/gopath/pkg/mod/github.com/henson/[email protected]/pkg/models/ip.go:46 +0x8a
github.com/henson/proxypool/pkg/models.CountIPs(...)
/usr/local/gopath/pkg/mod/github.com/henson/[email protected]/pkg/models/ip.go:52
main.main()
/usr/local/proxy/proxypool/main.go:45 +0xdd`
from proxypool.
再次允许成功,但是访问一次既异常:
2019/12/30 11:49:13 http: panic serving 115.236.179.140:60598: runtime error: invalid memory address or nil pointer dereference
goroutine 300 [running]:
net/http.(*conn).serve.func1(0xc000641680)
/usr/local/go/src/net/http/server.go:1767 +0x139
panic(0xa4cd60, 0x1163270)
/usr/local/go/src/runtime/panic.go:679 +0x1b2
github.com/henson/proxypool/pkg/storage.ProxyRandom(0xa81420)
/usr/local/gopath/pkg/mod/github.com/henson/[email protected]/pkg/storage/filter.go:90 +0xc6
github.com/henson/proxypool/api.ProxyHandler(0xbc7660, 0xc0006128c0, 0xc000349c00)
/usr/local/gopath/pkg/mod/github.com/henson/[email protected]/api/api.go:29 +0x118
net/http.HandlerFunc.ServeHTTP(0xb1caa0, 0xbc7660, 0xc0006128c0, 0xc000349c00)
/usr/local/go/src/net/http/server.go:2007 +0x44
net/http.(*ServeMux).ServeHTTP(0xc000063d00, 0xbc7660, 0xc0006128c0, 0xc000349c00)
/usr/local/go/src/net/http/server.go:2387 +0x1bd
net/http.serverHandler.ServeHTTP(0xc0000d82a0, 0xbc7660, 0xc0006128c0, 0xc000349c00)
/usr/local/go/src/net/http/server.go:2802 +0xa4
net/http.(*conn).serve(0xc000641680, 0xbc8ca0, 0xc000596c00)
/usr/local/go/src/net/http/server.go:1890 +0x875
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2927 +0x38e
from proxypool.
你得说明一下,什么操作导致的panic啊。。
你这光说错误,我怎么知道你的原因呢。。
如果是运行的时候报错,建议换一个版本的go
我使用的是版本是 go 1.13.1 win/386
@liliang8858
from proxypool.
Related Issues (20)
- go get 时候报错 undefined: clog.CONSOLE HOT 3
- 检查数据库中的ip的时候为什么不循环一直去检测,而是只检测一次? HOT 5
- 强烈建议贴出依赖库的版本号~~
- 都用go了,直接把代理功能加上不更好么? HOT 1
- /v2/ip 各种空指针 HOT 2
- Phantomjs用Docker装了可以用么? HOT 2
- http://ip138.com HOT 5
- 程序能运行,但数据库一直没数据 HOT 3
- 数据库没有数据,访问端口也不出来数据 HOT 1
- 一点建议 HOT 1
- 这里有个拼写错误 HOT 1
- bug ?
- Additional Proxy Source
- clog维护不行 建议移除这个依赖
- 博主有联系方式吗?想谈合作~
- 能不能把sqlite驱动换成纯go的,cgo版本的驱动编译比较慢,而且交叉编译会比较麻烦 HOT 1
- 替换htmlquery版本
- htmlquery.Find应该要处理返回的err参数,现在的处理方式可能会导致null pointer错误
- 源码运行 no logger is available HOT 2
- 请求商务推广合作
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proxypool.