{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/3850","labels_url":"https://api.github.com/repos/odoo/odoo/issues/3850/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/3850/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/3850/events","html_url":"https://github.com/odoo/odoo/issues/3850","id":49948458,"number":3850,"title":"[8.0] wkhtmltopdf 0.12.1 fails with error code -6 bad_alloc","user":{"login":"cv-clearcorp","id":7594570,"avatar_url":"https://avatars.githubusercontent.com/u/7594570?v=3","gravatar_id":"","url":"https://api.github.com/users/cv-clearcorp","html_url":"https://github.com/cv-clearcorp","followers_url":"https://api.github.com/users/cv-clearcorp/followers","following_url":"https://api.github.com/users/cv-clearcorp/following{/other_user}","gists_url":"https://api.github.com/users/cv-clearcorp/gists{/gist_id}","starred_url":"https://api.github.com/users/cv-clearcorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cv-clearcorp/subscriptions","organizations_url":"https://api.github.com/users/cv-clearcorp/orgs","repos_url":"https://api.github.com/users/cv-clearcorp/repos","events_url":"https://api.github.com/users/cv-clearcorp/events{/privacy}","received_events_url":"https://api.github.com/users/cv-clearcorp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"sle-odoo","id":7601090,"avatar_url":"https://avatars.githubusercontent.com/u/7601090?v=3","gravatar_id":"","url":"https://api.github.com/users/sle-odoo","html_url":"https://github.com/sle-odoo","followers_url":"https://api.github.com/users/sle-odoo/followers","following_url":"https://api.github.com/users/sle-odoo/following{/other_user}","gists_url":"https://api.github.com/users/sle-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/sle-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sle-odoo/subscriptions","organizations_url":"https://api.github.com/users/sle-odoo/orgs","repos_url":"https://api.github.com/users/sle-odoo/repos","events_url":"https://api.github.com/users/sle-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/sle-odoo/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2014-11-24T22:00:44Z","updated_at":"2015-10-02T22:01:24Z","closed_at":null,"body":"I am using wkhtmltopdf 0.12.1 from wkhtmltopdf.org.\r\nWhen I try to print a webkit report on v8.0 I have this error on the screen:\r\n```\r\nWkhtmltopdf falló (error code: -6). Mensaje: terminate called after throwing an instance of 'St9bad_alloc'\r\nwhat(): std::bad_alloc\r\n```\r\nI tried running the same command in the console. The command that odoo is trying to run is:\r\n\r\n    /usr/local/bin/wkhtmltopdf --cookie session_id 80ded140e2dd320700fa7686b2787d2bee159d30 --quiet --page-size A4 --margin-top 40 --dpi 90 --header-spacing 35 --margin-left 7 --margin-bottom 23 --margin-right 7 --orientation Portrait --header-html /tmp/report.header.tmp.6VJOkP.html --footer-html /tmp/report.footer.tmp.zB_m7Q.html /tmp/report.body.tmp.cnet9z.html /tmp/report.tmp.ka2xTt.pdf\r\n\r\nSo I kept the temp files and ran it on the terminal with the same user that is running the instance. The PDF was generated successfully, no errors whatsoever.\r\nI am running odoo with several workers."},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/145166639","html_url":"https://github.com/odoo/odoo/issues/3850#issuecomment-145166639","issue_url":"https://api.github.com/repos/odoo/odoo/issues/3850","id":145166639,"user":{"login":"busel7","id":14789844,"avatar_url":"https://avatars.githubusercontent.com/u/14789844?v=3","gravatar_id":"","url":"https://api.github.com/users/busel7","html_url":"https://github.com/busel7","followers_url":"https://api.github.com/users/busel7/followers","following_url":"https://api.github.com/users/busel7/following{/other_user}","gists_url":"https://api.github.com/users/busel7/gists{/gist_id}","starred_url":"https://api.github.com/users/busel7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/busel7/subscriptions","organizations_url":"https://api.github.com/users/busel7/orgs","repos_url":"https://api.github.com/users/busel7/repos","events_url":"https://api.github.com/users/busel7/events{/privacy}","received_events_url":"https://api.github.com/users/busel7/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T22:01:24Z","updated_at":"2015-10-02T22:01:24Z","body":"After all day compiling finaly I can print to pdf on my raspberry pi 2, thank you Mr.@cubells for your guide, following which I have done:\r\n\r\n1. Remove wkhtmltopdf and related package\r\n$ sudo apt-get remove libqt4-dev qt4-dev-tools wkhtmltopdf\r\n\r\n$ sudo apt-get autoremove\r\n\r\n2. Install requirement package for compiling\r\n$ sudo apt-get install openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig\r\n\r\n3. Clone from git wkhtmltopdf and qt source\r\n$ git clone git://github.com/wkhtmltopdf/wkhtmltopdf.git wkhtmltopdf\r\n\r\n$ mkdir qt-wkhtmltopdf && cd qt-wkhtmltopdf\r\n\r\n$ git clone https://www.github.com/wkhtmltopdf/qt --depth 1 --branch wk_4.8.7 --single-branch .\r\n\r\n4. Compile qt\r\n$ sudo ./configure -nomake tools,examples,demos,docs,translations -opensource -prefix \"`pwd`\" `cat ../wkhtmltopdf/static_qt_conf_base ../wkhtmltopdf/static_qt_conf_linux | sed -re '/^#/ d' | tr '\\n' ' '`\r\n\r\n$ sudo make\r\n\r\n$ sudo make install\r\n\r\n5. Compile wkhtmltopdf\r\n$ cd ../wkhtmltopdf\r\n\r\n$ sudo ../qt-wkhtmltopdf/bin/qmake\r\n\r\n$ sudo make\r\n\r\n$ sudo make install\r\n\r\n6. Reboot\r\n$ sudo reboot "}}