unigraminsiders | Unsorted

Telegram-канал unigraminsiders - Unigram Insiders

3063

Stay up to date at @unigram Update history: github.com/UnigramDev/Unigram/commits Beta: @unigramappx Please: - Keep the discussion about Unigram - Keep the discussion Safe For Work - Keep sarcasm out of this chat - Don't talk about TDesktop and Linux

Subscribe to a channel

Unigram Insiders

Maybe me in Fela's opinion 😂
It's worth to watch anyone.😁

Читать полностью…

Unigram Insiders

Hey, I wanted to ask if you could add an AI bot to the group so we can quickly and briefly ask it about repetitive questions or whether there's a new version.

Читать полностью…

Unigram Insiders

🔨 1 new commit to Unigram:develop:

b6eeb45: Drop a code block's pending tokenization when it unloads by Fela

Читать полностью…

Unigram Insiders

🔨 1 new commit to Unigram:develop:

1f3b8cd: Route a nested mini app's navigation to the main window, not its opener by Fela

Читать полностью…

Unigram Insiders

🔨 1 new commit to Unigram:develop:

8ded8d0: Skip the popup sweep when a session closes before the window has content by Fela

Читать полностью…

Unigram Insiders

🔨 2 new commits to Unigram:develop:

ba604dc: Close the animation task behind a gate, not a bare count read by Fela
bf08740: Resend the packet avcodec refused instead of reading over it by Fela

Читать полностью…

Unigram Insiders

Updated Unigram (12.10.6) and … broken sticker.
Just as I thought…

Читать полностью…

Unigram Insiders

ok thanks. I’ll try updating it and testing. I have an old sticker that suddenly stopped working, and I think tlottie might be the cause.

Читать полностью…

Unigram Insiders

Bots are invading this chat...

Читать полностью…

Unigram Insiders

🔨 1 new commit to Unigram:hosted-page-title-event:

5974715: Track the registered scrolling host instead of finding it again by Fela

Читать полностью…

Unigram Insiders

hello!
can you make the pop up panel that contains an info about a person in a PMs has an accessibility label?, at this time it is focusable but it is not labeled.

Читать полностью…

Unigram Insiders

🔨 9 new commits to Unigram:nre-12-10-7:

9023a67: Delete only the non-null selected media messages by Fela
4369a25: Scroll to the newest media when the chosen day has none after it by Fela
4a63dfb: Drop a search step whose results were replaced while loading more by Fela
9375f5e: Keep the rich editor toolbar disabled until the editor is ready by Fela
bc8588d: Handle entity clicks in a rich message shown without a message by Fela
92d3467: Close the emoji skin tone flyout when its drawer is deactivated by Fela
751c31c: Read the Downloaded event once before raising it by Fela
7486ef1: Skip page media blocks without a file when building the gallery by Fela
3baff4d: Stop the call window's auto-close timer when the window closes by Fela

Читать полностью…

Unigram Insiders

🔌 New pull request Unigram#3467 Keep the confetti canvas usable after it is unloaded and reloaded
by: @FrayxRulez

Reported by crash telemetry on 12.10.7.

### Exception

NativeException: ACCESS_VIOLATION Reading address 0x0000000000000088, on the UI thread:

Microsoft.Graphics.Canvas.dll!CanvasAnimatedControl::ChangedImpl+0x229   CanvasAnimatedControl.cpp:855
Microsoft.Graphics.Canvas.dll!ExceptionBoundary<...>+0x75 ErrorHandling.h:221
Microsoft.Graphics.Canvas.dll!DelegateArgTraits<IDispatchedHandler>::DelegateInvokeHelper<...>::Invoke+0x17
Windows.UI.dll!CDispatcher::ProcessInvokeItem
Windows.UI.dll!CDispatcher::ProcessMessage
...
Windows.UI.Xaml.dll!CJupiterWindow::RunCoreWindowMessageLoop


### Cause

Line 855 of Win2D 1.28.3's CanvasAnimatedControl.cpp is m_gameLoop->StopDispatcher();. Disassembled from the shipped Microsoft.Graphics.Canvas.dll (PDB matched): mov rax,[rbx+348h] loads m_gameLoop, then mov rcx,[rax+88h] reads CanvasGameLoop::m_gameLoopThread (the member after the 0x50-byte recursive_mutex and six pointers/bools). So m_gameLoop is null while IsLoaded() - checked a few instructions earlier - is true.

ConfettiView.OnUnloaded calls Canvas.RemoveFromVisualTree(). The canvas is the root of ConfettiView`'s template, and Win2D's `RemoveFromVisualTreeImpl only knows how to detach an element from a Panel, UserControl or ContentControl parent, so the control stays in the tree. What does happen is that CanvasAnimatedControl::RemoveFromVisualTree resets m_canvasSwapChainPanel. When the canvas is later loaded again, CanvasAnimatedControl::Loaded() sees no swap chain panel, takes its designer path (the assert is compiled out) and returns without creating the game loop, but BaseControl::OnLoaded still sets m_isLoaded = true. The next change that needs a draw - a resize, a DPI change - runs ChangedImpl, which checks IsLoaded() and dereferences the null game loop.

MainPage realizes Confetti on the first confetti and never unloads it (the Completed hookup is commented out), so every later unload/reload of the page arms this: the passcode lock does exactly that (WindowContext.Lock swaps the window content, Unlock restores it), and one report's log ends on Hiding passcode lock. Most others end on a window resize or restore, i.e. the first draw request after an earlier reload. The same path also left confetti silently broken after a reload, since Canvas was nulled.

### Change

- Stop calling RemoveFromVisualTree and stop nulling Canvas`; Win2D already destroys the game loop on `Unloaded and recreates it on Loaded, as long as it still has its swap chain panel.
- RemoveFromVisualTree was there to break the cycle Win2D creates by holding Draw handlers strongly. Draw is now subscribed only while the canvas is loaded, with a load count mirroring Win2D's own m_loadedCount, since Loaded for a new parent can arrive before Unloaded for the old one. Loaded`/`Unloaded stay subscribed, which is what lets the view recover.

Unbuilt: syntax-checked with Roslyn only, not compiled or run.


Reply to this message to post a comment on GitHub.

Читать полностью…

Unigram Insiders

🔌 New pull request Unigram#3466 Translate nine more localised system error messages
by: @FrayxRulez

Crash messages seen on 12.10.x in a language other than English, added to TranslateText so each merges into the group its English counterpart already forms. Every target is a string the method or TranslateHResult already returns. Nothing new is invented.

| Sentence | Maps to |
|---|---|
| Czech and Finnish RPC_E_WRONG_THREAD text | "The application called an interface that was marshalled for a different thread." |
| RPC 服务器不可用。 | "The RPC server is unavailable." |
| Portuguese (Brazil) and Norwegian D2DERR_WRONG_RESOURCE_DOMAIN text | "The resource was realized on the wrong render target." |
| German ERROR_COMMITMENT_LIMIT text | "The paging file is too small for this operation to complete." |
| Polish ERROR_NO_SYSTEM_RESOURCES text | "Insufficient system resources exist to complete the requested service." |
| Norwegian and Simplified Chinese E_NOINTERFACE text | "No such interface supported" |

Several of these already arrive with the English first line, because TryTranslateHResult rewrites it.
The localised copy is the second line, which is the originating error description. That line only goes
through TranslateText, so it kept each group split by language.

Not added: one Korean report whose second line reached the backend as mojibake (a lossy ANSI conversion,
which reads like the "no mapping for the Unicode character" text). Its code is not known, so it is left
unmapped.

Not built: no UWP/.NET Native toolchain here. CSharpSyntaxTree.ParseText on the edited file reports no
diagnostics. That confirms the file still parses and nothing more. None of the new labels duplicate an
existing one (checked by search before adding).

🤖 Generated with Claude Code


Reply to this message to post a comment on GitHub.

Читать полностью…

Unigram Insiders

🔌 New pull request Unigram#3464 Handle NavigationButton toggling before its template is applied
by: @FrayxRulez

ArgumentNullException, parameter element. Reported by crash telemetry on 12.10.7.

   at Windows.UI.Xaml.Hosting.ElementComposition.GetElementVisual(UIElement)
