Raspberry Pi2 problems with HTTP requests

Hi all,

Just took my first steps in exploring OpenFrameworks. Had no problems with doing some graphics, but now I want to get the weather from www.openweathermap.org using the following call:

ofHttpResponse resp = ofLoadURL(“http://www.google.nl/robots.txt/”);

(of course this does not get the weather, but I copied the example of ofLoadURL from the website.)

When I run this, it bails out with a segmentation fault.

OpenFrameworks version 0.8.4, installed according the RPi2 installation manual on this site.

Anyone who can help me further?


I’ve ran into this - the bizarre part it that it only happens to me on the RPI2 but not the RPI1. I think it has something to do with the compiler optimization settings.

In trying to track down the bug just adding something a logging message this method made it start working. I am guessing that this changes the compiler output

See if this works for you as well

Add this line:

ofLogVerbose() << "this is a weird fix";


HI all,

YES! This did the trick!. Though I am a bit unsure about this kind of fixes, at least, for now it works!

Thanks for this quick response, I could never have found it myself in this timeframe.

1 Like

I was just as well experiencing segmentation faults with a Raspberry Pi 2, while making ofLoadUrl calls. Updating Poco, as instructed in this thread, resolved the issue.

Hi, I am experiencing the same problem, have tried adding the ofLogVerbose() << “this is a weird fix”; with no joy. I’ve attempted to follow the Poco instructions without luck, too.

Can someone give me simple instructions of how to fix the issue, please? I’m new to this and have already spent 7 hours trying to make this work :frowning: The issue is a show-stopper for us, sadly. Thanks for your help.

I was actually able to run an OF binary compiled for the RPi1 on the RPi2 without issue with ofURLFileLoader. It’s a hard bug to track down so that may be a workaround if it is urgent.

Another option I was considering was just to create a instance ofURLFileLoader myself. getFileLoader really is only used for the Global functions below it (ofLoadURL, etc). You would have to just avoid using those.

Thanks very much - I’ll try to get my head around this - we’re reverting to RPI1 in the meantime…