primordic/IssueDupesLite huggingface dataset:
Repository: libre-tube/LibreTube

Issue #377: "Currently playing" notification video information
Created: 2022-06-04T20:59:28Z
Steps to reproduce

Play something
Close app in background
Open notification

Expected behavior
Notification must show at least currently playing video, but video preview image could be good too.
Actual behavior
No text applied
LibreTube version
0.3.1
Android version
Android 12
Other details
Using it on Samsung Galaxy Note 10+
Image of issue (Ukrainian language on phone, but video is with Latin characters only)

Acknowledgements

 I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
 I have written a short but informative title.
 I will fill out all of the requested information in this form.

Duplicate issue #488: Notification title not visible
Created: 2022-06-13T06:34:43Z
I was just playing songs through libretube and when I pulled down notification, I saw that the title is not visible though the music bar appears which was not available in previous version of this app, is it a bug or it is in beta stage? I m in Android 12
https://user-images.githubusercontent.com/70900505/173292977-cdc9a38d-3897-498f-8ece-543e46d73b11.mp4

Closing comment (2022-06-13T06:43:51Z): Thats because I couldn't find a good way to make it work yet (I only added the notification already because we're still in beta). It's a dupe of #377 btw :)
Repository: libre-tube/LibreTube

Issue #969: Create playlists without an account
Created: 2022-08-04T15:44:38Z
Describe your suggested feature
Similar to #954, but for being able to create playlists without a Piped account.
Other details
There are some related issues that were previously closed. Now that #954 has been implemented, just wanted to see if you're open to it now. If not, feel free to close this issue. :)
Acknowledgements

 I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
 I have written a short but informative title.
 I will fill out all of the requested information in this form.

Duplicate issue #1874: Allow to save playlist without logging in
Created: 2022-11-17T13:23:05Z
Describe your suggested feature
Currently the app requires us to log in order to create playlists.
Can you please allow us to do so without logging in? Thanks.
Other details
No response
Acknowledgements

 I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
 I have written a short but informative title.
 I will fill out all of the requested information in this form.

Closing comment (2022-11-17T13:36:38Z): Dupe of #969
Repository: libre-tube/LibreTube

Issue #2800: Next Video Starts From the End
Created: 2023-01-21T17:26:20Z
Steps to reproduce

Put some videos in the queue
Go to audio mode
Back to video mode

Expected behavior
The next video starts form the beginning
Actual behavior
The next video starts from the end
LibreTube version
b32a619 (Telegram Build) / 0.11.0 (Github)
Android version
Android 11 (ArrowOS)
Other details
No response
Acknowledgements

 I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
 I have written a short but informative title.
 I will fill out all of the requested information in this form.

Duplicate issue #2862: Go to the end of video if you switchback to video mode
Created: 2023-01-24T18:18:52Z
Steps to reproduce

play any video (go to middle of that)
switch to audio mode, wait until start playing
back to video mode again

Expected behavior
It should continue video in video mode
Actual behavior
Go to the end of video
LibreTube version
0.11.1
Android version
Android 13
Other details
No response
Acknowledgements

 I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
 I have written a short but informative title.
 I will fill out all of the requested information in this form.

Closing comment (2023-01-24T18:50:31Z): duplicate of #2800
Repository: libre-tube/LibreTube

Issue #2800: Next Video Starts From the End
Created: 2023-01-21T17:26:20Z
Steps to reproduce

Put some videos in the queue
Go to audio mode
Back to video mode

Expected behavior
The next video starts form the beginning
Actual behavior
The next video starts from the end
LibreTube version
b32a619 (Telegram Build) / 0.11.0 (Github)
Android version
Android 11 (ArrowOS)
Other details
No response
Acknowledgements

 I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
 I have written a short but informative title.
 I will fill out all of the requested information in this form.

Duplicate issue #2964: Playback issue when switching to video player
Created: 2023-02-04T13:01:54Z
Steps to reproduce
1.Change LibreTube to an audio player.
2.Play sound
3.Click the video player button below the audio player
4.All videos in the queue are played continuously
Expected behavior
Only the current video should be played and the next video should not be played until the current video is finished
Actual behavior
The opposite of the above occurs.

  
    
    

    XRecorder_04022023_165135.mp4
    
  

  

  


LibreTube version
0.11.1 Debug və 0.11.1
Android version
Android 12 and 13🤔
Other details
But when switching to the audio player, this problem does not exist
Acknowledgements

 I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
 I have written a short but informative title.
 I will fill out all of the requested information in this form.

Closing comment (2023-02-04T13:15:14Z): Duplicate of #2800
Repository: libre-tube/LibreTube

Issue #24: add support for auto-rotation
Created: 2022-02-14T12:49:50Z

Duplicate issue #136: [FEATURE] Landscape mode support
Created: 2022-04-19T13:22:20Z
Describe the feature you'd like to see added
Interface for tablets, it is hard to use on them.
Additional context

Closing comment (2022-05-18T08:50:12Z): Dupe of #24
Repository: libre-tube/LibreTube

Issue #1698: App keeps crashing
Created: 2022-10-29T20:32:23Z
Steps to reproduce

Download 0.7.0 arm64 release
Try to open the app
App crashes