at Telegram.Controls.NavigationButton.OnToggle(Object, RoutedEventArgs)
at Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.Stubs.put_IsChecked(__ComObject, Nullable`1)
at Telegram.Views.MainPage.UpdatePaneToggleButtonVisibility()
at Telegram.Views.MainPage.ConvertFolder(ChatFolderViewModel, Boolean)
at Telegram.Views.MainPage.UpdateFolder(ChatFolderViewModel, Boolean, Boolean)
at Telegram.Views.MainPage.ProcessFolderCommands(ShortcutCommand, ShortcutInvokedEventArgs)
at Telegram.Views.MainPage.ProcessKeyboardAccelerators(ShortcutInvokedEventArgs)
at Telegram.Views.Host.RootWindow.OnShortcutInvoked(Object, ShortcutInvokedEventArgs)
at Telegram.Navigation.WindowContext.RaiseShortcutInvoked(InvokedShortcut, VirtualKeyModifiers)
at Telegram.Services.Keyboard.InputListener.OnAcceleratorKeyActivated(CoreDispatcher, AcceleratorKeyEventArgs)


## Cause

BackContent and PaneContent are template parts, so they stay null until OnApplyTemplate. OnToggle
passes one of them straight to GetElementVisual.

The log tail shows how the button toggles with no template. It opens with Lock: Showing passcode lock at
launch and has no Hiding passcode lock. WindowContext.Lock replaces the window content with
PasscodeWindow, so RootWindow`/`MainPage are never measured and none of their templates are applied.
The ScrollingHost == null lines just before the crash point the same way. But InputListener still
routes accelerators to the navigation services' frames, so a folder shortcut pressed on the lock screen
reaches MainPage.UpdatePaneToggleButtonVisibility. That sets Photo.IsChecked on a button that has no
template yet.

## Change

- OnToggle returns when the template parts are missing, because there is nothing to animate.
- OnApplyTemplate shows the back arrow when IsChecked is already true. Without this, the icon would
show the template's default hamburger after unlocking, even though the button is checked.

## Left alone

The shortcuts themselves still run against the hidden main page while the passcode lock is up (the same
log navigates to a chat under the lock). Blocking them in WindowContext.RaiseShortcutInvoked would be
the broader fix, but it would also block Ctrl+Q (Quit) on the lock screen, which MainPage handles. That
needs a decision, so this PR does not change it.

Not built: no UWP/.NET Native toolchain here. CSharpSyntaxTree.ParseText on the edited file reports no
diagnostics. That confirms the file still parses and nothing more.

🤖 Generated with Claude Code


Reply to this message to post a comment on GitHub.

Читать полностью…

Unigram Insiders

@frayxrulez Yo, are you there?

Читать полностью…

Unigram Insiders

💬 New comment on Unigram#2219 Add shuffle button for music player
by @cxinu

W

Reply to this message to post a comment on GitHub.

Читать полностью…

Unigram Insiders

🔨 1 new commit to Unigram:develop:

0f0dbe4: Translate nine more localised system error messages by Fela

Читать полностью…

Unigram Insiders

🔨 1 new commit to Unigram:develop:

b8384e7: Handle NavigationButton toggling before its template is applied by Fela

Читать полностью…

Unigram Insiders

🔨 2 new commits to Unigram:develop:

afca422: Watch the hosted page title with a CLR event, not a property callback by Fela
e90cb90: Track the registered scrolling host instead of finding it again by Fela

Читать полностью…

Unigram Insiders

🔨 2 new commits to Unigram:develop:

80067d9: Play sound effects through XAudio2 instead of an AudioGraph per sound by Fela
1229322: Say what the sound cache bound is actually for by Fela

Читать полностью…

Unigram Insiders

You can share, if you want

Читать полностью…

Unigram Insiders

From which version was the switch to the tlottie library made? I have version 12.9.1

Читать полностью…

Unigram Insiders

Leilani Mchor(8888214738)
⚠️ Confirm you are not a bot!
You will be banned in 12 seconds.

✅ Restrictions removed.

Читать полностью…

Unigram Insiders

I'm not sure which panel you're referring to, any chance you chould share a screenshot in private?

Читать полностью…

Unigram Insiders

🔌 New pull request Unigram#3468 Drop a code block's pending tokenization when it unloads
by: @FrayxRulez

ProcessCodeBlock tokenizes on a background thread and, when it resumes, only checks _generation == generation before clearing and refilling the paragraph it was given. _generation was bumped only in SetText, but OnUnloaded also calls Recycle, which returns the paragraph to the pool. If a code block unloaded before tokenization finished, the continuation still matched and wrote into a paragraph that was back in the pool or already owned by another block.

OnUnloaded now bumps _generation, so any tokenization started for the unloaded content is dropped. The bump is not in Recycle itself: SetText takes its generation and then calls Recycle before starting the tokenizations, so a bump there would discard every one of them.

Not tied to a specific crash group. Found while triaging the text-element crashes, where pooled paragraphs end up owned twice.

Unbuilt.

🤖 Generated with Claude Code


Reply to this message to post a comment on GitHub.

Читать полностью…

Unigram Insiders

🔨 1 new commit to Unigram:code-block-unload-generation:

5851803: Drop a code block's pending tokenization when it unloads by Fela

Читать полностью…

Unigram Insiders

🔨 1 new commit to Unigram:confetti-canvas-reload:

8b72938: Keep the confetti canvas usable after it is unloaded and reloaded by Fela

Читать полностью…

Unigram Insiders

🔌 New pull request Unigram#3465 Route a nested mini app's navigation to the main window, not its opener
by: @FrayxRulez

Exception: "Element not found. (Exception from HRESULT: 0x80070490)". Reported by crash telemetry on 12.10.7.

   2  __Interop.ForwardComStubs.Stub_27<System.__Canon, System.__Canon>
3 Telegram.Views.Host.SecondaryNavigationService.Navigate
Telegram\Views\Host\WebAppWindow.xaml.cs:2326
4 Telegram.Common.TLNavigationService.<NavigateToChat>d__21.MoveNext
Telegram\Common\TLNavigationService.cs:622


## Cause

Line 2326 is _ = _source.Window.SwitchToAsync();, which calls ApplicationViewSwitcher.SwitchAsync(Id).
That call throws ERROR_NOT_FOUND synchronously because the view no longer exists.

_source is the navigation service the mini app was opened from. TLNavigationService builds a
WebAppWindow with this. When a link inside one mini app opens a second one, this is the first
app's SecondaryNavigationService, so the second app's _source is the first app's service, and its
Window is the first app's view. If the first app is closed, any navigation from the second one
targets a view that is gone.

The log tail shows this exact sequence. web_app_open_tg_link to a ?startapp= link opens a new
WebAppWindow while the earlier one is still up. The earlier window then logs
OnClosedCore / OnViewReleased / OnShutdownCompleted. Seven seconds later the new window receives
web_app_open_tg_link to a channel, and that navigation is the crash.

The same chain also sent the navigation itself through the first app's dispatcher before it reached the
main window, so even without the throw it relied on a window that might already be gone.

## Change

SecondaryNavigationService takes its opener's own source when it is given another
SecondaryNavigationService. _source is therefore always the main window's service, which is what
Navigate and Switch mean ("go to the main window"). One step is enough, because no _source is
ever a secondary service.

Not built: no UWP/.NET Native toolchain here. CSharpSyntaxTree.ParseText on the edited file reports no
diagnostics. That confirms the file still parses and nothing more.

🤖 Generated with Claude Code


Reply to this message to post a comment on GitHub.

Читать полностью…

Unigram Insiders

🔌 New pull request Unigram#3463 Skip the popup sweep when a session closes before the window has content
by: @FrayxRulez

ArgumentException: "The parameter is incorrect. xamlRoot". Reported by crash telemetry on 12.10.7.

   3  Telegram.Services.LifetimeService.<>c__DisplayClass45_0.<Destroy>b__0
Telegram\Services\LifetimeService.cs:285
4 Telegram.Navigation.WindowContext.<>c__DisplayClass132_1.<ForEachAsync>b__0
Telegram\Navigation\WindowContext.cs:1400
5 Telegram.Navigation.DispatcherContext.<>c__DisplayClass9_0.<<DispatchAsync>b__0>d.MoveNext
Telegram\Navigation\DispatcherContext.cs:101
11 Telegram.Services.LifetimeService.<Destroy>d__45.MoveNext


## Cause

Line 285 is VisualTreeHelper.GetOpenPopupsForXamlRoot(window.XamlRoot), and window.XamlRoot is null.
WindowContext.XamlRoot is _content?.XamlRoot, so it stays null until the main window has content.

The log tails show when that happens. LifetimeService.Destroy runs about two seconds after
OnWindowCreated / CreateWindowWrapper and before OnLaunched, so InitializeFrame has not run
and the window is still empty. The only caller of Destroy is Session.Handle(UpdateAuthorizationState)
on AuthorizationStateClosed after AuthorizationStateLoggingOut. That is what TDLib reports at startup
for a session whose authorization was revoked while the app was not running. The account is logged
out, and the logout itself kills the launch.

## Change

Skip the popup sweep when there is no XamlRoot. A window without content cannot have open popups, so
nothing is lost. The rest of Destroy (the replacement session, the frame removal and the folder
deletion) runs as before.

Not built: no UWP/.NET Native toolchain here. CSharpSyntaxTree.ParseText on the edited file reports no
diagnostics. That confirms the file still parses and nothing more.

🤖 Generated with Claude Code


Reply to this message to post a comment on GitHub.

Читать полностью…
Subscribe to a channel