Skip to content

Instantly share code, notes, and snippets.

brandyn@router:~/projects/libfreenect/build/bin$ ./glpclview
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
Segmentation fault
brandyn@router:~/projects/libfreenect/build/bin$ valgrind ./glpclview
==5505== Memcheck, a memory error detector
==5505== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==5505== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==5505== Command: ./glpclview
==5505==
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
brandyn@router:~/projects/libfreenect/examples$ LD_LIBRARY_PATH="../build/lib" valgrind ./cvdemo
==7897== Memcheck, a memory error detector
==7897== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==7897== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==7897== Command: ./cvdemo
==7897==
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
[Stream 70] Expected 1748 data bytes, but got 1908. Dropping...
@bwhite
bwhite / Invalid Write
Created December 5, 2010 00:54
This is from valgrind ./glview on https://github.com/bwhite/libfreenect we didn't make any related changes
[Stream 80] Lost 1 packets
raw acceleration: -30 -283 746 mks acceleration: -0.359218 -3.388623 8.932553[Stream 80] Lost 3 packets
[Stream 80] Inconsistent flag 81 with 52 packets in buf (162 total), resyncing...
raw acceleration: -32 -291 754 mks acceleration: -0.383166 -3.484414 9.028344[Stream 80] Invalid magic 577d
raw acceleration: -28 -283 746 mks acceleration: -0.335270 -3.388623 8.932553[Stream 80] Invalid magic 0115
raw acceleration: -31 -271 732 mks acceleration: -0.371192 -3.244935 8.764918[Stream 80] Invalid magic 0216
raw acceleration: -31 -271 763 mks acceleration: -0.371192 -3.244935 9.136110[Stream 80] Invalid magic 0113
[Stream 80] Lost 1 packets
[Stream 80] Lost 3 packets
raw acceleration: -24 -275 762 mks acceleration: -0.287374 -3.292831 9.124136[Stream 80] Inconsistent flag 85 with 50 packets in buf (162 total), resyncing...
@bwhite
bwhite / Invalid write in cameras.c
Created December 5, 2010 01:16
From https://github.com/OpenKinect/libfreenect master, only change was to add -g during build. This is output from valgrind ./glview
[Stream 80] Lost 3 packets
[Stream 80] Inconsistent flag 82 with 161 packets in buf (162 total), resyncing...
raw acceleration: -28 -283 738 mks acceleration: -0.335270 -3.388623 8.836762[Stream 70] Invalid magic c2ff
[Stream 70] Invalid magic c2ff
raw acceleration: -31 -283 746 mks acceleration: -0.371192 -3.388623 8.932553[Stream 80] Invalid magic 031c
[Stream 80] Lost 1 packets
[Stream 80] Lost 3 packets
raw acceleration: -28 -283 734 mks acceleration: -0.335270 -3.388623 8.788866[Stream 80] Invalid magic 1715
[Stream 80] Lost 1 packets
[Stream 80] Lost 4 packets
We couldn’t find that file to show.
commit 806a90d816d9ffe3a5c6191e83c74572f4ed924c
Author: Kyle Machulis <kyle@nonpolynomial.com>
Date: Tue Nov 30 20:49:09 2010 -0800
Added missing stdlib include to glview so compilers would stop complaining about malloc
Signed-off-by: Kyle Machulis <kyle@nonpolynomial.com>
commit ac2124e8567d8e6be6824fc58f7e9eab47c7bbee
Author: Hector Martin <hector@marcansoft.com>
Snow Leopard
python - system
xcode - dmg (DVD)
easy_install - source - http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e
pip - sudo easy_install pip
pyopengl - sudo easy_install pyopengl
numpy - sudo easy_install numpy
wx - dmg unicode for 2.6
git - dmg - http://git-osx-installer.googlecode.com/files/git-1.7.3.2-intel-leopard.dmg
cython - source - http://www.cython.org/release/Cython-0.13.tar.gz
import wx
import wx.glcanvas
from OpenGL.GL import *
class GLFrame(wx.Frame):
"""A simple class for using OpenGL with wxPython."""
def __init__(self, parent, id, title, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE,
@bwhite
bwhite / gist:754766
Created December 25, 2010 08:22
OSX Install Instructions
Versions
OSX - Snow Leopard
Python 2.7.1, Scipy (0.9.0b1), Numpy (1.5.1), Wx (2.9.1.1 - Cocoa) - All from official DMG's
Install git
http://code.google.com/p/git-osx-installer/downloads/detail?name=git-1.7.3.3-x86_64-leopard.dmg&can=3&q=
#!/usr/bin/env python
import freenect
import cv
import numpy as np
cv.NamedWindow('Depth')
cv.NamedWindow('Video')
print('Press ESC in window to stop')