ports/158763: [MAINTAINER][PATCH] devel/gps-5.0.0: fix project properties crash

John Marino freebsdml at marino.st
Sun Jul 10 14:30:11 UTC 2011


>Number:         158763
>Category:       ports
>Synopsis:       [MAINTAINER][PATCH] devel/gps-5.0.0: fix project properties crash
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 10 14:30:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     John Marino
>Release:        FreeBSD 8.2
>Organization:
>Environment:
>Description:
When using the GNAT Programming Studio, selecting the library project dialog will cause GPS to crash every time due to a bug in the code.

Unfortunately, Adacore only provides public access to the trunk of the code repository, and not the branches.  This bug was fixed after version 5.0.0 was branched.  That bug fix is carried over here by patching three files.
>How-To-Repeat:
1. Launch GPS
2. Open a project
3. Menu > Project > Edit Project Properties > Library Tab

## CRASH ## 
Crash is graceful, a message tells where to find the crash log.
>Fix:


Patch attached with submission follows:

--- /dev/null
+++ files/patch-prj_editor-src-project_properties.adb	2011-07-10 11:35:43.000000000 +0200
@@ -0,0 +1,20 @@
+--- prj_editor/src/project_properties.adb.orig	2010-12-14 23:30:31.000000000 +0100
++++ prj_editor/src/project_properties.adb
+@@ -4925,7 +4925,7 @@
+       then
+          --  Some pages might not be visible though...
+          P := Get_Nth_Project_Editor_Page
+-           (Ed.Kernel, Page - Pages_From_XML_Count);
++           (Ed.Kernel, Page - Pages_From_XML_Count + 1);
+       end if;
+ 
+       if P /= null then
+@@ -4934,7 +4934,7 @@
+          begin
+             Refresh
+               (Page      => P,
+-               Widget    => Ed.Pages (Page - Pages_From_XML_Count),
++               Widget    => Ed.Pages (Page - Pages_From_XML_Count + 1),
+                Project   => Ed.Project,
+                Languages => Languages.all);
+             Free (Languages);
--- /dev/null
+++ files/patch-prj_editor-src-project_viewers.ads	2011-07-10 11:36:04.000000000 +0200
@@ -0,0 +1,11 @@
+--- prj_editor/src/project_viewers.ads.orig	2010-12-14 23:30:31.000000000 +0100
++++ prj_editor/src/project_viewers.ads
+@@ -159,7 +159,7 @@
+    --  Return the number of registered project editor pages
+ 
+    function Get_Nth_Project_Editor_Page
+-     (Kernel : access GPS.Kernel.Kernel_Handle_Record'Class; Num : Natural)
++     (Kernel : access GPS.Kernel.Kernel_Handle_Record'Class; Num : Positive)
+       return Project_Editor_Page;
+    --  Return the Num-th registered project editor page.
+    --  First page is number 1.
--- /dev/null
+++ files/patch-prj_editor-src-project_viewers.adb	2011-07-10 11:35:58.000000000 +0200
@@ -0,0 +1,11 @@
+--- prj_editor/src/project_viewers.adb.orig	2010-12-14 23:30:31.000000000 +0100
++++ prj_editor/src/project_viewers.adb
+@@ -1657,7 +1657,7 @@
+    ---------------------------------
+ 
+    function Get_Nth_Project_Editor_Page
+-     (Kernel : access Kernel_Handle_Record'Class; Num : Natural)
++     (Kernel : access Kernel_Handle_Record'Class; Num : Positive)
+       return Project_Editor_Page
+    is
+       pragma Unreferenced (Kernel);
--- Makefile.orig	2011-07-10 11:41:06.000000000 +0200
+++ Makefile	2011-07-10 11:41:17.000000000 +0200
@@ -7,6 +7,7 @@
 
 PORTNAME=	gps
 PORTVERSION=	5.0.0
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	http://downloads.dragonlace.net/src/ \
 		http://dragonlace.mirrors.ada.cx/src/


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list