Document MT5 freeze analysis and solutions

This commit is contained in:
2026-03-24 13:36:56 -04:00
parent 81d86d79a7
commit 916bcaf2d1

View File

@@ -247,3 +247,50 @@ This will:
| `IsOptimization()` | `MQLInfoInteger(MQL_OPTIMIZATION)` | | `IsOptimization()` | `MQLInfoInteger(MQL_OPTIMIZATION)` |
**Commit:** `c415cd9` **Commit:** `c415cd9`
---
## MT5 Freeze Analysis & Solutions
**Date:** March 24, 2026
### Why Did It Freeze?
**Root Cause:** OrdersEA.mq5 was an **MT4 file disguised as MT5**
| Issue | Details |
|-------|---------|
| File Type | MT4 syntax with .mq5 extension |
| Syntax Errors | 100 errors detected by MetaEditor |
| Problem Functions | OrderSelect(), MarketInfo(), Bid, Digits, Point |
| Trigger | MetaEditor hung while processing errors |
| Wine Factor | Windows apps in Wine are less stable with errors |
### What Happened:
1. MetaEditor tried to compile OrdersEA.mq5
2. Found 100 MT4-specific syntax errors
3. Got stuck in error processing loop
4. VNC session froze (MetaEditor was active window)
5. Required container restart to clear
### Solutions Implemented:
**1. Syntax Checker** (`check-syntax.sh`)
```bash
./check-syntax.sh OrdersEA.mq5
# Detects MT4 functions before compilation
```
**2. Watchdog** (`metaeditor-watchdog.sh`)
- Auto-kills MetaEditor if running >5 minutes
- Kills if CPU >50% for extended period
**3. Safe Compile** (`safe-compile.sh`)
- 2-minute timeout on compilations
- Auto-kills on timeout
- Prevents indefinite hangs
### Prevention Tips:
1. Always check syntax before compiling unknown files
2. Use MT4→MT5 conversion tools for old code
3. Watch for MetaEditor freezes during compilation
4. Restart container if VNC becomes unresponsive