Skip to content
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

Apply multiple stability fixes and release a new qTox version #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nickolay168
Copy link
Contributor

I have applied some stability fixes, here is the list from my change log:

  • Show light object to camera while speaking, the application will fail (Fixed in toxcore ETA in v. 0.2.20).
  • Fix the failure when logging is switched off and user tries to get detail for the friend.
  • SIGABRT during the attempt to delete a friend.
  • Setting NoSpam does not have an effect.

I have decided also to bump the version, to avoid issues with the same versions with different code.

@kwizart
Copy link
Member

kwizart commented Nov 29, 2024

If you are interested in this package. Feel free to create an account and help co-maintain it.
https://rpmfusion.org/Contributors

@nickolay168
Copy link
Contributor Author

If you are interested in this package. Feel free to create an account and help co-maintain it. https://rpmfusion.org/Contributors

Sure, I have followed the instructions on the page. @kwizart what should be the next steps?

@kwizart
Copy link
Member

kwizart commented Nov 30, 2024

@nickolay168 Usually it should be the current maintainer to ack.
Can you create a ticket in our bugtracker at bugzilla.rpmfusion.org.
Then ask the maintainer if you can co-maintain this package.

Unless @eclipseo can answer here ?

@nickolay168
Copy link
Contributor Author

nickolay168 commented Dec 1, 2024

Thank you!
@kwizart, I have created an issue in bugzilla: https://bugzilla.rpmfusion.org/show_bug.cgi?id=7123

@sergiomb2
Copy link
Contributor

Hi, sorry for delay, since you already did https://github.com/nickolay168/qTox/releases/tag/v1.17.7 , I prefer use the tag ,
to not hack qtox.spec in all sections

@nickolay168
Copy link
Contributor Author

Hi, sorry for delay, since you already did https://github.com/nickolay168/qTox/releases/tag/v1.17.7 , I prefer use the tag , to not hack qtox.spec in all sections

Sure, Thank you! I have updated the PR. I have also used a new tag for version, where I have removed unsupported unfinished code.

@sergiomb2
Copy link
Contributor

sergiomb2 commented Dec 25, 2024

I fixed two minor details and squash commits , push and built for Fedora 41 and rawhide .
Should we build also for F40 ?

@eclipseo
Copy link
Contributor

I ain't sure about this commit for ffmpeg 7.x

qTox/qTox@d70e9a8

Could you explain why you choose to remove avformat_free_context() ?

Could you fix this alignment:

qTox/qTox@c64d79f#diff-e8b9f765aa2e392d5753e626bcb07aa1a8e78346da63be1ccf361ad402e280bdR316

I know it's not Python, but still 😄

Could you check why you have absolute paths in translations.qrc:

qTox/qTox@3f3a7e6#diff-4233401a9e85a25235756d3625491988bf9b6294605080284bb435698dc6c542R1

@eclipseo
Copy link
Contributor

eclipseo commented Jan 24, 2025

Also, ok this is an unofficial fork, I've checked your changes, and there are no glaring issues.

But there are also unofficial forks like : https://github.com/TokTok/qTox and they have @iphydf on board who is one of the main c-toxcore dev.

Their fork is very active, with a lot more changes, and with more "stars".

I am more inclined to use their fork as the new basis rather than yours, because you seem to work solo. They have applied a similar solution for security by also removing the Extension message support TokTok/qTox@f9d229f

Considering what happen last year with xz utils, considering the sensibility of this project, I'd rather be cautious and use the fork made by people working also on c-toxcore.

Would you have a problem contributing your change to their repo and working with them?

cc @sergiomb2 @kwizart for opinions.

std::atomic<IAudioControl*> audio;
+ // atomic flag showing that we do not need to accept frames as the cancel
+ // call request was sent.
+ std::atomic<bool> isCancelling;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a fix for a crash/race condition in closing qTox during a call. We've made a few changes (e.g. TokTok/qTox#274 and TokTok/qTox#192) towards that. Can you check whether this change is still necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like it is still needed, because it solves different issue. It is fixing rare situation, when user tryes to cancel the call AND simultaneously the Video/Audio frame comes in. If I am remembering it correctly that is what happens

  1. User hits hang up and the QWriteLocker locker{&callsLock}; will lock the frame frocessing
  2. Now in very edge case, the frame comes between the (1) and the call toxav_call_control(toxav.get(), friendNum, TOXAV_CALL_CONTROL_CANCEL, &err); which will never complete as it will hit the mutex inside toxcore (ToxAv->mutex). This mutex will wait for frame to be processed , which will never happen because of (1)

#274 Fixed the lambda expression, sending frames, when the call is being terminated.
#192 Makes sure that the calls are being cleaned up when CoreAV is being destroyed.

So it seems that is a separate issue, which is an edge case, but still can happen.