Expected behavior
App should open
Actual behavior
App crashes
LibreTube version
0.7.0
Android version
Android 13
Other details
type: crash
osVersion: google/bluejay/bluejay:13/TP1A.221005.003/2022102800:user/release-keys
package: com.github.libretube:21
process: com.github.libretube

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.github.libretube/com.github.libretube.ui.activities.MainActivity}: java.lang.NullPointerException: bottomNav.menu.findItem(it.id) must not be null
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3677)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3814)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2309)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7904)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
Caused by: java.lang.NullPointerException: bottomNav.menu.findItem(it.id) must not be null
	at com.github.libretube.ui.activities.MainActivity.onCreate(MainActivity.kt:464)
	at android.app.Activity.performCreate(Activity.java:8341)
	at android.app.Activity.performCreate(Activity.java:8320)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1389)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3658)
	... 12 more


Acknowledgements

 I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
 I have written a short but informative title.
 I will fill out all of the requested information in this form.

Duplicate issue #1736: Crash
Created: 2022-11-03T11:12:20Z
Steps to reproduce
The application cycling crashing after the update (this is the second such update), it is solved by erasing all data. this is probably related to the bar items (after all, everyone disables an unnecessary section "home" is it true?)
Expected behavior
?
Actual behavior
Crash
LibreTube version
0.7.0
Android version
android 12
Other details
No response
Acknowledgements

 I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
 I have written a short but informative title.
 I will fill out all of the requested information in this form.

Closing comment (2022-11-03T11:47:26Z): Dupe of #1698
Repository: libredirect/browser_extension

Issue #446: Add support for ImGinn, an Instagram frontend
Created: 2022-09-16T14:08:35Z
https://imginn.com
(I found a few other services with the same name, but this website has been around the longest so I assume it's the original)
So far I've been using ImgInn by The URL exactly follows Instagram's pattern, unlike Bibliogram which adds a /u when dealing with profiles. I don't want to have to keep deleting the /u though.

Duplicate issue #927: Proxigram doesn't work.
Created: 2024-05-18T17:29:47Z
None of the 'public' instances of Proxigram (Insta frontend) work anymore.
My Solution: Now that Imginn is an alternative, use it. Since the url structure is a little different, it needs a little configuration from the coding side.
Request: Kindly add this

Closing comment (2024-05-18T18:13:06Z): Duplicate of #446
Repository: libredirect/browser_extension

Issue #687: Extension stops working after deleting folder
Created: 2023-04-30T01:11:03Z
I tried installing Libredirect to the Brave browser on macOS. I following the given instructions:

Download the latest zip file libredirect-2.5.4.zip
Unzip it with Auto detect subfolder
Go to Extension Manager, and enable developer mode
Click Load unpacked. Select and open libredirect-2.5.4/src/

There's no Auto detect subfolder option on macOS, but I don't think this matters.
Once I delete the folder that I extracted, the extension stops working. Is there any way to have the extension stored with the browser itself? It's not optimal to keep a folder lying around in my Downloads just to use an extension.

Duplicate issue #741: LibRedirect disappearing from Brave
Created: 2023-06-14T13:47:41Z
Running on MacOS Ventura 13.4 on Apple Silicon. I'm pretty sure the issue is not in the extension itself, but I feel luckier asking here than to Brave support.
I noticed that twice already libredirect stopped working and that the extension is actually not installed anymore. I've been using it for months without issue. I find out it's not there whenever I open some Twitter or Reddit link to find it opens the regular site.
Did this happen to anybody? Clues for debugging it? I'm quite annoyed at this. Is it possible Brave is blacklisting something?

Closing comment (2023-06-14T14:53:44Z): Duplicate of #687 (comment)
Repository: libredirect/browser_extension

Issue #499: Don't re-enable all redirects on Updates
Created: 2022-10-21T10:41:57Z
Sometimes, the LibRedirect Alternatives get all re-enabled again. My guess is this happens when the Add-On updates. This is undesirable behavior.
Using Firefox for Linux Mint:

Duplicate issue #500: Settings get reset on extension update
Created: 2022-10-21T20:13:57Z
Whenever the LibRedirect extension is updated on Firefox, all my settings are erased. Sites I have disabled become enabled, and I have to manually check and fix the settings for each site.
I'm using Firefox 106.0.1.

Closing comment (2022-10-22T09:02:34Z): This issue is a duplicate of #499.
Repository: libredirect/browser_extension

Issue #382: IDEA - non-200 instances should be declared as offline and switched to online one
Created: 2022-07-11T17:59:36Z
Hello,
I really love the "Auto-redirect offline instances to online ones" feature, which auto-switch the instance if the instance is offline. Sadly it just works when the server is really offline, sites like https://libreddit.notyourcomputer.net/ having a 404 error, doesn't get switched.
My idea is, if a instance is online, the HTTP Statuscode is 200. Else it would be moved or offline, so you could make a statuscode check, if it's not 200, then it counts as offline. This also helps for parked domains like https://libreddit.awesomehub.io

Duplicate issue #793: Automatically switch instance when chosen instance returns error
Created: 2023-08-03T09:29:24Z
with Reddit doing some insane API stuff and scraping mitigations or something, the Error 429 "Too Many Requests" is a common sight when using LibRedirect.
Would it make sense to implement something in the extension that would detect this and automatically attempt to find a new instance?
Make it try a few times, but eventually stop in case that all enabled instances are rate limited.

Closing comment (2023-09-01T12:41:35Z): Just redirecting when it fails would not be good enought. That may try the same instance multiple times. Or constantly loop if you are not connected to the internet.
There would need to be a system that checks & stores the health of the instances and then uses that to decide which instance to switch to. That should be implemented carefully though to not reduce privacy.
The detection could also be simpler by having a "mark as dead" button that excludes the instance for a while.
(a bit related to #382)
Repository: libredirect/browser_extension

Issue #474: Option to remove the context menu item
Created: 2022-10-10T06:00:10Z
Great if it was possible to remove "Toggle redirects in this tab" for those that enjoy a decluttered context menu.
Same thing with the "LibRedirect" option on the Firefox search engine list. As hiding or removing it is temporary even if you do not use LibRedirect for web search.

Duplicate issue #509: Option to hide "Toggle redirects in this tab" context menu item
Created: 2022-10-26T12:06:08Z
Would like to request this as a feature. Thanks.

Closing comment (2022-10-26T13:49:56Z): Duplicate of #474
Repository: libredirect/browser_extension

Issue #875: [Request] Add support for subdirectory
Created: 2023-12-18T15:52:12Z
It would be nice if support for instances hosted under the 1st subpath gets implemented
Example:
reddit.com/$uri -> my-instance.com/rdt/$uri

Duplicate issue #889: Add instance will delete path in url, causing wrong redirection.
Created: 2024-01-25T20:49:34Z
Libredirect 2.8.1
Firefox 121.0
bilibili
reproduce:

add instance https://moeyy.cn/mikuinvidious/
reports error

what happen here:
it just add https://moeyy.cn/ not https://moeyy.cn/mikuinvidious/
which caused error.
So link like https://www.bilibili.com/video/av2 should be redirect to https://moeyy.cn/mikuinvidious/video/av2 not https://moeyy.cn/video/av2
besides, https://mikuinv-gs.vern.cc/ seems to be no long supported

Closing comment (2024-01-28T12:35:26Z): This is intentional. It may become to a feature though to support paths.
Duplicate of #875
Repository: libredirect/browser_extension

Issue #614: Instance addition/change for non-cloudflare official kavin.rocks
Created: 2023-02-03T04:20:30Z
Change one instance of https://piped.video/ cloudflare -> piped.video libre non CDN version.

Current (double listed) piped.video instances of are both tagged cloudflare in libredirect, however Piped has a claimed non-cloudflare version of kavin.rocks here. https://pipedapi-libre.kavin.rocks/ https://github.com/TeamPiped/Piped/wiki/Instances
I have already favorited this instance myself, but think this should be natively implemented within the instance lists for PSA and security.

Duplicate issue #652: Two "piped.video" instances
Created: 2023-03-07T11:21:57Z
The instance list has two occurrences of this URL. The first one works. The 2nd one, which is at the bottom, doesn't.
Edit: by "works", I mean that if you try to add it to your favourite instances, it doesn't work. Clicking on the plus sign next to the 2nd instance doesn't do anything at all. Trying to add the 1st one works.

Closing comment (2023-03-07T13:36:24Z): duplicate of: #614
Repository: libredirect/browser_extension

Issue #996: extra slash forced on custom instances
Created: 2024-09-14T20:40:03Z
on Firefox, libredirect 3.0.0
I added a custom invidious instance, and was trying to use it, when I noticed that I kept getting redirected to the homepage. I did a little digging with inspect, and it seems that I was getting a 302 because of the double slashes. The non-custom instances don't have that slash. I didn't find anything about similar issues in the issue trackers, and custom instances I added previously didn't have the extra slash.
Reproduction steps:

Go to libredirect Youtube settings, copy one of the default instances, paste it into the "custom" box, and hit plus
Remove any other favorite, so it has to use the custom instance
Go to https://www.youtube.com/youtube, and witness how it won't go to YouTube's channel, but instead the homepage (you can also try with any other channel or video link)

Duplicate issue #1000: Invidious redirects to main page
Created: 2024-09-22T09:52:30Z
Steps to reproduce the bug:

Install LibRedirect.
Set up a custom Invidious instance (e.g., https://yewtu.be).
Try to open https://www.youtube.com/watch?v=dQw4w9WgXcQ in the browser.
Instead of opening the video, it redirects to the home page.

This bug appeared in version 3.0.0 (everything worked in version 2.9.1 and below)

Closing comment (2024-09-22T11:12:14Z): Duplicate of #996
Repository: libredirect/browser_extension

Issue #996: extra slash forced on custom instances
Created: 2024-09-14T20:40:03Z
on Firefox, libredirect 3.0.0
I added a custom invidious instance, and was trying to use it, when I noticed that I kept getting redirected to the homepage. I did a little digging with inspect, and it seems that I was getting a 302 because of the double slashes. The non-custom instances don't have that slash. I didn't find anything about similar issues in the issue trackers, and custom instances I added previously didn't have the extra slash.
Reproduction steps:

Go to libredirect Youtube settings, copy one of the default instances, paste it into the "custom" box, and hit plus
Remove any other favorite, so it has to use the custom instance
Go to https://www.youtube.com/youtube, and witness how it won't go to YouTube's channel, but instead the homepage (you can also try with any other channel or video link)

Duplicate issue #999: Unwanted forward slash being added to custom Redlib URLs
Created: 2024-09-20T21:22:15Z
Steps to reproduce:

Go to Settings > Services.
Select Service > Reddit.
Under "Add your favorite instances", type exactly "https://lr.eu.psf.lt".

What I wanted to happen:
"https://lr.eu.psf.lt" [with no terminal slash] gets added to the list of selected instances
What LibRedirect did:
"https://lr.eu.psf.lt/" [with a terminal slash that I did not type] got added instead, as shown:

The knock-on effect:
Redirects go to pages with a double slash, e.g. "https://lr.eu.psf.lt//" for the frontpage; this is incorrect and breaks some other services, like Invidious

Closing comment (2024-09-20T21:57:36Z): Duplicate of #996
I will release soon.
Repository: libredirect/browser_extension

Issue #630: [Request] Add Gothub as Github alternative
Created: 2023-02-13T20:39:16Z
Hey, this extension is very awesome and i love using it - showed me many alternatives i didnt even know existed
such as LibreX, which also showed me more. under those is Gothub as a Github frontend
i think adding a gothub option would be very cool and useful
thank you!

Duplicate issue #638: [Suggestion] Add gothub
Created: 2023-02-23T16:35:51Z
Basically the title
Its an "Alternative front-end for GitHub written with Go."
Here is their repo
https://codeberg.org/gothub/gothub

Closing comment (2023-02-23T18:59:14Z): We already added it, wait for the next release :)
Duplicate of: #630

Cool, srry for the issue then and thank you for making this
Repository: libsdl-org/SDL

Issue #10146: MacOS raw mouse input
Created: 2024-06-29T16:00:04Z
I’m completely unfamiliar with MacOS and SDL’s support goals for it, but more recent versions of MacOS has GCMouseInput that provides raw deltas instead of accelerated motion. Does SDL use this? From what I could see it still handles regular cocoa events, no?
I think by default MacOS should use the GCMouseInput API, and only handle accelerated delta if SDL_MOUSE_RELATIVE_SYSTEM_SCALE is enabled.
And tangentially MacOS implementations should also be aware of the SDL_MOUSE_RELATIVE_MODE_CENTER hint.

Duplicate issue #12759: SDL3: SDL_GetKeyboards/SDL_GetMice always return a single device on macOS
Created: 2025-04-06T15:31:07Z
SDL_GetKeyboards/SDL_GetMice always return a singe device without any name, no matter how many are connected.
Meaning that listening to multiple keyboards/mice seems impossible.
Tested on macOS sequoia (latest)

Closing comment (2025-04-07T17:44:07Z): Yes, this is a duplicate of #10146, and will work when that's fixed.
Repository: libsdl-org/SDL

Issue #7982: Memory leak while setting Desktop display mode (Windows)
Created: 2023-07-14T12:05:56Z
In Windows 10, WIN_AddDisplays() seems to be called twice.
Additonally, in WIN_GetDisplayMode() there is a memory allocation:
data = (SDL_DisplayModeData *)SDL_malloc(sizeof(*data));
The second WIN_AddDisplays() call cause to override the first allocation causing the leak (220 bytes per each monitor you have and each time you call to init and quit the video system).
I dont know why this function is called twice (it could be on purpose or another bug that should be fixed) so, I have a patch that only avoid this memory leak modifying the SDL_SetDesktopDisplayMode() function.
WIN_AddDisplay() addressed a similar memory leak calling to SDL_ResetFullscreenDisplayModes() but nothing is done with the desktop mode.
It could not be the cleanest way of removing the memory leak but it was I am using on my project.
I have a patch here: main...RPP-dev:SDL:main
Before creating the pull request I would like to know your opinion on this fix.
Thanks
Regards

Duplicate issue #8189: windows: tests leak display related memory
Created: 2023-09-01T22:40:02Z
Using #8144, the tests leak a display related allocation.
> testviewport --trackmem
INFO: Current Viewport x=0 y=0 w=100 h=100
INFO: Current Viewport x=100 y=100 w=150 h=150
INFO: Current Viewport x=200 y=200 w=200 h=200
INFO: 0.97 frames per second
INFO: Memory allocations:
Allocation 0: 26 bytes
        0x7ff850a0a465: SDL_malloc_REAL+0x25
        0x7ff850b3aead: WIN_GetDisplayMode+0x5d
        0x7ff850b3b3c1: WIN_AddDisplay+0x91
        0x7ff850b3b8b3: WIN_AddDisplaysCallback+0xb3
        0x7ff8e2b589c8: SystemParametersInfoForDpi+0xc8
        0x7ff8e3890e94: KiUserCallbackDispatcher+0x24
        0x7ff8e1631984: NtUserEnumDisplayMonitors+0x14
        0x7ff850b3b909: WIN_AddDisplays+0x39
        0x7ff850b3a323: WIN_InitModes+0x13
        0x7ff850b40d4e: WIN_VideoInit+0x2e
        0x7ff850ad4bd7: SDL_VideoInit+0x357
        0x7ff8509073a7: SDL_InitSubSystem_REAL+0x157
        0x7ff85092fa72: SDL_InitSubSystem+0x12
        0x7ff6f6184b57: SDLTest_CommonInit+0x107
        0x7ff6f6181b93: SDL_main+0x103
        0x7ff850b242eb: SDL_RunApp_REAL+0x1bb
        0x7ff850938335: SDL_RunApp_DEFAULT+0x35
        0x7ff850931490: SDL_RunApp+0x30
        0x7ff6f6181e50: main+0x20
        0x7ff6f6190fa9: invoke_main+0x39
        0x7ff6f6190e4e: __scrt_common_main_seh+0x12e
        0x7ff6f6190d0e: __scrt_common_main+0xe
        0x7ff6f619103e: mainCRTStartup+0xe
        0x7ff8e33a7614: BaseThreadInitThunk+0x14
        0x7ff8e38426b1: RtlUserThreadStart+0x21
Total: 0.03 Kb in 1 allocations

(The stack frame is identical for other tests)

Closing comment (2023-11-08T08:49:51Z): I think this is a duplicate of #7982, can you debug and see why WIN_AddDisplays() is getting called twice for the same monitor in your case?
Repository: libsdl-org/SDL

Issue #9917: Trouble with X11_SetWindowMouseGrab()
Created: 2024-05-28T21:48:21Z
I updated my SDL submodule today and started getting a freeze when calling SDL_SetRelativeMouseMode() on x11/vulkan.  I use this for mouselook while right mouse is held.  Since it is an input thing I debugged it via prints like a savage.
That's when I noticed the stall was 5 seconds, and if the full stall duration is reached, relative mode behaved normally again.
I eventually tracked it down to the loop in X11_SetWindowMouseGrab() line 1844.  For me the X11_XGrabPointer() call always returns AlreadyGrabbed when in this stall.  I stuck a print in X11_CaptureMouse() to see if that might have been grabbing the mouse, but the print never hits.
I noticed there's 2 ungrabs on program start, then one more once I get rendering going, but I don't see any grabs from within SDL happening that would cause X11 to think the pointer is already grabbed.
Once broken_pointer_grab is set everything seems to normally work.  I don't see any odd behaviour.  I could just set that to true manually and work around this, but curious if this is a bug or I'm doing something wrong elsewhere?
I'm using arch with LXQt and Openbox as my window manager.
I wish I knew X11 enough to write a program to test X11_XGrabPointer() in the simplest possible way (to see if it is a bug in LXQt or something) but I've never used X11 directly.
Any ideas?

Duplicate issue #10014: `SDL_SetRelativeMouseMode` in `SDL_EVENT_MOUSE_BUTTON_DOWN` blocks until the button is released
Created: 2024-06-12T20:26:40Z
1 is printed on left click, 2 is printed only release.
Platform: Fedora, X11
MRE:
#include <SDL3/SDL.h>
#include <stdio.h>

int main(int argc, char** argv) {
  SDL_Init(SDL_INIT_VIDEO);
  SDL_Window* mainWindow = SDL_CreateWindow("Main", 800, 600, 0);
  SDL_Event e;
  int quit = 0;
  while(!quit) {
    while(SDL_PollEvent(&e)) {
      switch (e.type) {
        case SDL_EVENT_QUIT:
          quit = 1;
          break;
        case SDL_EVENT_MOUSE_BUTTON_DOWN:
          if (e.button.button == 1) {
            printf("1\n");
            SDL_SetRelativeMouseMode(SDL_TRUE);
            printf("2\n");
          }
          break;
      }
    }
  }
  SDL_DestroyWindow(mainWindow);
  SDL_Quit();
  return 0;
}

Closing comment (2024-06-13T16:33:26Z): This sound similar to #9917
What is happening is that something else has already grabbed the mouse (XInput2 does this on button presses), resulting in XPointerGrab returning AlreadyGrabbed, which causes the backend to loop for 5 seconds while attempting to grab the mouse, until it times out.
Issuing an XUngrabPointer request before trying to grab the mouse for capturing purposes should fix this.
Repository: libsdl-org/SDL

Issue #4732: [macOS] SDL2-2.0.14 sends two SDL_CONTROLLERDEVICEADDED events when my Xbox One X controller is attached
Created: 2021-09-08T18:23:09Z
A simple SDL2 program that calls SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER), and waits for SDL_CONTROLLERDEVICEADDED events to arrive, receives two events when my Xbox One X controller is attached. They have distinct SDL_JoystickGUID and SDL_JoystickID values and their names are:
"Xbox One S Controller"
"Xbox Wireless Controller"
If I connect both of them, I see double SDL_JOYBUTTONDOWN / SDL_JOYBUTTONUP and SDL_JOYAXISMOTION events. For the controller that's called "Xbox Wireless Controller", the actual SDL_GameControllerButton values are incorrect. They are correct for the "Xbox One S Controller" controller.
Note, if I change the program to use SDL_Init(SDL_INIT_GAMECONTROLLER), this double connection doesn't happen and the correct controller is identified.

Duplicate issue #4734: [Linux] Xbox wireless controller detection
Created: 2021-09-09T05:54:13Z
Hello
I use a Xbox one controller on Ubuntu mate 21.04 x64 via bluetooth.
Since sdl 2.0.9 i have issue with the controller name detection.
It will break my Retropie config.
Becsuse Emulatorstaion and Retroarch detect 2 different controller names.
First detect as "Xbox One S Controller"  second as "Xbox Wireless"
Here a output from sdl2-jstest with SDL2.0.16
 Joystick Name:     'Xbox One S Controller'
Joystick GUID:     050000005e040000fd02000003090000
Joystick Number:    0
Number of Axes:     6
Number of Buttons: 17
Number of Hats:     1
Number of Balls:    0
GameControllerConfig:
  Name:    'Xbox One Wireless Controller'
  Mapping: '050000005e040000fd02000003090000,Xbox One Wireless Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,'

a dev by retropie thought it was related with HIDAPI drivers.
But i have compiled latest SDL with --disable-api
Still same problem.
You can find issue here.
RetroPie/RetroPie-Setup#3398
Maybe anyone had an idea?

Closing comment (2021-11-25T19:09:18Z): This does not sound like an SDL bug about detecting two controllers, so not the same as #4732. It's probably rather due to intentional changes in SDL2.
The problem described in RetroPie/RetroPie-Setup#3398 seems to be rather about one part of the RetroPie system using udev device names (or similar), while other parts of the combined system uses SDL names - which in the latest SDL versions are cleanup by the SDL_CreateJoystickName function and therefore does no longer always match.
(I got similar bug reports from FS-UAE users where the device names changed when upgrading to newer FS-UAE versions with newer SDL2 library).
Repository: libsdl-org/SDL

Issue #6089: SDL 2.24.0 fails to build on macOS < 10.14
Created: 2022-08-20T06:22:53Z
The failing compile command and error are:
libtool: compile:  /usr/bin/clang -pipe -Os -arch x86_64 -I/opt/local/include -DUSING_GENERATED_CONFIG_H -Iinclude -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_libsdl2/libsdl2/work/SDL2-2.24.0/include -idirafter /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_libsdl2/libsdl2/work/SDL2-2.24.0/src/video/khronos -DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=24 -DSDL_BUILD_MICRO_VERSION=0 -mmmx -m3dnow -msse -msse2 -msse3 -Wall -fno-strict-aliasing -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fobjc-arc -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-statement -DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11 -D_THREAD_SAFE -MMD -MT build/SDL_cocoashape.lo -c /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_libsdl2/libsdl2/work/SDL2-2.24.0/src/video/cocoa/SDL_cocoashape.m  -fno-common -DPIC -o build/.libs/SDL_cocoashape.o

In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_libsdl2/libsdl2/work/SDL2-2.24.0/src/video/cocoa/SDL_cocoashape.m:27:
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_libsdl2/libsdl2/work/SDL2-2.24.0/src/video/cocoa/SDL_cocoashape.h:33:24: error: ARC forbids Objective-C objects in struct
    NSGraphicsContext* context;
                       ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_libsdl2/libsdl2/work/SDL2-2.24.0/src/video/cocoa/SDL_cocoashape.m:61:13: error: ARC forbids Objective-C objects in struct
    NSView* view;
            ^

Full build output for 10.13 is available here: https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/160213/steps/install-port/logs/stdio

Duplicate issue #8979: SDL 2.30.0 fails to build on macOS < 11
Created: 2024-02-03T01:02:59Z
On 10.15 the build fails with this error:
/path/to/libsdl2/work/SDL2-2.30.0/src/joystick/iphoneos/SDL_mfijoystick.m:1140:84: error: property 'physicalInputProfile' not found on object of type 'GCController *'
            NSDictionary<NSString *, GCControllerElement *> *elements = controller.physicalInputProfile.elements;
                                                                                   ^

Full log available if needed at https://build.macports.org/builders/ports-10.15_x86_64-builder/builds/171348/steps/install-port/logs/stdio

Closing comment (2024-02-03T01:08:39Z): Strangely the build succeeded on 10.14 but not older versions. On 10.13, the problem is this, which is similar to #6089:
/path/to/libsdl2/work/SDL2-2.30.0/src/video/cocoa/.././khronos/vulkan/vulkan_metal.h:37:37: error: ARC forbids Objective-C objects in struct
    const CAMetalLayer*             pLayer;
                                    ^

https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/220351/steps/install-port/logs/stdio
Repository: libsdl-org/SDL

Issue #5685: Right-Alt key issue on non-english Windows systems
Created: 2022-05-18T23:11:51Z
I'm not sure if this is already known, but applications which use SDL for keyboard inputs on non-english Windows systems, cannot properly handle the Right-Alt key and recognise it as the key combination Left-Ctrl + Right-Alt.
The reason for this, is that the Ctrl-Alt key on a US keyboard sends the same scancode as the Right-Alt (AltGr) key on non-english systems.
I've observed this for the first time in DOSBox-X and mentioned it here:
joncampbell123/dosbox-x#915
some further investigations shows, that DOSBox + forks and other applications like RetroArch for example share the same problem.
Is there a chance for a fix?

Duplicate issue #9201: AltGr generates LCtrl + RAlt on Windows with Spanish layout
Created: 2024-03-05T16:36:11Z
when pressing AltGr, my Windows generates two key events, LCtrl and RAlt

I think SDL should generate only RAlt. What do you think?
More information about the issue: Genymobile/scrcpy#4725 (comment)

Closing comment (2024-05-23T16:50:29Z): Duplicate of #5685
Repository: libsdl-org/SDL

Issue #4918: macOS 12 Monterey - odd/broken OpenGL VSync behavior
Created: 2021-11-07T16:19:41Z
As of macOS 12 Monterey VSync when using OpenGL behaves differently on different machines or just outright fails.
M1 Mac Mini - VSync gets 2x the monitor's refresh rate. (tested at 60hz, 120hz, 144hz)
M1 MacBook Air - Same as above.
Intel MacBook Pro 2017 - VSync (silently) fails completely unlocking the FPS.
M1 Max MacBook Pro 2021 - VSync works as expected on internal monitor. I can't test an external due to it being reported by a user of my software.
Here is a cpp file that demonstrates the failure:
monterey vsync failure.zip
However, I have downloaded and tested the GLEssentials example from these old Apple OpenGL examples and it does not seem to exhibit this behavior:
https://github.com/lmdsp/samples_apple_gl
--
I do not believe this is an issue with SDL specifically as I have also observed it in GLFW so it may be a Monterey issue all together (it is clear something changed on Apple's end). I have reported the issue to Apple in the beta feedback app, but I believe this is worth reporting here as well in case there is a workaround.

Duplicate issue #6282: SDL_PollEvent vs SDL_WaitEvent in macos is problem
Created: 2022-09-26T05:25:01Z
SDL_PollEvent's CPU usage is normal in linux and windows but it is %80-90 in macos .
SDL_WaitEvent's CPU usage is normal in macos but it is ugly in linux and windows. what is problem?

Closing comment (2022-11-14T18:39:30Z): This is caused by vsync being broken on the latest macOS, and is a duplicate of #4918.
Repository: libuv/libuv

Issue #2351: linux: `uv_cpu_info()` online/offline CPU race
Created: 2019-06-25T07:45:26Z
uv_cpu_info() on Linux:


First consults /proc/stat to get the number of online CPUs, then


Reads the CPU info from /proc/cpuinfo, then


Reads idle/irq/nice/user/sys from /proc/stat


There is a time window between (1) and (2) and (2) and (3) where a CPU could come online or go offline.
Libuv should handle that, probably by:


Meticulously checking if the number of observed CPU entries in (2) and (3) matches the expected number of CPUs, and


Restart from (1) if that isn't the case.

Duplicate issue #3498: linux: uv_cpu_info may abort when cpu offline during the procedure
Created: 2022-02-28T02:48:11Z
Version: 1.43.0
Platform: Linux my-localmachine 4.9.151.x86_64 #1 SMP Tue Mar 12 19:10:26 CST 2019 x86_64 x86_64 x86_64 GNU/Linux

uv_cpu_info read /proc/stat twice, first reading the CPU count, then rewind in the read_times and read the detailed stats. This may be a problem when any of the CPU core is offline between those two reads: read_times asserts that it read the same number of CPU before the rewind.
Expected behavior: uv_cpu_info should not abort when any of the CPU cores go offline.

Closing comment (2022-03-01T02:05:09Z): Duplicate of #2351
Repository: libuv/libuv

Issue #2183: zos,ci: threadpool_multiple_event_loops fails frequently
Created: 2019-02-10T16:53:24Z
Example:
not ok 288 - threadpool_multiple_event_loops
# timeout
# Output from process `threadpool_multiple_event_loops`:
# CEE5205S The signal SIGTERM was received.

Some non-scientific statistics suggest it fails more often than it passes.
cc @libuv/zos

Duplicate issue #2196: x/os failures
Created: 2019-02-20T20:26:34Z
Version: 1.x
Platform:z/OS

Probably should have opened this in this repo, but at least so people know we are working on it:
nodejs/build#1685

Closing comment (2019-02-20T20:33:10Z): Duplicate of #2183.
Repository: libuv/libuv

Issue #2351: linux: `uv_cpu_info()` online/offline CPU race
Created: 2019-06-25T07:45:26Z
uv_cpu_info() on Linux:


First consults /proc/stat to get the number of online CPUs, then


Reads the CPU info from /proc/cpuinfo, then


Reads idle/irq/nice/user/sys from /proc/stat


There is a time window between (1) and (2) and (2) and (3) where a CPU could come online or go offline.
Libuv should handle that, probably by:


Meticulously checking if the number of observed CPU entries in (2) and (3) matches the expected number of CPUs, and


Restart from (1) if that isn't the case.

Duplicate issue #3858: uv_cpu_info reads /proc/stat multiple times
Created: 2022-12-14T16:28:49Z
We are facing an issue with LXC/LXD, which results in /proc/stat randomly returning an incorrect number of CPUs (we are in contact with the developers of LXC to fix this issue) - i.e. /proc/stat usually lists all 28 cores, but sometimes only lists 4.
This causes an issue in uv_cpu_info: /proc/stat is read multiple times and libuv sensibly expects the CPU count of both reads to match. https://github.com/libuv/libuv/blob/master/src/unix/linux-core.c#L590
Sadly this issue is frequent enough that even reads in quick succession can differ, causing the npm build to fail:
[ERROR] Stderr: 'node: ../deps/uv/src/unix/linux-core.c:615: read_times: Assertion `num == numcpus' failed.
Is there a reason that /proc/stat is read multiple times? If not, we would be willing to contribute a PR that changes uv_cpu_info to only read /proc/stat once. It would be fine for us if uv_cpu_info reads the "wrong" /cpu/stat, as long as the assertion does not fail.

Platform: Linux

Closing comment (2022-12-14T17:18:16Z): Duplicate of #2351
Repository: libuv/libuv

Issue #1545: Building in Windows VS2017, calling vcvarsall.bat will change working directory.
Created: 2017-09-13T16:51:44Z
Version: v1.13.0
Platform: Windows x64, Visual Studio 2017

The default architecture in a Visual Studio 2017 Developer Command Prompt is x86.  When you want to build libuv for x64, the vcbuild.bat script calls vcvarsall.bat to change the architecture.  However, vcvarsall.bat changes the current working directory to whatever is set in VSCMD_START_DIR.
The workaround is to set up the environment correctly before calling vcbuild.bat.

Duplicate issue #1513: Can't open file gyp_uv.py
Created: 2017-08-31T05:29:21Z
I am using Windows 10 x64 with VS2017 and I have compiled x86, so I copied the libuv.lib, delete the folder, and clone again. When I tried to compile for x64, I got this error:
$ ./vcbuild.bat vs2017 x64
Looking for Visual Studio 2017
calling: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64

** Visual Studio 2017 Developer Command Prompt v15.0.26730.12
** Copyright (c) 2017 Microsoft Corporation

[vcvarsall.bat] Environment initialized for: 'x64'
Found MSVS version 15.0
C:\Python27\python.exe: can't open file 'gyp_uv.py': [Errno 2] No such file or directory
Failed to create vc project files.
I dont know why it happens, I have tried a lot to figure out, but I am stuck. Can somebody help me?

Closing comment (2017-09-13T20:20:05Z): this might be a duplicate of #1545, which has a proposed solution in #1546
Repository: libuv/libuv

Issue #3129: sendmmsg usage could drop UDPs unnecessarily
Created: 2021-03-04T10:23:27Z
I'm not sure how much this can happen in practice, but handling of the count returned from sendmmsg() syscall seems not ideal.  Notably:

If only some of the packets were sent, the code acts as if all were sent (npkts is only tested for negative values).  Ideally it should call again on the remaining packets.  Some error happened in that case, but the sendmmsg() API doesn't provide it.
If no packets were sent, I'd consider failing just the first packet and retrying with the rest.  For some of the return codes at least:

EAGAIN etc. seem already handled;
I can imagine some specific return codes causing immediate failure for the whole batch, though I'm not sure it's worth writing a special case.



Yes, sendmmsg() API is cumbersome.

Duplicate issue #3249: Potential bug in `uv__udp_sendmmsg`
Created: 2021-07-23T09:12:23Z
Version: master
Platform: Ubuntu

I was looking into the error handling and guarantees given by libuv with regards to UDP and came across what I think might be a bug while reading through the code.
The udp handle eventually reaches here where it makes the sendmmsg syscall. It returns the number of packets that were successfully queued, but the return value doesn't seem to be handled appropriately.
Say I'm trying to send 10 packets and the send buffer has room for only 5. npkts would be 5, it skips the if block here. It then removes all 10 packets from the request queue here instead of only the 5 that were successfully sent. Maybe the author meant to write npkts instead of pkts there?
Something very similar seems to be happening here as well where nothing has actually been sent, yet packets are getting popped off the queue. Though this one might actually be fine as it seems to be draining the queue on (non-recoverable?) errors only.
Are these bugs, the first one especially? Or am I just misunderstanding what's actually happening?

Closing comment (2021-07-23T09:22:28Z): Duplicate of #3129. And yes, I think it's a bug.
Repository: libuv/libuv

Issue #2062: libuv tty reopening interferes with native fork/exec
Created: 2018-10-31T22:22:03Z
Version: 1.20.3
Platform: Linux (also applies to other unix-like OS)

After libuv tty code touches the stdin/stdout/stderr streams, it reopens them with the FD_CLOEXEC flag. Any further attempts to spawn child processes using the native unix fork/exec mechanism will result with the children having the standard FD's closed. The application will need to use uv_spawn to have these FD's retained in child processes.
Minimal repro case:
#include <uv.h>
#include <stdlib.h>

int main(int ac, char ** av)
{
        uv_loop_t loop;
        uv_tty_t fd1;
        uv_loop_init(&loop);
        uv_tty_init(&loop, &fd1, 1, 0);
        system("echo this should appear on stdout");
        return 0;
}

This causes a real-world bug in Electron (electron/electron#14246, electron/electron#12937) where the chromium code is linked together with libuv in node.js. Chromium is unaware of libuv and attempts to natively spawn a gpu worker subprocess, which starts with fds 0-2 closed. These free fds are assigned for other purposes, and on some platforms the OpenGL blindly prints some warning messages to fd 2, messing up the state of the application.

Duplicate issue #3495: Documentation: TTY handles must be open to call `uv_tty_reset_mode()`
Created: 2022-02-25T19:12:08Z
Version: 1.43.0
Platform: Darwin Kernel Version 20.6.0: Wed Jan 12 22:22:42 PST 2022; root:xnu-7195.141.19~2/RELEASE_X86_64 x86_64

I'm working in Lua (using luvit/luv), but since the functions involved are pretty much direct wrappers of LibUV functions I'm pretty sure this would be the same in raw C.
The minimal (Lua) reproduction is:
uv = require "luv"
local stdin = uv.new_tty(0, true)
uv.tty_set_mode(stdin, 1)
stdin:close()
uv.tty_reset_mode()
If you run this, you will find that your terminal is still in raw mode—uv_tty_reset_mode() basically didn't do anything.
Honestly, I don't find this behavior unreasonable—it makes a certain amount of sense that if you close the handle, UV forgets about the TTY entirely, so how is it supposed to talk to it to reset it? But it seems like it deserves a mention in the documentation for uv_tty_reset_mode().

Closing comment (2022-02-25T20:18:41Z): Hm, I don't precisely see how that happens from the code. It looks like uv_tty_reset_mode should work even after the handle it came from is closed.
Though semi-related to #2062 (tl;dr: you do not want to open 0/1/2 as libuv handles, as their state may get corrupted later or they may corrupt other parts of the process expectations)
Repository: libuv/libuv

Issue #2062: libuv tty reopening interferes with native fork/exec
Created: 2018-10-31T22:22:03Z
Version: 1.20.3
Platform: Linux (also applies to other unix-like OS)

After libuv tty code touches the stdin/stdout/stderr streams, it reopens them with the FD_CLOEXEC flag. Any further attempts to spawn child processes using the native unix fork/exec mechanism will result with the children having the standard FD's closed. The application will need to use uv_spawn to have these FD's retained in child processes.
Minimal repro case:
#include <uv.h>
#include <stdlib.h>

int main(int ac, char ** av)
{
        uv_loop_t loop;
        uv_tty_t fd1;
        uv_loop_init(&loop);
        uv_tty_init(&loop, &fd1, 1, 0);
        system("echo this should appear on stdout");
        return 0;
}

This causes a real-world bug in Electron (electron/electron#14246, electron/electron#12937) where the chromium code is linked together with libuv in node.js. Chromium is unaware of libuv and attempts to natively spawn a gpu worker subprocess, which starts with fds 0-2 closed. These free fds are assigned for other purposes, and on some platforms the OpenGL blindly prints some warning messages to fd 2, messing up the state of the application.

Duplicate issue #3602: Use MSG_DONTWAIT (instead of O_NONBLOCK) for tty fds?
Created: 2022-04-23T09:47:49Z
Refs: nodejs/node#42826
Libuv dups fds 0-2 when they refer to a tty because setting O_NONBLOCK affects other processes it shares those file descriptors with.
The logic is pretty hairy (is this a pty slave? is this... etc.) Maybe we can sidestep that completely by switching to sendmsg() and recvmsg() with the MSG_DONTWAIT flag.

Closing comment (2022-04-23T13:13:38Z): Duplicate of #2062