nil pointer dereference #37
skobkin
commented 2024-11-03 22:39:14 +00:00
Owner
```
telegram-llm-bot | 2024/11/03 22:36:46 INFO history-message-save chat=-*redacted* from_id=*redacted* from_name=Alexey text="@*redacted* Ты живой?"
telegram-llm-bot | 2024/11/03 22:36:46 INFO stats-middleware: counting message chat type in stats type=supergroup
telegram-llm-bot | 2024/11/03 22:36:46 INFO /any-message type=mention
telegram-llm-bot | 2024/11/03 22:36:46 INFO /mention chat=-*redacted*
telegram-llm-bot | panic: runtime error: invalid memory address or nil pointer dereference
telegram-llm-bot | [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x80d959]
telegram-llm-bot |
telegram-llm-bot | goroutine 54 [running]:
telegram-llm-bot | telegram-ollama-reply-bot/llm.chatMessageToText({{0xc000284848, 0x6}, {0xc000284872, 0x7}, {0xc000284941, 0x395}, 0x0, 0x0, 0x0})
telegram-llm-bot | /build/llm/request_context.go:104 +0x99
telegram-llm-bot | telegram-ollama-reply-bot/llm.chatMessageToOpenAiChatCompletionMessage({{0xc000284848, 0x6}, {0xc000284872, 0x7}, {0xc000284941, 0x395}, 0x0, 0x0, 0x0})
telegram-llm-bot | /build/llm/request_context.go:90 +0x126
telegram-llm-bot | telegram-ollama-reply-bot/llm.(*LlmConnector).HandleChatMessage(0xc00007c1e8, {{0xc0009e03c8, 0x6}, {0xc0009e03f2, 0x7}, {0xc0009e04c1, 0x1f}, 0x0, 0x0, 0x0}, ...)
telegram-llm-bot | /build/llm/llm.go:54 +0x6c5
telegram-llm-bot | telegram-ollama-reply-bot/bot.(*Bot).processMention(0xc00039c280, 0xc0009b4008)
telegram-llm-bot | /build/bot/bot.go:149 +0x2e5
telegram-llm-bot | telegram-ollama-reply-bot/bot.(*Bot).textMessageHandler(0xc00039c280, 0xc000638140?, {0x30e5bd7, 0xc0009b4008, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...})
telegram-llm-bot | /build/bot/bot.go:122 +0x40a
telegram-llm-bot | github.com/mymmrac/telego/telegohandler.(*HandlerGroup).processUpdateWithMiddlewares(0xc0000e9980, 0xc000432540, {0x30e5bd7, 0xc0009b4008, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...)
telegram-llm-bot | /go/pkg/mod/github.com/mymmrac/telego@v0.29.1/telegohandler/handler_group.go:98 +0x4bd
telegram-llm-bot | github.com/mymmrac/telego/telegohandler.(*HandlerGroup).processUpdateWithMiddlewares.func1.1()
telegram-llm-bot | /go/pkg/mod/github.com/mymmrac/telego@v0.29.1/telegohandler/handler_group.go:76 +0x92
telegram-llm-bot | sync.(*Once).doSlow(0x0?, 0x0?)
telegram-llm-bot | /usr/local/go/src/sync/once.go:76 +0xb4
telegram-llm-bot | sync.(*Once).Do(...)
telegram-llm-bot | /usr/local/go/src/sync/once.go:67
telegram-llm-bot | github.com/mymmrac/telego/telegohandler.(*HandlerGroup).processUpdateWithMiddlewares.func1(0xc00021c000?, {0x30e5bd7, 0xc0009b4008, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...})
telegram-llm-bot | /go/pkg/mod/github.com/mymmrac/telego@v0.29.1/telegohandler/handler_group.go:75 +0x89
telegram-llm-bot | telegram-ollama-reply-bot/bot.(*Bot).chatTypeStatsCounter(0xc00039c280, 0xc000432540, {0x30e5bd7, 0xc0009b4008, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...)
telegram-llm-bot | /build/bot/middleware.go:31 +0x39c
telegram-llm-bot | github.com/mymmrac/telego/telegohandler.(*HandlerGroup).processUpdateWithMiddlewares(0xc0000e9980, 0xc000432540, {0x30e5bd7, 0xc0009b4008, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...)
telegram-llm-bot | /go/pkg/mod/github.com/mymmrac/telego@v0.29.1/telegohandler/handler_group.go:74 +0x283
telegram-llm-bot | github.com/mymmrac/telego/telegohandler.(*HandlerGroup).processUpdateWithMiddlewares.func1.1()
telegram-llm-bot | /go/pkg/mod/github.com/mymmrac/telego@v0.29.1/telegohandler/handler_group.go:76 +0x92
telegram-llm-bot | sync.(*Once).doSlow(0x8487c0?, 0xc0011c1100?)
telegram-llm-bot | /usr/local/go/src/sync/once.go:76 +0xb4
telegram-llm-bot | sync.(*Once).Do(...)
telegram-llm-bot | /usr/local/go/src/sync/once.go:67
telegram-llm-bot | github.com/mymmrac/telego/telegohandler.(*HandlerGroup).processUpdateWithMiddlewares.func1(0x0?, {0x30e5bd7, 0xc0009b4008, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...})
telegram-llm-bot | /go/pkg/mod/github.com/mymmrac/telego@v0.29.1/telegohandler/handler_group.go:75 +0x89
telegram-llm-bot | telegram-ollama-reply-bot/bot.(*Bot).chatHistory(0xc00039c280, 0xc000432540, {0x30e5bd7, 0xc0009b4008, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...)
telegram-llm-bot | /build/bot/middleware.go:49 +0x13d
telegram-llm-bot | github.com/mymmrac/telego/telegohandler.(*HandlerGroup).processUpdateWithMiddlewares(0xc0000e9980, 0xc000432540, {0x30e5bd7, 0xc0009b4008, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...)
telegram-llm-bot | /go/pkg/mod/github.com/mymmrac/telego@v0.29.1/telegohandler/handler_group.go:74 +0x283
telegram-llm-bot | github.com/mymmrac/telego/telegohandler.(*HandlerGroup).processUpdate(0xc0000e9980, 0x0?, {0x30e5bd7, 0xc0009b4008, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...})
telegram-llm-bot | /go/pkg/mod/github.com/mymmrac/telego@v0.29.1/telegohandler/handler_group.go:50 +0x9e
telegram-llm-bot | github.com/mymmrac/telego/telegohandler.(*BotHandler).Start.func1()
telegram-llm-bot | /go/pkg/mod/github.com/mymmrac/telego@v0.29.1/telegohandler/bot_handler.go:109 +0x1e5
telegram-llm-bot | created by github.com/mymmrac/telego/telegohandler.(*BotHandler).Start in goroutine 1
telegram-llm-bot | /go/pkg/mod/github.com/mymmrac/telego@v0.29.1/telegohandler/bot_handler.go:98 +0x15b
```
skobkin
added the 2024-11-03 22:39:14 +00:00
bug
label
skobkin
self-assigned this 2024-11-03 22:39:14 +00:00
skobkin
referenced this issue from a commit 2024-11-03 22:41:20 +00:00
nil pointer dereference fix (#37)
skobkin
referenced this issue from a pull request that will close it, 2024-11-03 22:41:48 +00:00
nil pointer dereference fix (#37) #38
skobkin
closed this issue 2024-11-03 22:43:05 +00:00
skobkin
referenced this issue from a commit 2024-11-03 22:43:07 +00:00
Merge pull request 'nil pointer dereference fix (#37)' (#38) from fix_quoted_messages_usernames_context into main
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?