I'm currently investigating a bug in a large project (74 635 lines of code). It's probably an invalid memory access but I'm not sure since the program crash only when I compile the program normally. When I run the program with the debugger I stress the program as much as I can but it doesn't crash at all.
So I have used OnError library in an attempt to figure out what is going on and I get the error message BUS error the first time I have tried. The second time I have tried I got the Segmentation violation message, The third time I got the Abort signal message.
Each an every single time in the following source code at line 156 :
Code: Select all
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; CODE GÉNÉRÉ AUTOMATIQUEMENT, NE PAS MODIFIER À
; MOINS D'AVOIR UNE RAISON TRÈS TRÈS VALABLE !!!
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Code généré par : Dev-Object - V1.7.3
; Nom du projet : Gtk Dialog
; Nom du fichier : GtkDialog - OOP.pb
; Version du fichier : 0.0.0
; Programmation : À vérifier
; Programmé par : Guillaume Saumure
; Alias : StarBootics
; Courriel : gsaumure@cgocable.ca
; Date : 28-03-2022
; Mise à jour : 15-04-2022
; Codé pour PureBasic : V6.00 Beta 6
; Plateforme : Linux
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
DeclareModule GtkDialog
Interface Dialog
GetID.i()
GetContentArea.i()
SetModal(Modal.i)
SetTitle(Title.s)
SetBorderWidth(BorderWidth.l)
SetTransientFor(*Parent)
SetResizable(Resizable.i)
SetContentAreaSpacing(Spacing.l)
ContentAreaPackStart(*Child, Expand.i, Fill.i, Padding.l)
ShowWidgets()
AddButton.i(ButtonText.s, ResponseID.l)
Run.l()
Destroy()
Free()
EndInterface
Declare.i New()
EndDeclareModule
Module GtkDialog
ImportC ""
gtk_dialog_get_content_area(*Dialog)
gtk_box_set_spacing(*Box, Spacing.l)
gtk_box_pack_start(*Box, *Child, Expand.i, Fill.i, Padding.l)
EndImport
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Déclaration de la Structure <<<<<
Structure Private_Members
VirtualTable.i
DialogID.i
ContentAreaID.i
EndStructure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les Observateurs <<<<<
Procedure.i GetID(*This.Private_Members)
ProcedureReturn *This\DialogID
EndProcedure
Procedure.i GetContentArea(*This.Private_Members)
ProcedureReturn *This\ContentAreaID
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les Mutateurs <<<<<
Procedure SetModal(*This.Private_Members, Modal.i)
gtk_window_set_modal_(*This\DialogID, Modal)
EndProcedure
Procedure SetTitle(*This.Private_Members, Title.s)
gtk_window_set_title_(*This\DialogID, Title)
EndProcedure
Procedure SetBorderWidth(*This.Private_Members, BorderWidth.l)
gtk_container_set_border_width_(*This\DialogID, BorderWidth)
EndProcedure
Procedure SetTransientFor(*This.Private_Members, *Parent)
gtk_window_set_transient_for_(*This\DialogID, *Parent)
EndProcedure
Procedure SetResizable(*This.Private_Members, Resizable.i)
gtk_window_set_resizable_(*This\DialogID, Resizable)
EndProcedure
Procedure SetContentAreaSpacing(*This.Private_Members, Spacing.l)
gtk_box_set_spacing(*This\ContentAreaID, Spacing)
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Nom de la procédure <<<<<
Procedure ContentAreaPackStart(*This.Private_Members, *Child, Expand.i, Fill.i, Padding.l)
gtk_box_pack_start(*This\ContentAreaID, *Child, Expand.i, Fill.i, Padding.l)
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Nom de la procédure <<<<<
Procedure ShowWidgets(*This.Private_Members)
gtk_widget_show_all_(*This\ContentAreaID)
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Nom de la procédure <<<<<
Procedure.i AddButton(*This.Private_Members, ButtonText.s, ResponseID.l)
ProcedureReturn gtk_dialog_add_button_(*This\DialogID, ButtonText, ResponseID)
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Nom de la procédure <<<<<
Procedure.l Run(*This.Private_Members)
ProcedureReturn gtk_dialog_run_(*This\DialogID)
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Nom de la procédure <<<<<
Procedure Destroy(*This.Private_Members)
gtk_widget_destroy_(*This\DialogID)
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Le Destructeur <<<<<
Procedure Free(*This.Private_Members)
FreeStructure(*This)
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Le Constructeur <<<<<
Procedure.i New()
*This.Private_Members = AllocateStructure(Private_Members)
*This\VirtualTable = ?START_METHODS
*This\DialogID = gtk_dialog_new_()
*This\ContentAreaID = gtk_dialog_get_content_area(*This\DialogID)
ProcedureReturn *This
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les entrées de la table virtuelle <<<<<
DataSection
START_METHODS:
Data.i @GetID()
Data.i @GetContentArea()
Data.i @SetModal()
Data.i @SetTitle()
Data.i @SetBorderWidth()
Data.i @SetTransientFor()
Data.i @SetResizable()
Data.i @SetContentAreaSpacing()
Data.i @ContentAreaPackStart()
Data.i @ShowWidgets()
Data.i @AddButton()
Data.i @Run()
Data.i @Destroy()
Data.i @Free()
END_METHODS:
EndDataSection
EndModule
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Code généré en : 00.001 secondes (76000.00 lignes/seconde) <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< FIN DU FICHIER <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<
Code: Select all
gtk_widget_destroy_(*This\DialogID)
Thanks beforehand.
StarBootics