tleyden / open-ocr

Run your own OCR-as-a-Service using Tesseract and Docker
Apache License 2.0
1.33k stars 223 forks source link

getting "runtime error: invalid memory address or nil pointer dereference" for file upload from Javascript #71

Closed GeorgeAnanthSoosai closed 8 years ago

GeorgeAnanthSoosai commented 8 years ago

Error message : 167 +0x7b7 ←[35mopenocr_1 |←[0m created by net/http.(_Server).Serve ←[35mopenocr_1 |←[0m /usr/lib/go/src/pkg/net/http/server.go:1 644 +0x28b ←[35mopenocr_1 |←[0m 04:24:22.441660 ←[33mOCR_HTTP: ←[0mrequest to ocr-file-upload ←[35mopenocr_1 |←[0m 04:24:22.441799 ←[33mOCR_HTTP: ←[0mcontent ty pe: multipart/related; boundary=---BOUNDARY ←[35mopenocr_1 |←[0m 04:24:22.442037 ←[33mOCR_HTTP: ←[0mcontent ty pe: multipart/related ←[35mopenocr1 |←[0m 2016/09/28 04:24:22 http: panic serving 192.1 * 68.99.1:64828: runtime error: invalid memory address or nil pointer dereference** ←[35mopenocr_1 |←[0m goroutine 13 [running]: ←[35mopenocr_1 |←[0m net/http.func┬╖009() ←[35mopenocr_1 |←[0m /usr/lib/go/src/pkg/net/http/server.go:1 093 +0xae ←[35mopenocr_1 |←[0m runtime.panic(0x6afb80, 0xa21f28) ←[35mopenocr_1 |←[0m /usr/lib/go/src/pkg/runtime/panic.c:248 +0x106

Given Payload: Header : Content-Type:multipart/related; boundary=---BOUNDARY

Body : -----BOUNDARY Content-Type: application/json {'engine':'tesseract'} -----BOUNDARY -----BOUNDARY Content-Type: image/PNG Content-Disposition: attachment; filename='attachment.txt'. ‰PNG 

IHDR$T9',tEXtSoftwareAdobe ImageReadyqÉe<»IDATxÚì}¸U¹öZ3»œ’“„iÞ!tP¤ˆí·_–kçZPÄrTô^AÀ† ÷WQÅvQTàZ(bA¥(¨”‚„$’œœº÷žYÿ|k­of­i{v;-ߛg2ûì2{fö_ïz¿Æ…Œ@ a:Á»}¬5­X8XuVâ“×m÷º•t› @˜½X1öðšƒ7ܶ7<ñèVg=þ¨~©+ªˆ#ùù‡þs»­–Ìwø咗ìʄ¿k¥:oÞèÖûîVsvßsþàFú) @˜½xªáô­ÙÈ:Þ=¥Ç~ù¯Íîü5ûÿéîE¼oéûÿùˆÉ-¦š„DdëAgåMË_yôüE;Æ·Úå9óïÕϪóØÖÕ>¶ýàë/•è—$a–c¼ÑŽ{‰ÉìñÇï^=¸þޟóýíƽ×Ýö»€˜<j’–ˆI;„ßÏ×_²ýÊß/>á¸òv‡ž2°ÝaÇ ,ڑí±>@ ¶ ‚²fÍý›«n¸nñ?ñýýÞzËõ!)LJZ%$ É¿.Ùþ¸»wxùÞ^¯zÕÐ6;U\¼˜~@ ¶P<°i{ú¿{Üýãç¾PyôÎÿ^ù‰'7°Ԓ¢„„›„äÎ˟ý§v~á»Ý½_uì3—-#E„@ [?1Éîzò±Ú¼;.ºj»G~záz⃐ˆN ‰IFœ5­8ö/Ç|á ....

-----BOUNDARY

Please review above and advise me what went wrong..

GeorgeAnanthSoosai commented 8 years ago

@tleyden - any update on this ?

tleyden commented 8 years ago

@GeorgeAnanthSoosai This doesn't look like an issue in open-ocr, so I'm closing this ticket. If you can provide clear instructions to reproduce an issue with open-ocr-client

Otherwise, it's your client code that's probably broken.