Troubleshooting Reference¶
Status: 🟢 Complete reference guide
Last Updated: 2024-11-06
Movian Version: 4.8+
Overview¶
This reference provides quick solutions to common problems encountered when developing for Movian. Issues are organized by category with symptoms, causes, and solutions.
Quick Reference¶
| Category | Common Issues |
|---|---|
| View Files | Syntax errors, loading failures, layout problems |
| Plugins | Loading failures, API errors, crashes |
| Properties | Binding failures, undefined values, scope errors |
| Layout | Positioning, sizing, visibility problems |
| Performance | Lag, stuttering, memory issues |
| Navigation | Focus problems, event handling |
| Media | Playback failures, codec problems |
| Build | Compilation errors, dependency problems |
View File Issues¶
Syntax Error: Unexpected Token¶
Symptoms:
Causes: - Missing semicolon - Unmatched braces - Invalid operator - Malformed expression
Solutions:
-
Check for missing semicolons:
-
Match all braces:
-
Use valid operators:
View File Won't Load¶
Symptoms: - Blank screen - Error in log: "Error loading view" - Application shows fallback content
Causes: - File path incorrect - File doesn't exist - Syntax error in file - Circular include/import
Solutions:
-
Verify file path:
-
Check file exists:
-
Check for syntax errors:
- Review error log for specific line numbers
- Use text editor with syntax checking
-
Comment out sections to isolate problem
-
Avoid circular includes:
Macro Expansion Error¶
Symptoms:
Causes: - Macro not defined before use - Wrong number of arguments - Missing default values
Solutions:
-
Define macros before use:
-
Match argument count:
-
Use default values:
Unterminated String¶
Symptoms:
Causes: - Missing closing quote - Unescaped quote in string - Wrong quote type
Solutions:
-
Close all strings:
-
Escape quotes in strings:
-
Use correct quote type:
Plugin Issues¶
Plugin Won't Load¶
Symptoms: - Plugin not visible in Movian - Error in log: "Plugin load failed" - No service registered
Causes: - Invalid plugin.json - JavaScript syntax error - Missing required fields - API version mismatch
Solutions:
-
Validate plugin.json:
-
Check JavaScript syntax:
-
Verify API version:
Plugin Crashes Movian¶
Symptoms: - Movian crashes when plugin loads - Segmentation fault - Application freeze
Causes: - Null pointer dereference - Infinite loop - Memory corruption - Invalid API call
Solutions:
-
Add error handling:
-
Avoid infinite loops:
-
Validate API calls:
HTTP Request Fails¶
Symptoms: - Network error - Timeout - Empty response
Causes: - Invalid URL - Network connectivity - Server error - Timeout too short
Solutions:
-
Validate URL:
-
Increase timeout:
-
Handle errors:
JSON Parse Error¶
Symptoms:
Causes: - Invalid JSON format - Server returned HTML instead of JSON - Encoding issues
Solutions:
-
Validate JSON before parsing:
-
Check content type:
-
Handle empty responses:
Property Issues¶
Property Not Found¶
Symptoms: - Widget shows no data - Log: "Property not found" - Undefined value
Causes: - Property doesn't exist - Wrong property path - Scope issue - Property not yet set
Solutions:
-
Use null coalescing:
-
Check property path:
-
Verify scope:
Property Not Updating¶
Symptoms: - Widget doesn't reflect changes - Stale data displayed - No subscription created
Causes: - Static expression (no property reference) - Subscription not created - Property path incorrect - Widget not re-evaluating
Solutions:
-
Ensure dynamic expression:
-
Use debug assignment:
-
Force re-evaluation:
Scope Error¶
Symptoms: - $self undefined - $args not available - Wrong data displayed
Causes: - Using $self outside cloner - Using $args outside loader - Incorrect scope reference
Solutions:
-
Use correct scope:
-
In cloner context:
-
In loader context:
Layout Issues¶
Widget Not Visible¶
Symptoms: - Widget exists but doesn't appear - Blank space where widget should be - No error in log
Causes: - Alpha is 0 - No size constraints - Covered by other widget - Outside parent bounds - Hidden attribute set
Solutions:
-
Check alpha:
-
Add size constraints:
-
Check z-order:
-
Verify not hidden:
Widget Wrong Size¶
Symptoms: - Widget too large or too small - Doesn't fit in container - Overlaps other widgets
Causes: - Missing size constraints - Conflicting constraints - Wrong weight value - Aspect ratio issues
Solutions:
-
Specify size:
-
Use weight for flexible sizing:
-
Avoid conflicting constraints:
Widget Wrong Position¶
Symptoms: - Widget in wrong location - Not aligned correctly - Overlapping incorrectly
Causes: - Wrong container type - Incorrect alignment - Wrong parent - Z-order issues
Solutions:
-
Use correct container:
// Horizontal layout widget(container_x, { widget(label, { caption: "Left"; }); widget(label, { caption: "Right"; }); }); // Vertical layout widget(container_y, { widget(label, { caption: "Top"; }); widget(label, { caption: "Bottom"; }); }); // Layered widget(container_z, { widget(quad, { color: "#000000"; }); widget(label, { caption: "Overlay"; }); }); -
Set alignment:
-
Check parent hierarchy:
Spacing Issues¶
Symptoms: - Widgets too close together - Too much space between widgets - Inconsistent spacing
Causes: - Missing spacing attribute - Wrong spacing value - Padding not set - Margin issues
Solutions:
-
Set spacing:
-
Use padding:
-
Add spacer widgets:
Performance Issues¶
Slow Rendering¶
Symptoms: - Lag when scrolling - Stuttering animations - Low frame rate
Causes: - Too many widgets - Complex expressions - Large images - Inefficient layout
Solutions:
-
Reduce widget count:
-
Simplify expressions:
-
Optimize images:
-
Use list widgets for scrolling:
High Memory Usage¶
Symptoms: - Memory usage increases over time - Application becomes slow - Eventually crashes
Causes: - Memory leaks - Too many cached items - Large images - Subscriptions not released
Solutions:
-
Limit cached items:
-
Use smaller images:
-
Clean up resources:
Stuttering Animations¶
Symptoms: - Animations not smooth - Jerky transitions - Inconsistent frame rate
Causes: - Complex calculations during animation - Too many animated widgets - Inefficient iir() usage
Solutions:
-
Use appropriate iir() time constant:
-
Limit animated widgets:
-
Avoid complex expressions in animations:
Navigation Issues¶
Can't Focus Widget¶
Symptoms: - Widget not selectable - Navigation skips widget - No focus indicator
Causes: - Missing focusable attribute - Widget hidden or alpha 0 - Focus weight too low - Parent not focusable
Solutions:
-
Add focusable attribute:
-
Ensure visible:
-
Set focus weight:
Focus Indicator Not Visible¶
Symptoms: - Can navigate but can't see focus - No visual feedback - Hard to tell what's selected
Causes: - No focus indicator implemented - Focus indicator same color as background - Alpha too low
Solutions:
-
Add focus indicator:
-
Use contrasting colors:
-
Add scale effect:
Event Not Firing¶
Symptoms: - Button doesn't respond - onEvent handler not called - No action on activation
Causes: - Event handler syntax error - Widget not focusable - Event type wrong - Handler returns wrong value
Solutions:
-
Check event handler syntax:
-
Verify widget is focusable:
-
Use correct event type:
Media Issues¶
Video Won't Play¶
Symptoms: - Black screen - Error message - Playback fails to start
Causes: - Unsupported codec - Invalid URL - DRM protected - Network issue
Solutions:
-
Check codec support:
-
Validate URL:
-
Handle DRM:
Audio Out of Sync¶
Symptoms: - Audio doesn't match video - Delay in audio - Audio ahead of video
Causes: - Incorrect timestamps - Codec issues - Performance problems
Solutions:
-
Adjust audio delay:
-
Check video format:
- Verify container format (MP4, MKV, etc.)
- Check for variable frame rate issues
- Test with different video files
Subtitles Not Showing¶
Symptoms: - No subtitles displayed - Subtitle option not available - Wrong subtitles shown
Causes: - Subtitle track not detected - Wrong encoding - Subtitle format not supported
Solutions:
-
Verify subtitle track:
-
Set subtitle track:
-
Check encoding:
- Ensure UTF-8 encoding for subtitle files
- Verify subtitle format (SRT, ASS, etc.)
Build Issues¶
Compilation Error¶
Symptoms:
Causes: - Missing dependency - Wrong include path - API version mismatch - Platform-specific code
Solutions:
-
Install dependencies:
-
Check configure options:
-
Clean and rebuild:
Linking Error¶
Symptoms:
Causes: - Missing library - Wrong library path - Library version mismatch
Solutions:
-
Install missing library:
-
Set library path:
-
Check library version:
Platform-Specific Issues¶
Symptoms: - Builds on one platform but not another - Platform-specific errors - Missing platform features
Causes: - Platform-specific code - Different library versions - Missing platform dependencies
Solutions:
-
Check platform requirements:
-
Use platform-specific configure:
-
Install platform dependencies:
Getting Help¶
Collecting Debug Information¶
When reporting issues, include:
-
Movian version:
-
Platform information:
-
Error logs:
-
Minimal test case:
- Create smallest example that reproduces issue
- Include all relevant files
- Document steps to reproduce
Community Resources¶
- GitHub Issues: https://github.com/andoma/movian/issues
- Forums: Check Movian community forums
- Documentation: https://github.com/andoma/movian/wiki
Reporting Bugs¶
When reporting bugs:
- Search existing issues first
- Provide clear title describing the problem
- Include steps to reproduce
- Attach relevant logs and files
- Specify platform and version
- Describe expected vs actual behavior
See Also¶
- Debugging View Files - Detailed debugging guide
- Syntax Reference - Complete syntax guide
- Plugin API Reference - Plugin development
- GLW Architecture - System architecture