holochain / clutter

Fully distributed twitter built on holochain
161 stars 22 forks source link

profile picture, closes #42 #102

Closed science-girl closed 6 years ago

science-girl commented 6 years ago

I have set the size limit at 2MB, but that can be easily changed. I noticed that sometimes when I change the profile picture several times (unable to repeat consistently), my holochain server spits out something like this:


fatal error: stack overflow

runtime stack:
runtime.throw(0x4c45bdb, 0xe)
    /usr/local/go/src/runtime/panic.go:616 +0x81
runtime.newstack()
    /usr/local/go/src/runtime/stack.go:1054 +0x71f
runtime.morestack()
    /usr/local/go/src/runtime/asm_amd64.s:480 +0x89

goroutine 2220 [running]:
gopkg.in/mgo.v2/bson.getStructInfo(0x4ea96a0, 0x4b4eb20, 0x99, 0x4ea96a0, 0x4b4eb20)
    /Users/lindsey/go/src/gopkg.in/mgo.v2/bson/bson.go:634 +0x147a fp=0xc4472305c0 sp=0xc4472305b8 pc=0x4397aea
gopkg.in/mgo.v2/bson.(*encoder).addStruct(0xc4472310c0, 0x4b4eb20, 0xc420c0cc40, 0x99)
    /Users/lindsey/go/src/gopkg.in/mgo.v2/bson/encode.go:137 +0x75 fp=0xc447230738 sp=0xc4472305c0 pc=0x439eeb5
gopkg.in/mgo.v2/bson.(*encoder).addDoc(0xc4472310c0, 0x4b4eb20, 0xc420c0cc40, 0x99)
    /Users/lindsey/go/src/gopkg.in/mgo.v2/bson/encode.go:119 +0x2d8 fp=0xc4472307e0 sp=0xc447230738 pc=0x439e9a8
gopkg.in/mgo.v2/bson.(*encoder).addElem(0xc4472310c0, 0xc42029350c, 0x4, 0x4b4eb20, 0xc420c0cc40, 0x99, 0xc4290c6100)
    /Users/lindsey/go/src/gopkg.in/mgo.v2/bson/encode.go:450 +0xcaa fp=0xc447230b28 sp=0xc4472307e0 pc=0x43a0f4a
gopkg.in/mgo.v2/bson.(*encoder).addElem(0xc4472310c0, 0xc42029350c, 0x4, 0x4ac85c0, 0xc4296dba30, 0x194, 0x100)
    /Users/lindsey/go/src/gopkg.in/mgo.v2/bson/encode.go:266 +0xb58 fp=0xc447230e70 sp=0xc447230b28 pc=0x43a0df8
gopkg.in/mgo.v2/bson.(*encoder).addStruct(0xc4472310c0, 0x4b8a6c0, 0xc4296dba00, 0x199)
    /Users/lindsey/go/src/gopkg.in/mgo.v2/bson/encode.go:163 +0x1fc fp=0xc447230fe8 sp=0xc447230e70 pc=0x439f03c
gopkg.in/mgo.v2/bson.(*encoder).addDoc(0xc4472310c0, 0x4b1f360, 0xc4296dba00, 0x16)
    /Users/lindsey/go/src/gopkg.in/mgo.v2/bson/encode.go:119 +0x2d8 fp=0xc447231090 sp=0xc447230fe8 pc=0x439e9a8
gopkg.in/mgo.v2/bson.Marshal(0x4b1f360, 0xc4296dba00, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/lindsey/go/src/gopkg.in/mgo.v2/bson/bson.go:511 +0xf3 fp=0xc4472310e8 sp=0xc447231090 pc=0x4396193
github.com/holochain/holochain-proto.(*Message).Fingerprint(0xc4296dba00, 0xc420486420, 0x544aee0, 0xc4472311d8, 0x4041788)
    /Users/lindsey/go/src/github.com/holochain/holochain-proto/node.go:491 +0x6f fp=0xc447231158 sp=0xc4472310e8 pc=0x4970a6f```
Connoropolous commented 6 years ago

One bonus feature would be: When you view someone elses profile (by clicking on their username) it would show their profile picture. I don't think there's currently any way to see other people's profile pics

science-girl commented 6 years ago

I like that idea!