EarthImager 2D crashes at startup with 'Exception EAccessViolation ... at 004956C7' on AMD computers
Fix for EarthImager2D.exe 2.4.4.649 on AMD Ryzen / Ryzen AI processors
| Applies to | |
|---|---|
| Product | EarthImager 2D (EarthImager2D.exe version 2.4.4.649) |
| File MD5 (original) | 12B4112C35C6AE6887E6CBE300B7F7AC |
| Computers affected | Computers with AMD processors (e.g., AMD Ryzen / Ryzen AI, such as the HP ZBook Ultra G1a, Lenovo LOQ Essential) |
| Not affected | EarthImager 1D and EarthImager 3D; Intel computers |
On some AMD computers, EarthImager 2D stops with an access violation error as soon as it starts. The cause is a small programming issue in how EarthImager 2D detects the processor. This article explains how to fix it in a few minutes with a ready-made PowerShell script, and how to undo the fix if needed.
SymptomOn computers with AMD processors (e.g., AMD Ryzen / Ryzen AI, such as the HP ZBook Ultra G1a), EarthImager 2D shows the following message at startup:
Exception EAccessViolation in module EarthImager2D.exe at 004956C7. Access violation at address 008956C7 in module 'EarthImager2D.exe'. Read of address 00000000.
- EarthImager 1D and EarthImager 3D work normally on the same computer.
- The same EarthImager 2D installation works normally on Intel computers.
Things that do NOT fix this problem
To save you time: the following steps have been tried and do not solve this issue:
- Compatibility mode settings
- Reinstalling EarthImager 2D
- Updating or changing graphics / OpenGL drivers
- Reinstalling or updating the dongle (Sentinel) driver
- Changes to the ini file
Cause (short version)
When EarthImager 2D starts, it checks which processor the computer has. On AMD processors this check leaves some internal processor values in a state the program does not expect. As a result, EarthImager 2D skips part of its startup preparation and crashes a moment later. The fix changes 4 bytes in EarthImager2D.exe so that the check works correctly on AMD processors. See Technical details below for more information.
Solution
Before you begin
- You need the script file Fix-EarthImager2D-AMD.ps1 (attached to this article). Save it to your Downloads folder.
- EarthImager 2D is normally installed in
C:\AGI\EarthImager2D. The script uses this folder automatically. - If EarthImager 2D is installed under Program Files, you must run PowerShell as administrator (see Step 3, option B).
- The script makes a backup of the original program (
EarthImager2D.exe.orig) before changing anything, so the change can be undone at any time.
Step 1 – Close EarthImager 2D
Close EarthImager 2D, including any open error message windows. The script will not run while EarthImager 2D is open.
Step 2 – Save the script
Download the attached file Fix-EarthImager2D-AMD.ps1 and save it to your Downloads folder.
Step 3 – Run the script
Option A – EarthImager 2D installed in C:\AGI\EarthImager2D (default):
- Open your Downloads folder in File Explorer.
- Right-click Fix-EarthImager2D-AMD.ps1 and choose Run with PowerShell.
- If Windows asks whether you want to run the file or change the execution policy, confirm with Yes / Open.
- Wait for the message Success! EarthImager2D.exe has been patched. and press Enter to close the window.
Option B – EarthImager 2D installed under Program Files, or Option A does not work:
- Click Start, type PowerShell, right-click Windows PowerShell and choose Run as administrator.
- Copy the following line, paste it into the PowerShell window (right-click pastes) and press Enter:
powershell.exe -ExecutionPolicy Bypass -File "$env:USERPROFILE\Downloads\Fix-EarthImager2D-AMD.ps1"
If EarthImager 2D is not installed in C:\AGI\EarthImager2D, add the full path to EarthImager2D.exe with -Path, for example:
powershell.exe -ExecutionPolicy Bypass -File "$env:USERPROFILE\Downloads\Fix-EarthImager2D-AMD.ps1" -Path "C:\Program Files\<your folder>\EarthImager2D.exe"
Option C – No attachment available: open PowerShell (as administrator if needed), paste the complete script from the Appendix at the end of this article and press Enter.
Step 4 – Start EarthImager 2D
Start EarthImager 2D as usual. It should now open without the error message.
Messages you may see
| Message | What it means / what to do |
|---|---|
| Success! EarthImager2D.exe has been patched. | The fix was applied. Start EarthImager 2D. |
| Already patched. | The fix is already installed. Nothing was changed. |
| EarthImager 2D is currently running. | Close EarthImager 2D and run the script again. |
| EarthImager2D.exe was not found at: … | EarthImager 2D is installed in another folder. Run the script with -Path (see Option B). |
| This copy of EarthImager2D.exe is not the version this fix is made for. | Your version is different. No changes were made. Please contact AGI support. Do not patch other versions. |
| Access denied. | Run PowerShell as administrator (Option B) and try again. |
| Verification failed … original file was restored. | Something unexpected happened; your original file is back in place. Please contact AGI support. |
How to undo the fix
The script keeps the original program as EarthImager2D.exe.orig in the EarthImager 2D folder. You can restore it in either of two ways:
Using the script (recommended): close EarthImager 2D, open PowerShell (as administrator if installed under Program Files) and run the script with the -Undo option:
powershell.exe -ExecutionPolicy Bypass -File "$env:USERPROFILE\Downloads\Fix-EarthImager2D-AMD.ps1" -Undo
Manually:
- Close EarthImager 2D.
- In the EarthImager 2D folder (normally
C:\AGI\EarthImager2D), delete EarthImager2D.exe. - Rename EarthImager2D.exe.orig back to EarthImager2D.exe.
Important notes
- Reinstalling or updating EarthImager 2D restores the original file. If the error comes back after a reinstall or update, simply run the script again.
- Digital signature / antivirus: after the fix, the digital signature of EarthImager2D.exe (if any) is no longer valid. Your antivirus software or Windows SmartScreen may therefore show a warning when you start the program.
- Other versions: the fix is only for EarthImager2D.exe version 2.4.4.649 (MD5
12B4112C35C6AE6887E6CBE300B7F7AC). If the script reports that the MD5 does not match, you have a different version. Please contact AGI support and do not patch other versions.
Technical details
A CPU-detection routine in EarthImager2D.exe saves and restores the CPU registers with 16-bit instructions (pushaw / popaw). On AMD processors, the CPUID instruction leaves values in the upper halves of the registers, and these are not restored by the 16-bit instructions. As a result, the program skips part of its startup initialization and then crashes when it writes its first log entry.
The fix replaces these 2 instructions with their 32-bit equivalents (pushad / popad, each followed by a nop), 4 bytes in total:
| File offset | Original bytes | New bytes | Change |
|---|---|---|---|
| 5066329 (0x4D4E59) | 66 60 | 60 90 | pushaw → pushad, nop |
| 5066367 (0x4D4E7F) | 66 61 | 61 90 | popaw → popad, nop |
| File | MD5 |
|---|---|
| EarthImager2D.exe 2.4.4.649 (original) | 12B4112C35C6AE6887E6CBE300B7F7AC |
| EarthImager2D.exe 2.4.4.649 (patched) | 24B95D97D364671EFCBE87FC74C4EDE0 |
The script (Windows PowerShell 5.1 or later) checks that the file exists and that EarthImager 2D is not running, verifies the MD5 and the 4 original bytes, creates the backup EarthImager2D.exe.orig (an existing backup is never overwritten), writes the change and verifies the new MD5. If the verification fails, it automatically restores the original file. The -Undo switch restores the original from the backup.
Appendix – Script to paste into PowerShell
If you cannot use the attached file, you can paste this complete script into a PowerShell window and press Enter. It performs the same checks and creates the same backup. If EarthImager 2D is installed in a different folder, change the path on the second line first. To undo, use the manual steps in How to undo the fix.
& { $Path = 'C:\AGI\EarthImager2D\EarthImager2D.exe' # change if installed elsewhere $Orig = '12B4112C35C6AE6887E6CBE300B7F7AC' $Fixed = '24B95D97D364671EFCBE87FC74C4EDE0' $Backup = $Path + '.orig' if (-not (Test-Path -LiteralPath $Path)) { Write-Host "Not found: $Path" -ForegroundColor Red; return } if (Get-Process EarthImager2D -ErrorAction SilentlyContinue) { Write-Host 'Please close EarthImager 2D first.' -ForegroundColor Red; return } $md5 = (Get-FileHash -LiteralPath $Path -Algorithm MD5).Hash if ($md5 -eq $Fixed) { Write-Host 'Already patched.' -ForegroundColor Green; return } if ($md5 -ne $Orig) { Write-Host "Unsupported version (MD5 $md5). No changes made. Contact AGI support." -ForegroundColor Yellow; return } try { $full = (Resolve-Path -LiteralPath $Path).ProviderPath $bytes = [System.IO.File]::ReadAllBytes($full) if ($bytes[5066329] -ne 0x66 -or $bytes[5066330] -ne 0x60 -or $bytes[5066367] -ne 0x66 -or $bytes[5066368] -ne 0x61) { Write-Host 'Unexpected bytes. No changes made. Contact AGI support.' -ForegroundColor Red; return } if (-not (Test-Path -LiteralPath $Backup)) { Copy-Item -LiteralPath $Path -Destination $Backup -ErrorAction Stop } $bytes[5066329] = 0x60; $bytes[5066330] = 0x90 # pushaw -> pushad $bytes[5066367] = 0x61; $bytes[5066368] = 0x90 # popaw -> popad [System.IO.File]::WriteAllBytes($full, $bytes) if ((Get-FileHash -LiteralPath $Path -Algorithm MD5).Hash -eq $Fixed) { Write-Host 'Success! You can now start EarthImager 2D.' -ForegroundColor Green } else { Copy-Item -LiteralPath $Backup -Destination $Path -Force Write-Host 'Verification failed; original restored. Contact AGI support.' -ForegroundColor Red } } catch [System.UnauthorizedAccessException] { Write-Host 'Access denied. Run PowerShell as administrator and try again.' -ForegroundColor Red } catch { if ($_.CategoryInfo.Category -eq 'PermissionDenied') { Write-Host 'Access denied. Run PowerShell as administrator and try again.' -ForegroundColor Red } else { Write-Host ('Error: ' + $_.Exception.Message) -ForegroundColor Red } } }Still having problems?
If you still have problems, contact AGI support: AGI technical support at https://helpdesk.agiusa.com. Please include the message shown by the script and your EarthImager 2D version.