Re: [Gambas-user] Segfault with rev 7562
Wow. I finally found it! Somehow the source (here) for gbx_class.c got corrupted with a bad character in the file. Even though svn said it was OK and updated, it was still the bad version that was being compiled. (There was an #07 character/byte in the middle of the source file - it was only visible in hexedit ?) C'est la vie! Sorry for the noise. best regards bruce On Thu, 7 Jan 2016 10:31:24 +0100 Benoît Minisiniwrote: > Le 07/01/2016 05:26, adamn...@gmail.com a écrit : > > I getting a segfault with gbr3. > > > > It happens when running any executable archive including the IDE. > > > > The gdb output is: > > Program received signal SIGSEGV, Segmentation fault. > > EXEC_special (special=11, class=0x80ac13c, object=0x813e68c, nparam=0, > > drop=1 '\001') at gbx_exec.c:1649 > > 1649if (CLASS_DESC_get_type(desc) == CD_STATIC_METHOD) > > 2: index = 0 > > 1: desc = (CLASS_DESC *) 0x0 > > > > The routine in gbx_exec.c is : bool EXEC_special(int special, CLASS *class, > > void *object, int nparam, bool drop). > > The introductory code is: > > CLASS_DESC *desc; > > short index = class->special[special]; > > > > if (index == NO_SYMBOL) > > return TRUE; > > > > desc = CLASS_get_desc(class, index); > > > > if (CLASS_DESC_get_type(desc) == CD_STATIC_METHOD) > > > > The problem is that index is 0, this is occurring invariably when an > > Object[] class is being initialised. The backtrace is: > > (gdb) backtrace > > #0 0x08078d4e in EXEC_special (special=11, class=0x80ac13c, > > object=0x813e68c, nparam=0, drop=1 '\001') > > at gbx_exec.c:1649 > > #1 0x08079acb in EXEC_new () at gbx_exec.c:1947 > > #2 0x08082ac4 in EXEC_loop () at gbx_exec_loop.c:916 > > #3 0x08076da5 in EXEC_function_loop () at gbx_exec.c:931 > > #4 0x0807763f in EXEC_function_real () at gbx_exec.c:895 > > #5 0x08051168 in CLASS_run_inits (class=0x813a994) at gbx_class_load.c:1287 > > #6 0x0805120e in CLASS_load_real (class=0x813a994) at gbx_class_load.c:1323 > > #7 0x08062f15 in ARCHIVE_load_exported_class (arch=0x80c8584, pass=1) at > > gbx_archive.c:192 > > #8 0x0807035b in COMPONENT_load_all_finish () at gbx_component.c:147 > > #9 0x08055da3 in PROJECT_load_finish () at gbx_project.c:486 > > #10 0x0806530c in init (file=file@entry=0xbfffeeeb "./gambas3.gambas", > > argc=1, argv=0xbfffecc4) at gbx.c:103 > > #11 0x0804b390 in main (argc=1, argv=0xbfffecc4) at gbx.c:372 > > > > A bit more info: > > (gdb) disp class->special > > 3: class->special = {12, -1, 21, 15, -1, 22, -1, -1, -1, -1, -1, 0} > > (gdb) disp special > > 4: special = 11 > > > > i.e. index = class->special[special] is the last entry in the > > class->special array. > > and then > > desc = CLASS_get_desc(class, index); > > > > (gdb) disp desc > > 5: desc = (CLASS_DESC *) 0x0 > > > > Finally, It happens the second time that routine is called. The first call > > executes properly (the value of the "special" param is 0). > > > > N.B. this is on a clean copy of the gambas source, not our local version. > > > > Any other info needed? > > > > regards > > bruce > > > > No problem there... The 11th special method ("_ready") has been added in > revision r7541. > > Did you try a recompilation and reinstallation from scratch? > > Are you sure that you didn't have binary packages of previous gambas > versions installed that you didn't uninstall? > > -- > Benoît Minisini > > -- > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- B Bruen -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Segfault with rev 7562
On Thu, 7 Jan 2016 10:31:24 +0100 Benoît Minisiniwrote: > Le 07/01/2016 05:26, adamn...@gmail.com a écrit : > > I getting a segfault with gbr3. > > > > It happens when running any executable archive including the IDE. > > > > The gdb output is: > > Program received signal SIGSEGV, Segmentation fault. > > EXEC_special (special=11, class=0x80ac13c, object=0x813e68c, nparam=0, > > drop=1 '\001') at gbx_exec.c:1649 > > 1649if (CLASS_DESC_get_type(desc) == CD_STATIC_METHOD) > > 2: index = 0 > > 1: desc = (CLASS_DESC *) 0x0 > > > > The routine in gbx_exec.c is : bool EXEC_special(int special, CLASS *class, > > void *object, int nparam, bool drop). > > The introductory code is: > > CLASS_DESC *desc; > > short index = class->special[special]; > > > > if (index == NO_SYMBOL) > > return TRUE; > > > > desc = CLASS_get_desc(class, index); > > > > if (CLASS_DESC_get_type(desc) == CD_STATIC_METHOD) > > > > The problem is that index is 0, this is occurring invariably when an > > Object[] class is being initialised. The backtrace is: > > (gdb) backtrace > > #0 0x08078d4e in EXEC_special (special=11, class=0x80ac13c, > > object=0x813e68c, nparam=0, drop=1 '\001') > > at gbx_exec.c:1649 > > #1 0x08079acb in EXEC_new () at gbx_exec.c:1947 > > #2 0x08082ac4 in EXEC_loop () at gbx_exec_loop.c:916 > > #3 0x08076da5 in EXEC_function_loop () at gbx_exec.c:931 > > #4 0x0807763f in EXEC_function_real () at gbx_exec.c:895 > > #5 0x08051168 in CLASS_run_inits (class=0x813a994) at gbx_class_load.c:1287 > > #6 0x0805120e in CLASS_load_real (class=0x813a994) at gbx_class_load.c:1323 > > #7 0x08062f15 in ARCHIVE_load_exported_class (arch=0x80c8584, pass=1) at > > gbx_archive.c:192 > > #8 0x0807035b in COMPONENT_load_all_finish () at gbx_component.c:147 > > #9 0x08055da3 in PROJECT_load_finish () at gbx_project.c:486 > > #10 0x0806530c in init (file=file@entry=0xbfffeeeb "./gambas3.gambas", > > argc=1, argv=0xbfffecc4) at gbx.c:103 > > #11 0x0804b390 in main (argc=1, argv=0xbfffecc4) at gbx.c:372 > > > > A bit more info: > > (gdb) disp class->special > > 3: class->special = {12, -1, 21, 15, -1, 22, -1, -1, -1, -1, -1, 0} > > (gdb) disp special > > 4: special = 11 > > > > i.e. index = class->special[special] is the last entry in the > > class->special array. > > and then > > desc = CLASS_get_desc(class, index); > > > > (gdb) disp desc > > 5: desc = (CLASS_DESC *) 0x0 > > > > Finally, It happens the second time that routine is called. The first call > > executes properly (the value of the "special" param is 0). > > > > N.B. this is on a clean copy of the gambas source, not our local version. > > > > Any other info needed? > > > > regards > > bruce > > > > No problem there... The 11th special method ("_ready") has been added in > revision r7541. > > Did you try a recompilation and reinstallation from scratch? > > Are you sure that you didn't have binary packages of previous gambas > versions installed that you didn't uninstall? > Could be. Tried all the usuals : make clean; make uninstall etc. I'll get back to you. Good clue though! I'll try with <7541 could be some Nah, I wont guess. later b > -- > Benoît Minisini > > -- > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- B Bruen -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Segfault with rev 7562
I getting a segfault with gbr3. It happens when running any executable archive including the IDE. The gdb output is: Program received signal SIGSEGV, Segmentation fault. EXEC_special (special=11, class=0x80ac13c, object=0x813e68c, nparam=0, drop=1 '\001') at gbx_exec.c:1649 1649if (CLASS_DESC_get_type(desc) == CD_STATIC_METHOD) 2: index = 0 1: desc = (CLASS_DESC *) 0x0 The routine in gbx_exec.c is : bool EXEC_special(int special, CLASS *class, void *object, int nparam, bool drop). The introductory code is: CLASS_DESC *desc; short index = class->special[special]; if (index == NO_SYMBOL) return TRUE; desc = CLASS_get_desc(class, index); if (CLASS_DESC_get_type(desc) == CD_STATIC_METHOD) The problem is that index is 0, this is occurring invariably when an Object[] class is being initialised. The backtrace is: (gdb) backtrace #0 0x08078d4e in EXEC_special (special=11, class=0x80ac13c, object=0x813e68c, nparam=0, drop=1 '\001') at gbx_exec.c:1649 #1 0x08079acb in EXEC_new () at gbx_exec.c:1947 #2 0x08082ac4 in EXEC_loop () at gbx_exec_loop.c:916 #3 0x08076da5 in EXEC_function_loop () at gbx_exec.c:931 #4 0x0807763f in EXEC_function_real () at gbx_exec.c:895 #5 0x08051168 in CLASS_run_inits (class=0x813a994) at gbx_class_load.c:1287 #6 0x0805120e in CLASS_load_real (class=0x813a994) at gbx_class_load.c:1323 #7 0x08062f15 in ARCHIVE_load_exported_class (arch=0x80c8584, pass=1) at gbx_archive.c:192 #8 0x0807035b in COMPONENT_load_all_finish () at gbx_component.c:147 #9 0x08055da3 in PROJECT_load_finish () at gbx_project.c:486 #10 0x0806530c in init (file=file@entry=0xbfffeeeb "./gambas3.gambas", argc=1, argv=0xbfffecc4) at gbx.c:103 #11 0x0804b390 in main (argc=1, argv=0xbfffecc4) at gbx.c:372 A bit more info: (gdb) disp class->special 3: class->special = {12, -1, 21, 15, -1, 22, -1, -1, -1, -1, -1, 0} (gdb) disp special 4: special = 11 i.e. index = class->special[special] is the last entry in the class->special array. and then desc = CLASS_get_desc(class, index); (gdb) disp desc 5: desc = (CLASS_DESC *) 0x0 Finally, It happens the second time that routine is called. The first call executes properly (the value of the "special" param is 0). N.B. this is on a clean copy of the gambas source, not our local version. Any other info needed? regards bruce -- B Bruen-- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user