-
Notifications
You must be signed in to change notification settings - Fork 788
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
Panics when handling presences #1506
Comments
You can try I'm new to Discordgo but I also have this problem, but this works for me. |
@sentinelb51 Forgot to mention :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems that anything to do with Presences causes a segmentation fault within the library itself. For example, in state.go, presenceAdd has been throwing panics for me:
![image](https://private-user-images.githubusercontent.com/75678325/310257298-74d848b9-01b3-4434-86bb-a2f2c90388b2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI0NDA5NzAsIm5iZiI6MTcyMjQ0MDY3MCwicGF0aCI6Ii83NTY3ODMyNS8zMTAyNTcyOTgtNzRkODQ4YjktMDFiMy00NDM0LTg2YmItYTJmMmM5MDM4OGIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzMxVDE1NDQzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJlZTM3YjYxYWMxZDJiN2M3OGFmNjYxNmFlY2Y4NjNhOTVmMGZiMzc5NDE2OGNiN2JkYzgzNzA2ZTkwZjkwODkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.frGr9c7KPCddU7GaJCdKuxSgKvnofIKxCDpVIoTRvhQ)
I seemed to have fixed it by adding a simple check to see if User is not nil:
![image](https://private-user-images.githubusercontent.com/75678325/310257367-96f1edcc-7a6d-40a0-855e-ee8deb568e04.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI0NDA5NzAsIm5iZiI6MTcyMjQ0MDY3MCwicGF0aCI6Ii83NTY3ODMyNS8zMTAyNTczNjctOTZmMWVkY2MtN2E2ZC00MGEwLTg1NWUtZWU4ZGViNTY4ZTA0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzMxVDE1NDQzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY5ZTA4ZTA5MjM3ZmM2NmU1OWJiNDRjMjBmYTg4MTMyYzE5ZGJmMTZlNDBkMzlhMjI4YWY4OTIwNTRkN2E1ZjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.lbuCRzroflBGKW7KCLGyPW1t_H9Il7qDgAyyAR2vShg)
Then, another issue came up in state.go:
![image](https://private-user-images.githubusercontent.com/75678325/310257502-90fa65f9-0419-40f6-bea0-fa0699f3a4f7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI0NDA5NzAsIm5iZiI6MTcyMjQ0MDY3MCwicGF0aCI6Ii83NTY3ODMyNS8zMTAyNTc1MDItOTBmYTY1ZjktMDQxOS00MGY2LWJlYTAtZmEwNjk5ZjNhNGY3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzMxVDE1NDQzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk0NTc3ZTZmNGE5MzI1MGExOTU2ZjY4ZWU1YjI0YmJkYjk0OTg3M2I4Y2IzOTBlZDU0NmU1MTYwNDViMDk0ZjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.r5VvoY_UiU-0FhjmN74Kegg-aRRI-RtnYBtiyzWol18)
Hopefully this will fix the issue for now, but I was wondering if anyone else is having this issue. This is on the latest commit of discordgo as of this date.
![image](https://private-user-images.githubusercontent.com/75678325/310257866-bea2d6b1-0e30-4b84-9f6d-023e762a18cd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI0NDA5NzAsIm5iZiI6MTcyMjQ0MDY3MCwicGF0aCI6Ii83NTY3ODMyNS8zMTAyNTc4NjYtYmVhMmQ2YjEtMGUzMC00Yjg0LTlmNmQtMDIzZTc2MmExOGNkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzMxVDE1NDQzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA2YTRlOWQ1YjhkMjkwZWIyNjE3NmViYmRlZDg2ZTg5YmExMzVlMjEwNjc2OTIyODIzZGUyNjYzMjU2MWMwYzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.5OY4Oz_s9FpjQhI83Z6haYkfQhgvAD6aoIxorpszlkQ)
The text was updated successfully, but these errors were encountered: