Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-28 Thread Tomaž Žveglič

On 28.10.2015 13:42, Zeljko wrote:



On 10/28/2015 01:36 PM, Tomaž Žveglič wrote:

I did as you suggest and I also did similar changes to 
FontIsMonoSpaceFont.


Ok, seem that there's no more help from trial error. I'll check it 
when I install OpenBSD in virtual machine.


zeljko



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Thanks Željko for your help. I owe you beer. Do you have bitcoin address?

Regards,
TomazZ

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-28 Thread Tomaž Žveglič
o continue, or q  to quit---
#50 0x00027836922b in g_main_context_iterate ()
   from /usr/local/lib/libglib-2.0.so.4200.1
#51 0x0002783692f7 in g_main_context_iteration ()
   from /usr/local/lib/libglib-2.0.so.4200.1
#52 0x00a27938 in APPPROCESSMESSAGES (this=0x26c167650)
at gtk2widgetset.inc:2326
#53 0x0089035b in PROCESSMESSAGES (this=0x26c167050)
at application.inc:381
#54 0x00838e91 in main () at lazarus.pp:113
(gdb)
---


Regards,
Tomaž Žveglič

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-28 Thread Tomaž Žveglič

On 28.10.2015 8:22, Zeljko wrote:




#6  0x00a1bae4 in CREATEFORMCONTENTS (AFORM=0x2c31ef530,
FORMWIDGET=0x2887b8500,
 AWIDGETINFO=0x282a0bb20) at gtk2proc.inc:7485


ah, maybe lineinfo is invalid (not like in trunk), so pls. in that 
function of gtk2proc add gtk_adjustment_new where crash occurs...there 
are 2 places where gtkAdjustment is param.


zeljko


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Thanks Željko,


so far this changes were made to file 
"lazarus/lcl/interfaces/gtk2/gtk2proc.inc":

---
ScrolledWidget := gtk_scrolled_window_new(PgtkAdjustment( 
gtk_adjustment_new(0, 0, 100, 1, 1, 100)), PgtkAdjustment( 
gtk_adjustment_new(0, 0, 100, 1, 1, 100)));

---
ClientAreaWidget := gtk_layout_new(PgtkAdjustment( gtk_adjustment_new(0, 
0, 100, 1, 1, 100)), PgtkAdjustment( gtk_adjustment_new(0, 0, 100, 1, 1, 
100)));

---
Adjustment := PgtkAdjustment(gtk_adjustment_new(0, 0, 100, 1, 1, 100));
StyleObject^.Widget := gtk_vscrollbar_new(Adjustment);
---
Adjustment := PgtkAdjustment(gtk_adjustment_new(0, 0, 100, 1, 1, 100));
StyleObject^.Widget := gtk_vscrollbar_new(Adjustment);
---

Now when i run lazarus:
--
# ./lazarus
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/root/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
TApplication.HandleException Access violation
  Stack trace:
  $0002C162501D line 1083 of 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c
[TGtk2WidgetSet.Destroy] WARNING: There are 4 unreleased DCs, a detailed 
dump follows:
[TGtk2WidgetSet.Destroy]  DCs:   00029C834840 00029C834640 
00029C834440 00029C834240
[TGtk2WidgetSet.Destroy] WARNING: There are 6 unreleased GDIObjects, a 
detailed dump follows:
[TGtk2WidgetSet.Destroy]   GDIOs: 00020D32D8C0 00020D32D6C0 
00020D32D640 00020D32D740 00020D32D7C0 00020D32D5C0

[TGtk2WidgetSet.Destroy]   gdiBitmap: 2
[TGtk2WidgetSet.Destroy]   gdiBrush: 1
[TGtk2WidgetSet.Destroy]   gdiFont: 2
[TGtk2WidgetSet.Destroy]   gdiRegion: 1
--

Stack trace:
--
# gdb ./lazarus
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd5.8"...
(gdb) run
Starting program: /root/lazarus/lazarus
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/root/.lazarus"
  SecondaryConfigPath="/etc/lazarus"

Program received signal SIGBUS, Bus error.
0x000216c7501d in IA__FcPatternBuild (p=0x0)
at 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c:1083
1083 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c: 
No such file or directory.
in 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c

Current language:  auto; currently c
(gdb) bt
#0  0x000216c7501d in IA__FcPatternBuild (p=0x0)
at 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c:1083

#1  0x000253822306 in pango_fc_font_map_load_fontset ()
   from /usr/local/lib/libpangoft2-1.0.so.3600.0
#2  0x0002498afb7b in itemize_state_process_run ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#3  0x0002498b0338 in pango_itemize_with_base_dir ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#4  0x0002498b9884 in pango_layout_check_lines ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#5  0x0002498bab06 in pango_layout_get_extents_internal ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#6  0x0002498bbcf0 in pango_layout_get_pixel_extents ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#7  0x0002498bbd7c in pango_layout_get_pixel_size ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#8  0x00b2ec4f in FONTISDOUBLEBYTECHARSFONT (THEFONT=0x2106c6af0)
at gtk2proc.inc:9221
#9  0x00a306b2 in UPDATEDCTEXTMETRIC (this=0x21dbb6650, 
DC=0x2ada92240)

at gtk2widgetset.inc:5913
#10 0x00a3fd21 in GETTEXTMETRICS (this=0x21dbb6650, 
DC=11503477312, TM=
  {TMHEIGHT = 0, TMASCENT = 2, TMDESCENT = -142768, 
TMINTERNALLEADING = 32639, TMEXTERNALLEADING = 11774192, TMAVECHARWIDTH 
= 0, TMMAXCHARWIDTH = 0, TMWEIGHT = 0, TMOVERHANG = 5, 
TMDIGITIZEDASPECTX = 1, TMDIGITIZEDASPECTY = -1381423040, TMFIRSTCHAR = 
2 '\002', TMLASTCHAR = 0 '\0', TMDEFAULTCHAR = 0 '\0', TMBREAKCHAR = 0 
'\0', TMITALIC = 0 '\0', TMUNDERLINED = 210 'Ň', TMSTRUCKOUT = 253 'ý', 

Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-27 Thread Tomaž Žveglič



On 10/27/15 09:46, Zeljko wrote:





gdb ./lazarus
GNU gdb 6.3 ...
(gdb) run
Starting program: /root/lazarus/lazarus

Program received signal SIGBUS, Bus error.
0x0002954fe2fa in g_object_new ()
from /usr/local/lib/libgobject-2.0.so.4200.1
Current language:  auto; currently c
(gdb) bt
#0  0x0002954fe2fa in g_object_new ()
from /usr/local/lib/libgobject-2.0.so.4200.1
#1  0x0002f2a1a195 in gtk_adjustment_new ()
from /usr/local/lib/libgtk-x11-2.0.so.2400.0
#2  0x0002f2b2071f in gtk_range_set_adjustment ()
from /usr/local/lib/libgtk-x11-2.0.so.2400.0
#3  0x0002954fd46d in g_object_new_internal ()
from /usr/local/lib/libgobject-2.0.so.4200.1
#4  0x0002954fdd45 in g_object_new_valist ()
from /usr/local/lib/libgobject-2.0.so.4200.1
#5  0x0002954fe364 in g_object_new ()
from /usr/local/lib/libgobject-2.0.so.4200.1
#6  0x00a1ca0e in GETSTYLEWITHNAME (
 WNAME=0x19b6d08 "vertical scrollbar") at gtk2proc.inc:7860
#7  0x00a1c3d7 in GETSTYLE (ASTYLE=LGSVERTICALSCROLLBAR)
 at gtk2proc.inc:7665


This is not trunk lazaruz according to line info  so try next and 
give feedback (I'll try to install OpenBSD 5.8 64bit in vmware next 
days and see what happens)

in lcl/widgetset/gtk2/gtk2proc.inc
find lines (around line 7665) and add gtkadjustment:

  If CompareText(WName,LazGtkStyleNames[lgsVerticalScrollbar])=0 
then begin

lgs:=lgsVerticalScrollbar;
StyleObject^.Widget := gtk_vscrollbar_new( 
gtk_adjustment_new(0, 0, 100, 1, 1, 100)); // add gtkAdjustment 
instead of nil

  end
else
  If CompareText(WName,LazGtkStyleNames[lgsHorizontalScrollbar])=0 
then begin

lgs:=lgsHorizontalScrollbar;
StyleObject^.Widget := gtk_hscrollbar_new( 
gtk_adjustment_new(0, 0, 100, 1, 1, 100)); // add gtkAdjustment 
instead of nil

  end


I know that this will create memleak, but just want to know if it will 
crash when gtkAdjustment is added as param to gtk_vscrollbar_new()


Thanks

zeljko

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Hi Željko,

thanks for hints :)


I changed file "lazarus/lcl/interfaces/gtk2/gtk2proc.inc" like this:
-
var
Adjustment: PGtkAdjustment;
-
  If CompareText(WName,LazGtkStyleNames[lgsVerticalScrollbar])=0 
then begin

lgs:=lgsVerticalScrollbar;
Adjustment := PgtkAdjustment( gtk_adjustment_new(0, 0, 100, 1, 
1, 100));
StyleObject^.Widget := gtk_vscrollbar_new(Adjustment); // add 
gtkAdjustment instead of nil

  end
else
  If CompareText(WName,LazGtkStyleNames[lgsHorizontalScrollbar])=0 
then begin

lgs:=lgsHorizontalScrollbar;
Adjustment := PgtkAdjustment( gtk_adjustment_new(0, 0, 100, 1, 
1, 100));
StyleObject^.Widget := gtk_hscrollbar_new(Adjustment); // add 
gtkAdjustment instead of nil

  end
-

Now some new error occured:
-
$ ./lazarus
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/tomaz/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $0002B60EB2FA
TApplication.HandleException Access violation
  Stack trace:
  $0002B60EB2FA
-

-
$ gdb ./lazarus
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd5.8"...
(gdb) run
Starting program: /home/tomaz/prg/lazarus/lazarus
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/tomaz/.lazarus"
  SecondaryConfigPath="/etc/lazarus"

Program received signal SIGBUS, Bus error.
0x0002b51792fa in g_object_new () from 
/usr/local/lib/libgobject-2.0.so.4200.1

Current language:  auto; currently c
(gdb) bt
#0  0x0002b51792fa in g_object_new () from 
/usr/local/lib/libgobject-2.0.so.4200.1
#1  0x0002e19b1195 in gtk_adjustment_new () from 
/usr/local/lib/libgtk-x11-2.0.so.2400.0
#2  0x0002e1a6b195 in gtk_layout_constructor () from 
/usr/local/lib/libgtk-x11-2.0.so.2400.0
#3  0x0002b5178a92 in g_object_new_internal () from 
/usr/local/lib/libgobject-2.0.so.4200.1
#4  0x0002b5178d45 in g_object_new_valist () from 
/usr/local/lib/libgobject-2.0.so.4200.1
#5  0x0002b5179364 in g_object_new () from 
/usr/local/lib/libgobject-2.0.so.4200.1
#6  0x00a1bae4 in CREATEFORMCONTENTS (AFORM=0x2c31ef530, 
FORMWIDGET=0x2887b8500,

AWIDGETINFO=0x282a0bb20) at gtk2proc.inc:7485
#7  0x00ad6252 in CREATEHANDLE (self=0x2c31f0a30, 

[Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-26 Thread Tomaž Žveglič

OS: OpenBSD bsd 5.8 GENERIC#1170 amd64

lazarus was compiled using fpc 2.6.4:
-
# pkg_add gmake
# pkg_add gdk-pixbuf
# pkg_add gtk+2
# pkg_add fpc
# tar -xzvpf lazarus-1.4.4-0.tar.gz
# cd lazarus
# gmake clean bigide
-
Compilation was smooth.


When I run lazarus this error is displayed:

# ./lazarus

(lazarus:32495): GLib-GObject-CRITICAL **: g_object_unref: assertion 
'G_IS_OBJECT (object)' failed

[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $00021A35B2FA
TApplication.HandleException Access violation
  Stack trace:
  $00021A35B2FA
[FORMS.PP] ExceptionOccurred



The same installation process works fine under OpenBSD 5.8 32bit (i386) 
version and lazarus works fine.



Regards,
TomazZ

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-26 Thread Tomaž Žveglič

On 26.10.2015 15:31, Zeljko wrote:



On 10/26/2015 02:35 PM, Tomaž Žveglič wrote:


When I run lazarus this error is displayed:

# ./lazarus

(lazarus:32495): GLib-GObject-CRITICAL **: g_object_unref: assertion
'G_IS_OBJECT (object)' failed
[FORMS.PP] ExceptionOccurred
   Sender=EAccessViolation
   Exception=Access violation
   Stack trace:
   $00021A35B2FA
TApplication.HandleException Access violation
   Stack trace:
   $00021A35B2FA
[FORMS.PP] ExceptionOccurred



The same installation process works fine under OpenBSD 5.8 32bit (i386)
version and lazarus works fine.


Probably because of glib2/gtk2 libs diff.
What's glib2 version ? What's gtk2 version ?

zeljko

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Thanks for reply Željko.

gtk+2 2.24.28
glib2 2.44.1

OpenBSD 5.8 AMD64
-rw-r--r--  1 0  016416767 Aug  9 05:48:06 2015 gtk+2-2.24.28.tgz
-rw-r--r--  1 0  0 8075667 Aug  9 05:47:28 2015 glib2-2.44.1.tgz

OpenBSD 5.8 i386:
-rw-r--r--  1 0  015912526 Aug  9 09:21:14 2015 gtk+2-2.24.28.tgz
-rw-r--r--  1 0  0 7786426 Aug  9 09:20:35 2015 glib2-2.44.1.tgz

Other OpenBSD package versions can be found here:
ftp://ftp.openbsd.org/pub/OpenBSD/5.8/packages/amd64/index.txt

32bit and 64 bit uses same version of gtk+2 and glib2.
Lazarus works fine under OpenBSD 5.8 32 bit.
But not under 64 bit version.

Regards,
TomazZ

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-26 Thread Tomaž Žveglič

On 26.10.2015 14:45, Mattias Gaertner wrote:

On Mon, 26 Oct 2015 14:35:21 +0100
Tomaž Žveglič <tomaz.zveg...@gmail.com> wrote:


OS: OpenBSD bsd 5.8 GENERIC#1170 amd64

lazarus was compiled using fpc 2.6.4:
[...]
When I run lazarus this error is displayed:

# ./lazarus

(lazarus:32495): GLib-GObject-CRITICAL **: g_object_unref: assertion
'G_IS_OBJECT (object)' failed

Please try starting it with
./lazarus --g-fatal-warnings

Also try compiling an IDE without extra packages:
gmake clean all
instead of "gmake clean bigide"

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Thanks Mattias for reply :)

-
# ./lazarus --g-fatal-warnings

(lazarus:27705): GLib-GObject-CRITICAL **: g_object_unref: assertion 
'G_IS_OBJECT (object)' failed

Trace/BPT trap (core dumped)
-

"gmake clean all" makes no difference, compilation was ok, but runing lazarus 
produces the same error.

Do you need lazarus.core (26MB) ? I can make download link of core file.


Regards,
TomazZ




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-26 Thread Tomaž Žveglič

On 26.10.2015 16:02, Zeljko wrote:





gtk+2 2.24.28
glib2 2.44.1


Can you start lazarus via gdb and send backtrace ?
Buld lazarus with -gl and
gdb ./lazarus
run
---crash
bt
 now copy backtrace here

zeljko

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
What do you mean by "Buld lazarus with -gl" did you mean "gmake clean 
all -gl"?



gdb ./lazarus
GNU gdb 6.3 ...
(gdb) run
Starting program: /root/lazarus/lazarus

Program received signal SIGBUS, Bus error.
0x0002954fe2fa in g_object_new ()
   from /usr/local/lib/libgobject-2.0.so.4200.1
Current language:  auto; currently c
(gdb) bt
#0  0x0002954fe2fa in g_object_new ()
   from /usr/local/lib/libgobject-2.0.so.4200.1
#1  0x0002f2a1a195 in gtk_adjustment_new ()
   from /usr/local/lib/libgtk-x11-2.0.so.2400.0
#2  0x0002f2b2071f in gtk_range_set_adjustment ()
   from /usr/local/lib/libgtk-x11-2.0.so.2400.0
#3  0x0002954fd46d in g_object_new_internal ()
   from /usr/local/lib/libgobject-2.0.so.4200.1
#4  0x0002954fdd45 in g_object_new_valist ()
   from /usr/local/lib/libgobject-2.0.so.4200.1
#5  0x0002954fe364 in g_object_new ()
   from /usr/local/lib/libgobject-2.0.so.4200.1
#6  0x00a1ca0e in GETSTYLEWITHNAME (
WNAME=0x19b6d08 "vertical scrollbar") at gtk2proc.inc:7860
#7  0x00a1c3d7 in GETSTYLE (ASTYLE=LGSVERTICALSCROLLBAR)
at gtk2proc.inc:7665
#8  0x009190de in INITSYSTEMCOLORS (this=0x27d04f650)
at gtk2widgetset.inc:2445
#9  0x00914149 in GTK2CREATE (this=0x27d04f650)
at gtk2widgetset.inc:1444
#10 0x009120c6 in CREATE (this=0x27d04f650, vmt=0x1906a60)
at gtk2widgetset.inc:974
#11 0x0076fbd1 in CREATEWIDGETSET (AWIDGETSETCLASS=0x1906a60)
---Type  to continue, or q  to quit---
at forms.pp:2066
#12 0x0076e190 in INTERFACES_init () at interfaces.pas:37
#13 0x0073fa3e in fpc_initializeunits ()
#14 0x in ?? ()
(gdb)


Regards,
TomazZ


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus