nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.11k stars 637 forks source link

Use build of wxPython which has symbols #6143

Closed jcsteh closed 8 years ago

jcsteh commented 8 years ago

Spun off #5998.

We're seeing quite a few crashes in wx code, but we can't get any info from them because wxPython doesn't include symbols. We want to use a build of wxPython for which we have symbols.

Possible approaches:

  1. wxWidgets do provide pre-built dlls, libs and symbols. I tried just replacing the wxPython dlls with these, but wxPython refused to load them. Still, this is worth checking again.
  2. Even if that fails, perhaps there's some way to make wxPython's build system use the wxWidgets libs/dlls. This would at least avoid the need to build wxWidgets.
  3. Failing all of that, we'll have to build wxPython from scratch ourselves, including wxWidgets.

CC @feerrenrut, @MichaelDCurran.

feerrenrut commented 8 years ago

Double checked wxWidgets version required is 3.0.2.0 (by looking at the file properties in miscDeps\python\wx\wxmsw30u_stc_vc90.dll

wxWidgets downloads: https://github.com/wxWidgets/wxWidgets/releases/tag/v3.0.2 Downloaded: wxMSW-3.0.2_vc90_ReleaseDLL.7z

Compared the checksums with the dlls in our wxPython libs directory. They do not match. Dropped in the dlls from the wxWidgest release and got the following error:

INFO - __main__ (07:09:38):
Starting NVDA
CRITICAL - __main__ (07:09:38):
core failure
Traceback (most recent call last):
  File "nvda.pyw", line 189, in <module>
    import core
  File "core.py", line 23, in <module>
    import nvwave
  File "nvwave.py", line 14, in <module>
    import wx
  File "C:\work\nvda\miscDeps\python\wx\__init__.py", line 45, in <module>
    from wx._core import *
  File "C:\work\nvda\miscDeps\python\wx\_core.py", line 16924, in <module>
    from _gdi import *
  File "C:\work\nvda\miscDeps\python\wx\_gdi.py", line 4, in <module>
    import _gdi_
ImportError: DLL load failed: The specified procedure could not be found.
feerrenrut commented 8 years ago

It looks like we would have to build wxWidgets included with wxPython to get the appropriate dlls / pdbs.

See: https://wxpython.org/builddoc.php.

feerrenrut commented 8 years ago

However I tried downloading the 32-bit binaries for MSVC 9 from https://wxpython.org/download.php This is an installer, which includes pre-built version of wxWidgets and pdb's. The checksums for all these files matches the files we currently have in NVDA. When dropped into nvda there does not seem to be a problem.

jcsteh commented 8 years ago

Oh! I didn't realise those downloads included pdbs. Very nice. I think that means all we need do is grab the symbols and upload them to our symbol server; no changes to NVDA necessary. That also means we can analyse existing crash dumps rather than waiting for those crashes to be captured again, which is even better.

michaelDCurran commented 8 years ago

Accept for pdbs for the pyds. I.e. this is just WX symbols, not wxPython symbols. To be completely covered we'd still want to build wxPython with symbols if possible. But I think 99% of what we need already is covered by the existing wx symbols as the pyds are only wrapper functions generated by swig.

On 5/07/2016 7:59 PM, James Teh wrote:

Oh! I didn't realise those downloads included pdbs. Very nice. I think that means all we need do is grab the symbols and upload them to our symbol server; no changes to NVDA necessary. That also means we can analyse existing crash dumps rather than waiting for those crashes to be captured again, which is even better.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nvaccess/nvda/issues/6143#issuecomment-230437258, or mute the thread https://github.com/notifications/unsubscribe/ANf5nYPTuGl7y1ymDZz5mCUQwcQsMNdBks5qSisOgaJpZM4JEzIy.

Michael Curran Executive Director, NV Access Limited Phone: +61 7 3149 3306 Website: http://www.nvaccess.org/ Twitter: @NVAccess Facebook: http://www.facebook.com/NVAccess

jcsteh commented 8 years ago

It's probably worth analysing one of the current crash dumps where we crash in wx with these symbols present. If that works, I'd lean towards not building wxPython ourselves, as it's more maintenance work for us going forward.

michaelDCurran commented 8 years ago

These symbols do work. Using them on one crash dump allows kp and friends to list more than 5 frames. It also moves the "stack information not available. Following frames may be wrong" message down to above the most inner call to a wxPython pyd function. (it used to be above the most inner wx dll function). However, from that point onwards, things are all over the place. A lot of 0x0s and it gives up after stack 21.

So annoyingly as this is, for perfect results the wxPython pdbs will still help.

But, in most cases, hopefully the inner most frames will show the issue.

Most of these though are the deactivateActCtx bug.

Mick

On 5/07/2016 8:22 PM, James Teh wrote:

It's probably worth analysing one of the current crash dumps where we crash in wx with these symbols present. If that works, I'd lean towards not building wxPython ourselves, as it's more maintenance work for us going forward.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nvaccess/nvda/issues/6143#issuecomment-230441838, or mute the thread https://github.com/notifications/unsubscribe/ANf5nbwya4ObajL0QJ4010GJg45okShHks5qSjBggaJpZM4JEzIy.

Michael Curran Executive Director, NV Access Limited Phone: +61 7 3149 3306 Website: http://www.nvaccess.org/ Twitter: @NVAccess Facebook: http://www.facebook.com/NVAccess

michaelDCurran commented 8 years ago

In short, we would still like to proceed with investigating whether it is possible to generate symbols for wxPython pyd files, as this will ensure we have all symbols allowing for a full and accurate stack when viewing NVDA in a debugger.

feerrenrut commented 8 years ago

Building wxPython on Windows 10 Instructions:

Start the build

Check the results

Finish up

Errors?

michaelDCurran commented 8 years ago

Fixed in 8f252398f4bf121009fd4b205c729629eab22352