Recent

Author Topic: Erro installing lazdaemon  (Read 2926 times)

almp1

  • New Member
  • *
  • Posts: 13
Erro installing lazdaemon
« on: March 16, 2017, 04:17:19 pm »
Hello friends,

I am installing lazdaemon component V09.9 on my Linux CentOS 64bits.
The Lazarus version is 1.6.4 and the FPC is 3.0.2

But the message below is displayed and the component is not installed

Code: Pascal  [Select][+][-]
  1. TApplication.HandleException Access violation
  2.   Stack trace:
  3.   $0000000000000000
  4.   $00000000006A7E6E line 67 of include/toolbutton.inc
  5.   $00000000006A7DEC line 106 of include/toolbutton.inc
  6.   $0000000000666EDE line 2159 of include/control.inc
  7.   $0000000000667381 line 2286 of include/control.inc
  8.   $00000000004334EF
  9.   $0000000000665596 line 1448 of include/control.inc
  10.   $00000000006585EC line 4714 of include/wincontrol.inc
  11.   $0000000000659C77 line 5334 of include/wincontrol.inc
  12.   $00000000007233BC line 106 of lclmessageglue.pas
  13.   $00000000006E4DE1 line 3623 of gtk2/gtk2proc.inc
  14.   $00000000006F3B50 line 2225 of gtk2/gtk2callback.inc
  15.   $00000000006F31C8
  16.   $00007F47DC5FB32C
  17. Exception at 0000000000000000: EAccessViolation:
  18. Access violation.
  19.  
  20. (lazarus:4281): GLib-GObject-CRITICAL **: g_object_get_data: assertion 'G_IS_OBJECT (object)' failed
  21. TApplication.HandleException Access violation
  22.   Stack trace:
  23.   $00000000004333E8
  24.   $00000000006F322E line 1920 of gtk2/gtk2callback.inc
  25.   $00007F47DC5FB32C
  26. Exception at 00000000004333E8: EAccessViolation:
  27. Access violation.
  28. LAZARUS END - cleaning up ...
  29. [FORMS.PP] ExceptionOccurred
  30.   Sender=EAccessViolation
  31.   Exception=Access violation
  32.   Stack trace:
  33.   $00007F47DBFC2E68
  34. TApplication.HandleException Access violation
  35.   Stack trace:
  36.   $00007F47DBFC2E68
  37. Exception at 00007F47DBFC2E68: EAccessViolation:
  38. Access violation.
  39.  

Thanks for the help

guest58172

  • Guest
Re: Erro installing lazdaemon
« Reply #1 on: March 16, 2017, 05:26:27 pm »
I'm also on a linux x86_64 and I can setup it without problem.

The stack trace is very strange:
- line 67 in toolbutton is a FillChar that shouldn't fail (it fills a stack allocated record):

Code: Pascal  [Select][+][-]
  1. FillChar({%H-}msg, SizeOf(msg), 0);

- line 106 does some set operations. I don't see how it leads to line 67 !!

Code: Pascal  [Select][+][-]
  1. (Style = tbsDropDown) and (tbfArrowPressed in NewFlags)) and

Are you sure that your install is clean ?

guest58172

  • Guest
Re: Erro installing lazdaemon
« Reply #2 on: March 16, 2017, 05:33:21 pm »
Also it's no a component that's displayed in the palette. It stands in the list displayed after clicking  File/New...

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: Erro installing lazdaemon
« Reply #3 on: March 16, 2017, 09:10:19 pm »
I'm also on a linux x86_64 and I can setup it without problem.

The stack trace is very strange:
- line 67 in toolbutton is a FillChar that shouldn't fail (it fills a stack allocated record):

Code: Pascal  [Select][+][-]
  1. FillChar({%H-}msg, SizeOf(msg), 0);

- line 106 does some set operations. I don't see how it leads to line 67 !!

Code: Pascal  [Select][+][-]
  1. (Style = tbsDropDown) and (tbfArrowPressed in NewFlags)) and

Are you sure that your install is clean ?
Serious? ({%H-}? You mean{$H-}That would be a mutilation of the shortstring and will cause that behavior.
The fiilchar should start from @s[1]^ in {$H-}, Or is this one of those silly IDE macro's?

Either way, if you mean a shortstring, you now know why it fails....

Anyway. That kind of code is really prehistoric. Write:
Code: Pascal  [Select][+][-]
  1. msg :=  Default(Shortstring);// will probably also fail in your case, but at least you have 255 bytes to play with
  2.  
And sizeof(msg) is the pointer size. You probably mean Length(msg)....
Anyway, you need a Pchar, and a shortstring isn't going to help very much. Use a normal {$H+} string of sufficient length and cast it to PChar.
« Last Edit: March 16, 2017, 09:29:19 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

guest58172

  • Guest
Re: Erro installing lazdaemon
« Reply #4 on: March 16, 2017, 09:30:11 pm »
Funnily enough, this is not my code at all, I've copied the lines indicated by the stack trace from the OP !

Look at the file, look at the lines. You'll see that there's something not quite right in the report...

https://github.com/alrieckert/lazarus/blob/master/lcl/include/toolbutton.inc#L67
https://github.com/alrieckert/lazarus/blob/master/lcl/include/toolbutton.inc#L108

Edit: L108 is like L106 for 1.6.4...unfortunately the mirror doesn't have tags.

 

TinyPortal © 2005-2018