Skip to content

Conversation

@swt2c
Copy link
Collaborator

@swt2c swt2c commented Jan 25, 2025

There are probably going to be failures, but would be good to know where we are.

@swt2c swt2c force-pushed the ci_run_unittests branch 2 times, most recently from f687715 to 7442197 Compare January 26, 2025 00:30
@echoix
Copy link
Contributor

echoix commented Feb 2, 2025

For the hanging test, what is the pattern that should be used when running without an user interaction?

In the following, showing a modal dialog has no apparent way of getting closed.

def test_filedlgcustomize1(self):
class MyFileDialogCustomizeHook(wx.FileDialogCustomizeHook):
def __init__(self):
super().__init__()
self.add_called = False
def AddCustomControls(self, customizer):
self.add_called = True
hook = MyFileDialogCustomizeHook()
dlg = wx.FileDialog(None, 'Save Document', '', 'file.my')
dlg.SetCustomizeHook(hook)
wx.CallLater(250, dlg.EndModal, wx.ID_OK)
dlg.ShowModal()
assert(hook.add_called)

@swt2c
Copy link
Collaborator Author

swt2c commented Feb 3, 2025

@echoix this line should cause the modal to be closed after 250 ms (I think):

wx.CallLater(250, dlg.EndModal, wx.ID_OK)

I haven't investigated yet why the Windows tests are hanging - is this the reason?

@echoix
Copy link
Contributor

echoix commented Feb 3, 2025

If it were to be a deadlock caused by multiprocessing and the startup method, we might've been able to see something similar on macOS too. Was the job retried and jams at the same place?

@echoix
Copy link
Contributor

echoix commented Feb 3, 2025

Last time I debugged something similar, I had to go by bisection to find what test where actually causing to jam, as it's not always the ones we see. If I remember correctly, there was also something to do with the fact that the shell used in the CI was cmd, and is quite limited on error reporting. The test was already failed, but the error didn't display yet, waiting for some input on some stream, and then times out, and further gets force killed (when seeing the ^C).

It's probably not as worse as it looks like.

@echoix
Copy link
Contributor

echoix commented Feb 8, 2025

I've done some more runs on a PR against my fork: echoix#21
I tried to see if it was the nested class inside a function that was problematic, but no, it wasn't that : (echoix#22).

So I tried skipping the hanging tests to see what else there was, or if there was a pattern.
First I updated from main to make sure nothing changed, just in case.
After skipping the single test_filedlgcustomize.py test, for windows with python < 3.13 (as 3.13 works), there was another file that was hanging, unittests/test_richmsgdlg.py. I skipped all of these 3 tests, as I didn't see after killing one dot, so I didn't know if it was one or more tests that were hanging (not with 3.13 on windows again).

I added other python versions for windows x64, and nothing else failed or hung.
Now we can analyze the pattern of what is common in both of the skipped files, and why is it working on 3.13.

Once the CI is finished I'll try to push again to narrow what python versions hang, and also see which ones of the three richmsgdlg_Tests fail. Three of them use dlg.ShowModal() and wx.CallLater() too.
But a file like /unittests/test_msgdlg.py also has similar patterns and it didn't cause a hang.

@swt2c swt2c force-pushed the ci_run_unittests branch 2 times, most recently from f3c71ca to bf5d8b7 Compare February 10, 2025 03:14
This was originally added when numpy didn't support Python 3.12, but
that has long since been resolved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants