-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nicotine+ 3.3.1 crash on tuple index out of range #2907
Comments
Possible regression since 67d84e5 Please can you email the problematic files with invalid headers to the email address on @mathiascode 's GitHub profile. |
e8b8a91 makes scanning actually fail. @501NotImplemented Can you try the latest unstable build? It should provide a more detailed error message. |
@mathiascode I've upgraded to 3.3.2, the issue did not reproduce for now. |
Okay, I've caught it on 3.3.2 after enabling rescan shares on the startup option. Will try the latest testing build as well. Nicotine+ Version: 3.3.2
Here's also the content of debug log file:
|
You can enable the "Search" and "Miscellaneous" debug logging catagories for more detailed information. What we know so far is that the crash is triggered at the moment the client prepares to serve an incoming search request using faulty shares data arising from an invalid Flac header. |
The files you sent are corrupted. None of them play, and one is full of null bytes.
This isn't completely right. The screenshot says there was an issue saving the database at the end of the rescan process. Due to an additional try except, the scanner didn't catch this, assumed the scan finished successfully, and enabled search request processing with invalid/previous data. The invalid files shouldn't be causing this issue, the scanner will just skip setting metadata for them. @501NotImplemented Can you try a rescan in the testing build, and see if it fails again and shows more details about the issue? |
@mathiascode I've sent you debug logs from the client Nicotine+ 3.3.3.dev1. Please check your mail. One log line that brought to my attention: |
The Open a private chat to yourself (or it can be any chat entry) and enter the command Alternatively, simply delete all the .dbn files that will result in doing the same thing. |
Unfortunately, it looks like rescanning succeeded this time, so I have no idea what caused it to fail before. Is the Uploads tab issue unrelated to this one? By silent crash, do you mean the window just closes when opening the Uploads tab?
Was this before the most recent rescan? |
What are you talking about? What part of the code? |
@mathiascode yes, that particular message was before the most recent rescan. For now - I've deleted the corrupted files from the drive.
As of this moment - I am able to browse my files again, and the Nicotine+ does not crash. But it shows 0 files and 0 folders shared for me. In User Profile and Buddy list. Does it take some time to show the correct value? I've shared the folder again and forced a rescan from private chat as @slook suggested. Still 0 files shared is shown on UI in User Profile and Buddy lis, but I see new Uploads are starting and running and I still can browse myself and see the files in the Browse Shares. UPD: After the app restart - it still shows 0, the new Uploads are active. |
I don't know, I was mistaken... nicotine-plus/pynicotine/slskmessages.py Line 424 in 8842b47
For testing purposes, you could add them again to verify that the scanner should now skip them gracefully, with a logged error about invalid metadata during the rescan? |
@501NotImplemented what is the status of this bug? Is it fixed now or are we not able to establish the exact cause? |
@slook I've put the corrupted files into a separate directory, added it to the shares and saved Nicorine configuration. I see scanning shares spinner in the app tray and it seems like the process is stuck. The Nicotine+ 3.3.3.dev1 is working for now. Restarted the app. |
Alright, if and when it does finish please report the timestamp of the "Rebuild complete: X folders found" log message to establish the number of minutes that elapsed since the "03.03.2024 16:42:01 Rebuilding shares…" message, along with any other scanning errors printed into the log.
The idea is that the application window shouldn't be interrupted by the scanner process, so please verify that it does not hang or crash, but if it is taking an inordinately long time then that might indicate some problem is happening. |
@slook the app crashed after some time of running in background. After the restart: |
How did you realise this? Did it crash silently without error message? |
@slook Yes, exactly. I've had it running in the background, went away from PC for some time, and after I returned - it wasn't running. Had to restart it manually. |
Whilst the original "tuple index out of range IndexError" caused by the bug in 3.3.1 and 3.3.2 has been fixed in 3.3.3dev1, it appears that a further mitigation is ideally required, but there is a lack of any debug logging or other details to define this, and nobody else has reported a similar crash yet. @mathiascode Suggest bump to Please continue to report any further issues with the nightly unstable development builds , at link: Closing as resolved, at least the problem that leads to the original crash will be avoided. |
@slook looks like this issue has to be reopened. Nicotine+ Version: 3.3.3.dev2 Type: <class 'IndexError'> That's the only log that is available, unfortunately. |
Could you send your .dbn files again? I don't know what else to do at this point. None of the errors make any sense, and I haven't been able to reproduce any of them. |
@mathiascode yes, please check your email. |
Closing this as sadly there is nothing actionable we can do to identify what the quirk is on the affected machine which leads to the spurious errors thrown by the Python interpreter. |
This issue isn't invalid because something useful did come out of this series of investigations, since e8b8a91 avoids a potential for corruption of the shares database in the exceptionally rare case of a fault, and the user did stumble upon an incidental bug before it was later reported in issue #2956 that was fixed in PR #2915. |
Fair enough. |
Nicotine+ Version: 3.3.1
Operating System/Distribution:
Nicotine+ Version: 3.3.1
GTK Version: 4.12.5
Python Version: 3.11.8 (win32)
OS: Windows 11 Pro
Version 23H2
OS build 22631.3155
Experience Windows Feature Experience Pack 1000.22684.1000.0
Describe the bug
Nicotine+ crashes randomly
Expected behavior
The app should not crash and continue execution.
Steps to reproduce the bug
No particular, the app crashes at some point.
From the log, it might be related to file rescan issues (see screenshot).
Type: <class 'IndexError'>
Value: tuple index out of range
Traceback: File "D:/a/nicotine-plus/nicotine-plus/pynicotine/gtkgui/application.py", line 961, in on_process_thread_events
File "D:/a/nicotine-plus/nicotine-plus/pynicotine/events.py", line 290, in process_thread_events
File "D:/a/nicotine-plus/nicotine-plus/pynicotine/events.py", line 246, in emit
File "D:/a/nicotine-plus/nicotine-plus/pynicotine/search.py", line 435, in _file_search_request_distributed
File "D:/a/nicotine-plus/nicotine-plus/pynicotine/search.py", line 688, in _process_search_request
File "D:/a/nicotine-plus/nicotine-plus/pynicotine/search.py", line 474, in _create_file_info_list
The text was updated successfully, but these errors were encountered: