Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Qt Ctrl-C broken on windows #20932

Closed
Closed
Labels
GUI: QtOS: MicrosoftRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone
@tacaswell

Description

@tacaswell

@anntzer@tacaswell
Hi! I have just tested the master branch on Windows and found that there is indeed a problem with the QSocketNotifier (it appeared here:#13306 (comment)). Previously, on that Windows machine, I was running my old code with QAbstractSocket which was fine, and did not test the newest version with QSocketNotifier there (my fault, sorry). I have tested on Linux, and there is no such problem there.

The code to reproduce on Windows (in Jupyter):

%matplotlibqtfrommatplotlibimportpyplotaspltplt.plot([1,2])plt.pause(.1)plt.pause(.1)plt.pause(.1)

The problem seems to be that ifsocketpair generates a socket with the samefileno value as it generated in the previouspause() call, the QSocketNotifierunexpectedly fires and hangs here:

sn.activated.connect(lambda*args:rsock.recv(1))

becausenothing was actually written to thewakeup_fd. I don't understand how that can be.

Workaround fix:

rsock.set_blocking(False)@sn.activated.connectdefon_signal(*args):try:signal=rsock.recv(1)# clear the socket to re-arm the notifierexceptBlockingIOError:pass# false-trigger, nothing on rsock

What should we do with this? Is there a better solution?

Originally posted by@vdrhtc in#13306 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUI: QtOS: MicrosoftRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp