Sometimes crashes Access with Access Violation Exception (0xc0000005)
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- visualbasic
- Domaine
- desktop, operating-systems
Piste de recherche
Commencez par mTDHelper.bas, en particulier MagicalTDInitFunction, et examinez comment Class_Initialize l’appelle pour VBA7 64-bit. Reproduisez le flux Ribbon_OnClick signalé avec Microsoft Access 2024 64-bit et le code MsgBoxConfirm fourni, puis comparez le comportement lors d’interactions répétées avec la boîte de dialogue. Le travail est terminé lorsque la violation d’accès intermittente est isolée et qu’un correctif vérifié ou une limitation claire est établi.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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! 😸
- Langage dominant
- Visual Basic 6.0
- Étoiles
- 52
- Forks
- 8
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Issues similaires
-
desktop v3 windows
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
esengine/DeepSeek-Reasonix#15016 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
eliasstravik/herdr-projects#789 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
raullenchai/Rapid-MLX#5664 ·
Les mainteneurs répondent en général sous 1 jour
-
bug ux
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Alex-Sebastian-Ene/mind-over-chicken#187 ·
Les mainteneurs répondent en général sous 1 jour
-
chore(deps): upgrade ollama 0.6.3 → 0.6.4Peut-être pris @Anras573 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
Anras573/AIchemist-UI#280 ·
Les mainteneurs répondent en général sous 1 jour