ofBuffer empty at first program run on raspberry pi

Hi Community!
I try to read a xml file from an usb stick on a raspberry pi. My code compiles and runs perfectly after making.
When restarting the Pi and running my compiled program the first time, the ofBuffer object, which i read the file to, keeps empty and my program quits to an xml parser error.
When i start it a second time or more often, it will run without any problems.

Additional information:

  • the usb stick is mounted correctly. I can read the file with any editor.
  • i tried different usb sticks
  • i tried the same sd card on different rpi’s (2 and 3). The problem occurs only on a rpi 2 b. It works on the rpi3.
  • it seems that the first run produces several error messages from ofAppEGLWindow::readNativeUDevEvents(). It prints some sets of the notice lines 1477-1481, including the %s (does not fill out the %s)
  • the error seems to be there since i included wiringPi.h

I don’t have any clues left! Any ideas how to chase this down?

With kind regards
Sinus

Are you using relative or absolute paths?

It’s mostly just a personal habit at this point but since I had better luck with absolute paths I tend to use those.

Yes! I’m using absolute paths.

offTopic @jvcleave:
You are doing an amazing job around this community! I was reading your tutorials for hours, used your OMXPlayer addon, and learned so much from you when it comes to get OF up and running on a RPI.
THANK YOU! :beers:

1 Like