[GH-ISSUE #14450] [Windows] App will not launch if an update is pending #35145

Closed
opened 2026-04-22 19:26:07 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @brpeterman on GitHub (Feb 26, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/14450

What is the issue?

Summary

When launching Ollama on Windows, the app will crash upon launch if there's an update available to download. I don't think this shows up in a release yet, since the commit that added the new code path was introduced in the latest release.

Issue

#13512 introduced this branch, which will pop up a tray notification if there's an update available.

On Windows, this calls UpdateAvailable, which expects app.t to be initialized. Initialization happens in osRun, which isn't called until well after the update check, so we get a null pointer dereference.

Reproducing

It's kind of a niche setup right now:

  • Install Ollama < 0.17.1
  • Download the latest source on Windows.
  • Attempt to run the GUI: $env:OLLAMA_DEBUG=1; & go run .\cmd\app -dev
  • See the attached error log for the result.

Obviously this setup doesn't impact users right now, but I expect it'll be a problem once Ollama > 0.17.1 is released.

Solution

Probably one or more of the following:

  • Guard against nil.
  • Move the update check to after app.t is assigned.

Relevant log output

time=2026-02-26T14:46:22.015-06:00 level=INFO source=app_windows.go:270 msg="starting Ollama" app=C:\Users\brpet\AppData\Local\Temp\go-build1446820180\b001\exe version=0.0.0 OS=Windows/10.0.26100
time=2026-02-26T14:46:22.022-06:00 level=INFO source=app.go:239 msg="initialized tools registry" tool_count=0
time=2026-02-26T14:46:22.027-06:00 level=INFO source=app.go:254 msg="starting ollama server"
time=2026-02-26T14:46:22.027-06:00 level=INFO source=app.go:285 msg="starting ui server" port=3001
time=2026-02-26T14:46:22.027-06:00 level=DEBUG source=app.go:287 msg="starting ui server on port" port=3001
time=2026-02-26T14:46:22.028-06:00 level=DEBUG source=app.go:299 msg="update pending on startup, showing tray notification"
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x30 pc=0x7ff7b971e1a4]

goroutine 1 [running, locked to thread]:
main.UpdateAvailable(...)
        C:/Users/brpet/src/ollama/app/cmd/app/app_windows.go:157
main.main()
        C:/Users/brpet/src/ollama/app/cmd/app/app.go:300 +0x1564
exit status 2

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.17.1

Originally created by @brpeterman on GitHub (Feb 26, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/14450 ### What is the issue? ### Summary When launching Ollama on Windows, the app will crash upon launch if there's an update available to download. I don't think this shows up in a release yet, since the commit that added the new code path was introduced in the latest release. ### Issue #13512 introduced [this branch](https://github.com/ollama/ollama/blob/9bf41969f0c23d2ee980d7f092f5f80ea4521d2a/app/cmd/app/app.go#L298-L301), which will pop up a tray notification if there's an update available. On Windows, this calls [UpdateAvailable](https://github.com/ollama/ollama/blob/9bf41969f0c23d2ee980d7f092f5f80ea4521d2a/app/cmd/app/app_windows.go#L157), which expects `app.t` to be initialized. Initialization happens in `osRun`, which isn't called until [well *after*](https://github.com/ollama/ollama/blob/9bf41969f0c23d2ee980d7f092f5f80ea4521d2a/app/cmd/app/app.go#L343) the update check, so we get a null pointer dereference. ### Reproducing It's kind of a niche setup right now: - Install Ollama < 0.17.1 - Download the latest source on Windows. - Attempt to run the GUI: `$env:OLLAMA_DEBUG=1; & go run .\cmd\app -dev` - See the attached error log for the result. Obviously this setup doesn't impact users right now, but I expect it'll be a problem once Ollama > 0.17.1 is released. ### Solution Probably one or more of the following: - Guard against nil. - Move the update check to *after* `app.t` is assigned. ### Relevant log output ```shell time=2026-02-26T14:46:22.015-06:00 level=INFO source=app_windows.go:270 msg="starting Ollama" app=C:\Users\brpet\AppData\Local\Temp\go-build1446820180\b001\exe version=0.0.0 OS=Windows/10.0.26100 time=2026-02-26T14:46:22.022-06:00 level=INFO source=app.go:239 msg="initialized tools registry" tool_count=0 time=2026-02-26T14:46:22.027-06:00 level=INFO source=app.go:254 msg="starting ollama server" time=2026-02-26T14:46:22.027-06:00 level=INFO source=app.go:285 msg="starting ui server" port=3001 time=2026-02-26T14:46:22.027-06:00 level=DEBUG source=app.go:287 msg="starting ui server on port" port=3001 time=2026-02-26T14:46:22.028-06:00 level=DEBUG source=app.go:299 msg="update pending on startup, showing tray notification" panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x30 pc=0x7ff7b971e1a4] goroutine 1 [running, locked to thread]: main.UpdateAvailable(...) C:/Users/brpet/src/ollama/app/cmd/app/app_windows.go:157 main.main() C:/Users/brpet/src/ollama/app/cmd/app/app.go:300 +0x1564 exit status 2 ``` ### OS Windows ### GPU Nvidia ### CPU Intel ### Ollama version 0.17.1
GiteaMirror added the appbug labels 2026-04-22 19:26:08 -05:00
Author
Owner

@brpeterman commented on GitHub (Feb 26, 2026):

If I've assessed this correctly (and I may not have), this might merit recalling the 0.17.1 release. As soon as 0.17.2 goes up, this will break Windows and the only fix will be a reinstall with the new version.

<!-- gh-comment-id:3969234551 --> @brpeterman commented on GitHub (Feb 26, 2026): If I've assessed this correctly (and I may not have), this might merit recalling the 0.17.1 release. As soon as 0.17.2 goes up, this will break Windows and the only fix will be a reinstall with the new version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#35145