Sometimes crashes Access with Access Violation Exception (0xc0000005)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- visualbasic
調査の方向性
mTDHelper.bas、特に MagicalTDInitFunction から着手し、Class_Initialize が VBA7 64-bit 向けにそれを呼び出す方法を確認してください。Microsoft Access 2024 64-bit と提供された MsgBoxConfirm コードを使って、報告された Ribbon_OnClick のフローを再現し、ダイアログ操作を繰り返した場合の挙動を比較してください。間欠的なアクセス違反が切り分けられ、検証済みの修正または明確な制限が確立されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hello,
First let me say that this is a very useful library to bring better dialogbox to users. Thank you for your hard work!
I would like to report a quite hard to grasp issue.
This is a Microsoft Access 2024 64 bits, in French, on Windows 11 Pro.
The TaskDialog library is latest (v1.6 R2).
Lately, I have been having regular Ms Access crash with an Access Violation Exception (0xc0000005) when doing various interaction (clicking on buttons, selecting a new line...).
The following event is logged in the Application log (somes parts in French):
Nom de l'application défaillante : MSACCESS.EXE, version : 16.0.17932.20602, horodatage : 0x690d8376
Nom du module défaillant : VBE7.DLL, version : 0.0.0.0, horodatage : 0x66c8d2d7
Exception code: 0xc0000005
Fault offset: 0x0000000000381e5a
Identifiant du processus défaillant : 0x51EC
Heure de début de l'application défaillante : 0x1DC6CE2C7798BE6
Chemin de l'application défaillante : C:\Program Files\Microsoft Office\Root\Office16\MSACCESS.EXE
Chemin du module défaillant : C:\Program Files\Common Files\Microsoft Shared\VBA\VBA7.1\VBE7.DLL
ID du rapport : 98df9afd-4af7-4584-9cb9-31323f331660
Nom complet du package défaillant :
Package défaillant – ID d'application relatif :
I was never able to find the issue as it is seemingly in random. If I try the exact same action after restarting the app, it works flawlessly.
The issue can also happen on different machine.
This is quite maddening.
However, this week I observed 3 random crashes happening on a specific button. It is a custom button added in the Ms Access Ribbon, and the first thing it does is displaying a confirmation dialog using this TaskDialog library.
When the crashes occurred, the dialog was never displayed. That's why I believe the issue may come from this library.
Here is the Sub in question :
Public Sub Ribbon_OnClick(Control As IRibbonControl)
If MsgBoxConfirm("...") Then
' Do something
End If
End Sub
And here are the support functions used:
Public Function MsgBoxConfirm(Content As Variant, Optional ContentTitle As Variant = "", Optional icon As TDICONS = IDI_QUESTION, Optional DefaultButton As TDRESULT = TD_YES) As Boolean
Dim TaskDialog As New cTaskDialog
With TaskDialog
.Init
.Flags = TDF_ENABLE_HYPERLINKS Or TDF_EXEC_HYPERLINKS Or TDF_SIZE_TO_CONTENT
.title = "Title"
.ParenthWnd = GetParenthWnd
.MainInstruction = ContentTitle
.Content = Content
.CommonButtons = TDCBF_YES_BUTTON Or TDCBF_CANCEL_BUTTON
.DefaultButton = DefaultButton
.title = "Confirmation"
.IconMain = icon
.ShowDialog
MsgBoxConfirm = .ResultMain = TD_YES
End With
Set TaskDialog = Nothing
End Function
Function GetParenthWnd() As LongPtr
GetParenthWnd = Application.hWndAccessApp
If Application.CurrentObjectType = acForm Then
If IsFormDialog(Screen.ActiveForm) Then
GetParenthWnd = Screen.ActiveForm.hwnd
End If
End If
End Function
Public Function IsFormDialog(frm As Form) As Boolean
Dim hwnd As LongPtr
Dim lngStyle As LongPtr
hwnd = frm.hwnd
lngStyle = GetWindowLong(hwnd, GWL_EXSTYLE)
IsFormDialog = CBool((lngStyle And WS_EX_DLGMODALFRAME) = WS_EX_DLGMODALFRAME)
End Function
I don't remember having this kind of crashes when we used Access 2019 32 bits. Not on this button anyway.
I noticed this comment in the mTDHelper.bas file:
Public Sub MagicalTDInitFunction()
'The trick is a GENIUS!
'He identified the bug in VBA64 that had been causing the crashing.
'As if by magic, calling this from Class_Initialize resolves the problem.
End Sub
I couldn't find any information on theses crashes (or how any real explanation of this "genius trick") but I though it may be related?
Thank you for your time and any help you can provide on this matter! 😸
- 主要言語
- Visual Basic 6.0
- スター
- 52
- フォーク
- 8
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fafalone/cTaskDialog64 のほかの issue
-
When there are multiple `AddRadioButton`s, the icons placed with `.AddCustomButton` are misaligned.オープン
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
fafalone/cTaskDialog64#18 · コメント 2 件 ·
-
Not Modalオープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
fafalone/cTaskDialog64#12 · コメント 4 件 ·
fafalone/cTaskDialog64 の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
acsandmann/rift#577 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
wpilibsuite/FirstDriverStation-Public#91 · コメント 1 件 ·
-
0.kind: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信