question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Decoding timeout doesn't work on RaspberryPi

See original GitHub issue

I noticed that when I set decoding timeout on my RaspberryPi function decode() exits always after 0.0016s no matter what value I set (different from 0). When timeout is doesn’t set or equals 0 function works fine. This is how I set timeout: code = decode(image=cropped, timeout=1000) OS is rasbian jessie, and python version is 3.6. Does anybody have the same problem? Maybe it’s library fault, not wrapper?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
diversunnycommented, Dec 12, 2018

I was having the same issue and it took me some time to find the issue. This post may help anyone facing the same.

The reason is a wrong c structure wrapper in class DmtxTime on Raspberry Pi arm platform. On Raspberry Pi time_t is an long int and therefore can be ctype c_ulong instead of c_ulonglong. Original code from wrapper.py:

class DmtxTime(Structure):
    _fields_ = [
        ('sec', c_ulonglong),      # Actually a time_t
        ('usec', c_ulong),
    ]

Working code on Raspberry Pi:

class DmtxTime(Structure):
    _fields_ = [
        ('sec', c_ulong),      # Actually a time_t
        ('usec', c_ulong),
    ]
0reactions
MarioCarrilloAcommented, May 31, 2022

Hi @quicklizard99 , I wonder if it is planned to merge the PR (#58) for the next release. It seems that I have the same issue with my raspberry pi and this patch worked correctly for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Omxplayer: Decoder timeout - Raspberry Pi Forums
A "weak dvb signal" usually means that the video data (and more) are corrupt. omxplayer doesn't handle that very well; it may hang...
Read more >
raspbian - Fixing comxaudio decode timeout
COMXAudio::Decode timeout. This apparently has to do with insufficient memory being allocated to my raspi (specifically raspi2), see here.
Read more >
pySerial API
If a timeout is set it may return fewer characters than requested. With no timeout it will block until the requested number of...
Read more >
RPi3 and RPi4 hardware decoding ... - Kodi Community Forum
The RPi stays online and even Kodi doesn't crash altogether. ... me to find out to get hardware decoding working on my Raspi...
Read more >
R-Pi Troubleshooting - eLinux.org
And make sure you have a 4Gb SD card: a 2Gb doesn't work. 2 flashes: The SD Card cannot be read. Solution :...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found