+#ifdef SPELL_CHECKING
+ if (decorator != nullptr) {
+ delete decorator;
+ decorator = nullptr;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

- for (auto form : chatForms) {
- delete form;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes sense (given QObject child deletion), but what issue does it fix? Does deleting these prematurely cause a problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code does not causes issues by itself, in this change I just wanted to unify handling of chatForm and groupChatForm.

@sergiomb2
Copy link
Contributor

https://github.com/nickolay168/qtox tag v1.17.8 is what build on RPMFusion .
https://github.com/TokTok/qTox have a lot more commits @nickolay168 what do you think , can you merge your work in the TokTok repo ?
Thanks and best regards,

@iphydf
Copy link

iphydf commented Jan 24, 2025

@nickolay168 648BF2EEE794E94444B848F8FC6AD3BA029C9BC2649BA761EF556DA17F549022A8D7596E7DBA is a groupbot that will invite you to the toktok-dev chat. I think there are at least a few fixes in your repo that we didn't address yet (e.g. bugs when history is off, because I've never tested that). Let's get them merged :).

@nickolay168
Copy link
Contributor Author

nickolay168 commented Jan 25, 2025 via email

@iphydf
Copy link

iphydf commented Jan 25, 2025

That's also done. We're on Qt6 now.

@nickolay168
Copy link
Contributor Author

I ain't sure about this commit for ffmpeg 7.x

qTox/qTox@d70e9a8

Could you explain why you choose to remove avformat_free_context() ?

Could you fix this alignment:

qTox/qTox@c64d79f#diff-e8b9f765aa2e392d5753e626bcb07aa1a8e78346da63be1ccf361ad402e280bdR316

I know it's not Python, but still 😄

Could you check why you have absolute paths in translations.qrc:

qTox/qTox@3f3a7e6#diff-4233401a9e85a25235756d3625491988bf9b6294605080284bb435698dc6c542R1

The official qTox version (https://github.com/qTox/qTox) used to take the list of devices by manually creating the AVFormatContext, which in turn involved copying the structure of AVInputFormat's AVClass that required allocation of private data for the specific AVClass, contained in the iformat variable. The manual allocation required the size of this class, however, the priv_data_size field of AVInputFormat was long deprecated and finally removed in ffmpeg v. 7. Here is the commit in ffmpeg repository, which has broken qTox:
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/b800327f4c7233d09baca958121722a04c2035ff
 
and, specifically, the patch file to avformat.h, which used to define priv_data_size:
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/b800327f4c7233d09baca958121722a04c2035ff
In the commit I am using avdevice_list_input_sources function, which does not require AVFormatContext, so it is not created and is not deleted :). I just have forgot to remove the commented code.

@nickolay168
Copy link
Contributor Author

https://github.com/nickolay168/qtox tag v1.17.8 is what build on RPMFusion . https://github.com/TokTok/qTox have a lot more commits @nickolay168 what do you think , can you merge your work in the TokTok repo ? Thanks and best regards,

Yes, probably it is the best way to go forward.

@sergiomb2
Copy link
Contributor

https://github.com/nickolay168/qtox tag v1.17.8 is what build on RPMFusion . https://github.com/TokTok/qTox have a lot more commits @nickolay168 what do you think , can you merge your work in the TokTok repo ? Thanks and best regards,

Yes, probably it is the best way to go forward.

so also approve start using https://github.com/TokTok/qTox ?

@nickolay168
Copy link
Contributor Author

https://github.com/nickolay168/qtox tag v1.17.8 is what build on RPMFusion . https://github.com/TokTok/qTox have a lot more commits @nickolay168 what do you think , can you merge your work in the TokTok repo ? Thanks and best regards,

Yes, probably it is the best way to go forward.

so also approve start using https://github.com/TokTok/qTox ?

I Think, generally yes, as it seems to be the next official qTox repo.
@iphydf do you know if the new version works on libav > 6.0? It seems here we are skipping copying of private data. Does the device listing work without it? I remember some issues when these data were not there.

@iphydf
Copy link

iphydf commented Jan 27, 2025

TokTok/qTox is built against ffmpeg 7.1: https://github.com/TokTok/dockerfiles/blob/master/qtox/download/download_ffmpeg.sh#L10

We also build against some older versions on CI. Whichever is in Ubuntu 22.04 or debian stable.

@nickolay168
Copy link
Contributor Author

nickolay168 commented Jan 27, 2025

TokTok/qTox is built against ffmpeg 7.1: https://github.com/TokTok/dockerfiles/blob/master/qtox/download/download_ffmpeg.sh#L10

We also build against some older versions on CI. Whichever is in Ubuntu 22.04 or debian stable.

@sergiomb2 Then it is totally reasonable to move to the new branch. It would be also great to use toxcore 0.2.20. It looks like it contains some great fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants