# How to Troubleshoot Common Issues in Palmier Pro: A Complete Diagnostic Guide

> Troubleshoot Palmier Pro common issues by checking logs validating MediaPanelDropArea and verifying AI generation. Resolve crashes drop failures and export stalls quickly with this diagnostic guide.

- Repository: [Palmier/palmier-pro](https://github.com/palmier-io/palmier-pro)
- Tags: how-to-guide
- Published: 2026-06-22

---

**Troubleshoot Palmier Pro by inspecting categorized logs in `~/Library/Logs/PalmierPro/crash.log`, validating `MediaPanelDropArea` bindings, and verifying AI generation logs in [`Project/VideoProject.swift`](https://github.com/palmier-io/palmier-pro/blob/main/Project/VideoProject.swift) to isolate crashes, drop failures, and export stalls.**

Palmier Pro is a native macOS video editor built with Swift 6.2, SwiftUI, and AVFoundation. Its architecture splits functionality into loosely coupled layers, from the centralized `AppTheme` system to native AppKit drop bridges. When you need to troubleshoot common issues in Palmier Pro, the solution lies in its hierarchical logging system and specific source files that handle media ingestion, preview rendering, and export pipelines.

## Centralized Logging and Diagnostics

The foundation of all troubleshooting starts with the `Log` subsystem in [`Sources/PalmierPro/Utilities/Log.swift`](https://github.com/palmier-io/palmier-pro/blob/main/Sources/PalmierPro/Utilities/Log.swift). This centralized logger categorizes output by functional area—`Log.app`, `Log.project`, `Log.search`, `Log.preview`, and `Log.export`—allowing you to filter noise and isolate specific components.

Crash logs are automatically redirected to `~/Library/Logs/PalmierPro/crash.log` with full backtraces. When the app crashes, this file contains the exact `NSException` name, reason, and stack trace. If you encounter a startup crash, check whether `Log.app.notice("launch …")` appears in the log; its absence indicates the crash occurred before logging initialization.

## Troubleshooting Common Issues by Symptom

### App Crashes on Launch

Startup failures typically originate in initialization sequences before the UI layer loads. Inspect `~/Library/Logs/PalmierPro/crash.log` for `NSException` details. If the log shows no `Log.app.notice` entries, the crash happened during `Log.bootstrap()` or earlier in the Swift runtime.

### Drag-and-Drop Ignored in Media Panel

The media panel uses a native AppKit bridge via [`MediaPanelDropArea.swift`](https://github.com/palmier-io/palmier-pro/blob/main/MediaPanelDropArea.swift) because SwiftUI’s `.onDrop` fails silently when parent views also register drop targets. If drops appear ignored, verify two things in your view implementation:

- The `isTargeted` binding must propagate to the UI to provide visual feedback.
- The `onDrop` closure must be set in your view model.

Use `Log.project.debug` to trace when drops occur:

```swift
MediaPanelDropArea(isTargeted: $isTargeted, onDrop: { urls in
    Log.project.debug("Dropped URLs: \(urls)")
}) {
    // Your content
}

```

### Visual Search Returns Empty Results

The visual search pipeline downloads models and stores embeddings under `~/Library/Logs/PalmierPro/Embeddings`. If queries return no results, check [`Sources/PalmierPro/Search/Models/VisualModelLoader.swift`](https://github.com/palmier-io/palmier-pro/blob/main/Sources/PalmierPro/Search/Models/VisualModelLoader.swift) for `Log.search.notice("search model ready …")` entries. Missing entries indicate a failed download.

To force a fresh download:

```swift
func resetSearchModel() async {
    let embeddingsURL = FileManager.default.homeDirectoryForCurrentUser
        .appendingPathComponent("Library/Logs/PalmierPro/Embeddings")
    try? FileManager.default.removeItem(at: embeddingsURL)
    await VisualModelLoader.shared.loadIfNeeded()
}

```

### Export Stalls or Fails

The export pipeline lives in [`Sources/PalmierPro/Export/ExportService.swift`](https://github.com/palmier-io/palmier-pro/blob/main/Sources/PalmierPro/Export/ExportService.swift) and [`PalmierProjectExporter.swift`](https://github.com/palmier-io/palmier-pro/blob/main/PalmierProjectExporter.swift). Common failures include:

- **Missing assets**: Logged as `Log.project.warning("restore: media file missing …")` in [`VideoProject.swift`](https://github.com/palmier-io/palmier-pro/blob/main/VideoProject.swift).
- **Codec incompatibility**: Surfaces via `Log.preview.error` in [`Sources/PalmierPro/Preview/VideoEngine.swift`](https://github.com/palmier-io/palmier-pro/blob/main/Sources/PalmierPro/Preview/VideoEngine.swift).
- **Permission errors**: Written to the crash log when the exporter cannot create target directories.

Verify that the destination folder is writable and that `Log.project.error` contains no manifest restoration failures.

### Missing AI-Generated Assets

AI-generated assets (Lottie animations, captions) rely on [`generation-log.json`](https://github.com/palmier-io/palmier-pro/blob/main/generation-log.json) stored in the project bundle. If the editor refuses to open a project or assets appear missing, inspect this log in [`Sources/PalmierPro/Project/VideoProject.swift`](https://github.com/palmier-io/palmier-pro/blob/main/Sources/PalmierPro/Project/VideoProject.swift).

Validate log integrity:

```swift
func verifyGenerationLog(at projectURL: URL) {
    let logURL = projectURL.appendingPathComponent(Project.generationLogFilename)
    guard let data = try? Data(contentsOf: logURL) else {
        Log.project.error("Generation log not found")
        return
    }
    do {
        let log = try JSONDecoder().decode(GenerationLog.self, from: data)
        Log.project.notice("Valid log with \(log.entries.count) entries")
    } catch {
        Log.project.error("Corrupted generation log: \(Log.detail(error))")
    }
}

```

If decoding fails, delete [`generation-log.json`](https://github.com/palmier-io/palmier-pro/blob/main/generation-log.json) and regenerate the assets.

### UI Styling Glitches

All styling is forced through the `AppTheme` system in [`Sources/PalmierPro/UI/AppTheme.swift`](https://github.com/palmier-io/palmier-pro/blob/main/Sources/PalmierPro/UI/AppTheme.swift). Visual inconsistencies almost always indicate missing or misused theme constants. Check for hard-coded values in custom views that bypass `AppTheme` for colors, fonts, or spacing.

## Debugging Techniques and Code Examples

### Enabling Verbose Logging at Startup

To capture maximum diagnostic data from launch, bootstrap the logger immediately:

```swift
import PalmierPro

@main
struct PalmierProApp: App {
    init() {
        Log.bootstrap() // Installs crash handler
        Log.app.debug("⚡️ Palmier Pro starting")
    }
    // ...
}

```

### Inspecting Crash Logs via Terminal

When the app crashes, access the backtrace immediately:

```bash
cat ~/Library/Logs/PalmierPro/crash.log | less

```

## Summary

- **Crash diagnostics** start at `~/Library/Logs/PalmierPro/crash.log`, which captures `NSException` details and stack traces.
- **Drag-and-drop failures** require inspecting [`MediaPanelDropArea.swift`](https://github.com/palmier-io/palmier-pro/blob/main/MediaPanelDropArea.swift) to ensure `isTargeted` bindings and `onDrop` closures are properly configured.
- **Search malfunctions** often stem from incomplete model downloads in [`VisualModelLoader.swift`](https://github.com/palmier-io/palmier-pro/blob/main/VisualModelLoader.swift); delete the `Embeddings` folder to force renewal.
- **Export errors** manifest as `Log.project.warning` or `Log.preview.error` entries, typically indicating missing media or codec issues.
- **AI asset corruption** is resolved by validating or deleting [`generation-log.json`](https://github.com/palmier-io/palmier-pro/blob/main/generation-log.json) in [`VideoProject.swift`](https://github.com/palmier-io/palmier-pro/blob/main/VideoProject.swift).
- **UI inconsistencies** are traced to deviations from [`AppTheme.swift`](https://github.com/palmier-io/palmier-pro/blob/main/AppTheme.swift) constants.

## Frequently Asked Questions

### Where are Palmier Pro crash logs stored?

Crash logs are written to `~/Library/Logs/PalmierPro/crash.log` automatically when the app encounters a fatal exception. This file contains the `NSException` name, reason, and full backtrace. If the file is missing, check Console.app for crash reports from the macOS system.

### Why does drag-and-drop stop working in the media panel?

The media panel uses `NSViewRepresentable` via [`MediaPanelDropArea.swift`](https://github.com/palmier-io/palmier-pro/blob/main/MediaPanelDropArea.swift) to bypass SwiftUI’s drop handling limitations. If drops are ignored, verify that the `isTargeted` binding updates the UI state and that the `onDrop` closure is not nil in your view model. Parent views registering their own drop targets can also intercept events.

### How do I fix empty search results in Palmier Pro?

Empty results usually indicate the visual search model failed to download. Check `Log.search` for readiness notices. If the model is missing, delete the `~/Library/Logs/PalmierPro/Embeddings` directory and restart the app to trigger a fresh download via `VisualModelLoader.shared.loadIfNeeded()`.

### What causes exports to stall or produce no output?

Export stalls typically involve missing source files (logged as `Log.project.warning`), codec incompatibilities (`Log.preview.error`), or insufficient disk permissions. Verify that all timeline media exists and that the destination directory is writable before initiating the export process.