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

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 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. 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 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:

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 for Log.search.notice("search model ready …") entries. Missing entries indicate a failed download.

To force a fresh download:

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 and PalmierProjectExporter.swift. Common failures include:

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 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.

Validate log integrity:

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 and regenerate the assets.

UI Styling Glitches

All styling is forced through the AppTheme system in 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:

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:

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 to ensure isTargeted bindings and onDrop closures are properly configured.
  • Search malfunctions often stem from incomplete model downloads in 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 in VideoProject.swift.
  • UI inconsistencies are traced to deviations from 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 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.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →