-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdebug_openrender.sh
More file actions
executable file
·104 lines (92 loc) · 3.28 KB
/
debug_openrender.sh
File metadata and controls
executable file
·104 lines (92 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/bin/bash
# Comprehensive debugging script for orender skeleton TIFF issue
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${SCRIPT_DIR}" || exit 1
export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:${PWD}/openrender/lib"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PWD}/openrender/lib"
export ORENDERHOME="${PWD}/openrender"
export DISPLAYS="${PWD}/openrender/displays"
export GEOMETRIES="${PWD}/openrender/geometry"
export SHADERS="${PWD}/openrender/shaders:."
ORENDER_BIN="${PWD}/openrender/bin/orender"
RIB_FILE="${1:-examples/rib/quadrics-b.rib}"
echo "=== Debugging orender Skeleton TIFF Issue ==="
echo ""
echo "Environment:"
echo " LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
echo " ORENDERHOME=${ORENDERHOME}"
echo " DISPLAYS=${DISPLAYS}"
echo " GEOMETRIES=${GEOMETRIES}"
echo " SHADERS=${SHADERS}"
echo ""
echo "Checking display driver module..."
if [ -f "${PWD}/openrender/displays/libfile.so" ]; then
echo " ✓ Found libfile.so"
elif [ -f "${PWD}/openrender/displays/file.so" ]; then
echo " ✓ Found file.so"
else
echo " ✗ Display driver module not found in ${PWD}/openrender/displays/"
echo " Looking for: libfile.so or file.so"
echo ""
echo " Available files in displays directory:"
ls -la "${PWD}/openrender/displays/" 2>/dev/null || echo " Directory does not exist!"
fi
echo ""
echo "Checking RIB file: ${RIB_FILE}"
if [ ! -f "${RIB_FILE}" ]; then
echo " ✗ RIB file not found: ${RIB_FILE}"
exit 1
fi
echo " ✓ RIB file found"
echo ""
echo "Checking for Format and Display statements in RIB file..."
if grep -q "^Format" "${RIB_FILE}"; then
echo " ✓ Format statement found"
grep "^Format" "${RIB_FILE}"
else
echo " ✗ Format statement NOT found"
fi
if grep -q "^Display" "${RIB_FILE}"; then
echo " ✓ Display statement found"
grep "^Display" "${RIB_FILE}"
else
echo " ✗ Display statement NOT found"
fi
echo ""
echo "Checking for .orenderrc..."
DEFAULTS_RIB="${ORENDERHOME}/.orenderrc"
if [ -f "${DEFAULTS_RIB}" ]; then
echo " ✓ Found .orenderrc"
echo " Contents:"
cat "${DEFAULTS_RIB}" | sed 's/^/ /'
else
echo " ✗ .orenderrc not found at ${DEFAULTS_RIB}"
fi
echo ""
echo "=== Running orender with debug output ==="
echo "Command: ${ORENDER_BIN} ${RIB_FILE}"
echo ""
# Run with debug output
"${ORENDER_BIN}" "${RIB_FILE}" 2>&1 | tee /tmp/orender_debug.log
echo ""
echo "=== Debug output saved to /tmp/orender_debug.log ==="
echo ""
echo "Checking output files..."
find . -name "*.tif" -o -name "*.tiff" -newer "${RIB_FILE}" 2>/dev/null | while read f; do
if [ -f "$f" ]; then
SIZE=$(stat -c%s "$f" 2>/dev/null || stat -f%z "$f" 2>/dev/null)
echo " Found: $f (size: $SIZE bytes)"
if [ "$SIZE" -lt 1000 ]; then
echo " ⚠ WARNING: File is very small, likely a skeleton TIFF"
fi
fi
done
echo ""
echo "=== Analysis ==="
echo "Look for these debug messages in the output:"
echo " [DEBUG computeDisplayData] - Shows if displays are found"
echo " [DEBUG] Processing display - Shows each display being processed"
echo " [DEBUG] Looking for display driver - Shows if driver module is being searched"
echo " [DEBUG displayStart] - Shows if displayStart is called and what it returns"
echo " [DEBUG] HIDER_BREAK - Shows if rendering is being aborted"
echo ""