Recent

Author Topic: Not wishing to Cut Nose/Spite face.  (Read 37915 times)

munair

  • Hero Member
  • *****
  • Posts: 887
  • compiler developer @SharpBASIC
    • SharpBASIC
Re: Not wishing to Cut Nose/Spite face.
« Reply #15 on: April 11, 2015, 11:45:46 pm »
And to anyone else who is having problems creating desktop software with Lazarus, what are your problems? I haven't met any basic graphical interface task that isn't easily nicely doable with Lazarus. And with regards to professional looking layouts, it's all a matter of the designer/programmer and not the toolkit. If anything Lazarus makes it easier than any other tool to create superior looking and performing desktop software, mostly because Free Pascal and Lazarus make everything just so damn easy.
I fully agree. It is so easy to complain, yet with a bit of effort you can find many if not most of your issues here on this forum or elsewhere on the internet. Especially since Lazarus is largly compatible with Delphi, most Delphi examples/solutions work as well.
It's only logical.

munair

  • Hero Member
  • *****
  • Posts: 887
  • compiler developer @SharpBASIC
    • SharpBASIC
Re: Not wishing to Cut Nose/Spite face.
« Reply #16 on: April 11, 2015, 11:51:19 pm »
They hamper my productivity somewhat, but nothing to serious. I only have 3 serious problems that are showstoppers, time and time again:

Debugger, debugger and debugger.

Just 5 minutes ago, I ran a program that regularly throws econvertexception and I ignored the exception. The program hung itself in the IDE, while working fine from the cmdline.
Yep, debugger is not always of help when trying to find bugs.
It's only logical.

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Not wishing to Cut Nose/Spite face.
« Reply #17 on: April 11, 2015, 11:59:52 pm »
They hamper my productivity somewhat, but nothing to serious. I only have 3 serious problems that are showstoppers, time and time again:

Debugger, debugger and debugger.
marcov,

I wrote a simple tool to help with my debugging which I call "bugout" and it wasn't hard to create (less than 15 minutes).

Bugout is an external application which captures messages from your applications while they are being debugged, your applications while they run stand alone, or your your components/controls at design time while running inside Lazarus. This screenshot should explain everything:

http://codebot.org/snapshops/bugout.jpg

And this is another example of how easy it is to use Lazarus. If you have a rough edge, it's trivial to write your own tools to help smooth them out. Of course it's not perfect, but everyone has a world of options at their disposal which usually require a minor amount of imagination.
« Last Edit: April 12, 2015, 12:27:27 am by sysrpl »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12172
  • Debugger - SynEdit - and more
    • wiki
Re: Not wishing to Cut Nose/Spite face.
« Reply #18 on: April 12, 2015, 12:03:45 am »
I created a bug http://bugs.freepascal.org/view.php?id=27830

If you encounter other issues, create a small sample project, describe what to do, what happens, and what should happen.

munair

  • Hero Member
  • *****
  • Posts: 887
  • compiler developer @SharpBASIC
    • SharpBASIC
Re: Not wishing to Cut Nose/Spite face.
« Reply #19 on: April 12, 2015, 12:15:28 am »
@sysrpl, can bugout work in conjunction with gdb?
It's only logical.

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Not wishing to Cut Nose/Spite face.
« Reply #20 on: April 12, 2015, 12:22:56 am »
I created a bug http://bugs.freepascal.org/view.php?id=27830

If you encounter other issues, create a small sample project, describe what to do, what happens, and what should happen.
I solved that small bug in about 20 seconds by switching from Align to Anchors. I think this is a good example of where someone can get stumped when a solution with the exact same result is readily available, which goes back to "frequently the solutions are easier to implement than writing a post to a forum or mailing list."

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Not wishing to Cut Nose/Spite face.
« Reply #21 on: April 12, 2015, 12:24:31 am »
@sysrpl, can bugout work in conjunction with gdb?
I'm sure that redirecting output from gdb to bugout would be easy.

munair

  • Hero Member
  • *****
  • Posts: 887
  • compiler developer @SharpBASIC
    • SharpBASIC
Re: Not wishing to Cut Nose/Spite face.
« Reply #22 on: April 12, 2015, 12:29:03 am »
The problem I usually have with GDB is "cannot access memory" failing to show me the value of a variable. watchpoints are no good either.
« Last Edit: April 12, 2015, 12:31:30 am by Artie »
It's only logical.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12172
  • Debugger - SynEdit - and more
    • wiki
Re: Not wishing to Cut Nose/Spite face.
« Reply #23 on: April 12, 2015, 12:32:17 am »
The problem I usually have with GDB is "cannot access memory" failing

if this happens on SomeObject.FSomeValue thne this error often means that SomeObject has an invalid value (e.g. nil, or anything else that is not in your apps memory.)

TO discuss this further please open a new thread.

Also open a thread for bugOut. As it is no longer the original topic

MorbidFractal

  • Jr. Member
  • **
  • Posts: 97
Re: Not wishing to Cut Nose/Spite face.
« Reply #24 on: April 12, 2015, 08:31:03 am »
Actually the scrollbox example of yours fails in many ways (there is a range check error)

So yes scrollboxes are currently broken. And according to your project they have been or a while

Yes.. it also seems inconsistent. I was just looking under Project|Project Options|Compiler Options|Paths and it was behaving in exactly the same manner. Controls would expand with the scrollbox but remained expanded when the action was reversed. I was going to give it as an example but on checking a second time things started behaving themselves.

It is not my intention to moan too much. I do like it and I do appreciate the amount of work that must be involved in producing such a tool. Given I am a novice perhaps I should not be let loose on it and I continually hope that my mind might train itself to avoid doing silly things. It may well be the case that others do not come across  such problems or they have done in the past and subconsciously manage to avoid falling down the same holes. It is still the case that I do find problems that others have found and the reported solutions either do not work or are incomplete or poorly explained.

Let's go back to the 'Access Violation' on trying to save a file. You mentioned 'permissions' and they have been another bane of my life. It's one of the first things I look at when something like this happens but I do not believe that is the problem here.. then again it may be. Two pictures attached. I have started lazarus from the menu icon, not via a terminal. It has opened with the previous project and I go to save the present unit which I can or could do if I were to save it to the same folder it came from, first picture. However if I try to move to my home folder I get the access violation, second picture, the program locks itself and I have to force quit.

The same happens when I run startlazarus as the normal user from a terminal and also if I run from a terminal using sudo startlazarus. The problem goes away if I run from a terminal as root. Perhaps it is a permission issue.. however as a normal user I am only trying to save into my home folder and into directories that I own and have permission to use. The problem goes away if I use the file manager, Caja, to create a new directory and then copy the project files into the new directory and then open the .lpi file with Lazarus. At that stage I am allowed to save files back into that directory but, once again, if I try to save them anywhere else from within the program I get the access violation. Again I have seen others having the same problem with no apparent solution being forthcoming.

It is almost as if when being run as a normal user the program is acting as if it were someone else, a different user, and does not inherit the permissions of the person who started it but when run as root it gains the correct permissions?
« Last Edit: April 12, 2015, 08:33:20 am by MorbidFractal »

zeljko

  • Hero Member
  • *****
  • Posts: 1870
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Not wishing to Cut Nose/Spite face.
« Reply #25 on: April 12, 2015, 10:58:00 am »
@martin:
Quote
Just a note, there may still be an autosize issue with TScrollbox content, I came across that one myself recently. But I have not entirely checked, if it is anything I did or an actual bug.

See the bug yourself:
Maroon_Scrollbox -> align = alClient
>> Green_Scrollbox (in Maroon)-> align = alleft
>> >> Blue_Scrollbox (in Green)-> align = alTop
>> >> Yellow_Scrollbox (in Green)-> align = alClient  (ERROR)

And you opened an issue about it and attached example project there ?

Bart

  • Hero Member
  • *****
  • Posts: 5702
    • Bart en Mariska's Webstek
Re: Not wishing to Cut Nose/Spite face.
« Reply #26 on: April 12, 2015, 12:14:21 pm »
And you opened an issue about it and attached example project there ?

I guess: http://bugs.freepascal.org/view.php?id=27830.

Bart

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12706
  • FPC developer.
Re: Not wishing to Cut Nose/Spite face.
« Reply #27 on: April 12, 2015, 12:38:43 pm »
They hamper my productivity somewhat, but nothing to serious. I only have 3 serious problems that are showstoppers, time and time again:

Debugger, debugger and debugger.
marcov,

I wrote a simple tool to help with my debugging which I call "bugout" and it wasn't hard to create (less than 15 minutes).

I have various logging systems and know what outputdebugstring is. But that is not always as practical, since if the codepaths are complex to hunt down a bug it requires to add detail level logging to large parts of the application to find out flow and relevant variables, while with the debugger it is a work of two minutes.

Logging is an addition, not a substitute for a debugger.

munair

  • Hero Member
  • *****
  • Posts: 887
  • compiler developer @SharpBASIC
    • SharpBASIC
Re: Not wishing to Cut Nose/Spite face.
« Reply #28 on: April 12, 2015, 01:01:13 pm »
Actually the scrollbox example of yours fails in many ways (there is a range check error)

So yes scrollboxes are currently broken. And according to your project they have been or a while

It is almost as if when being run as a normal user the program is acting as if it were someone else, a different user, and does not inherit the permissions of the person who started it but when run as root it gains the correct permissions?
It sounds like Lazarus was installed as root on your system. This really shouldn't be. BTW, sudo will only be effective if you are added to the sudoer list. Debian does not do that by default. Ubuntu and Mint add you to that list by default if I remember correctly.
It's only logical.

MorbidFractal

  • Jr. Member
  • **
  • Posts: 97
Re: Not wishing to Cut Nose/Spite face.
« Reply #29 on: April 12, 2015, 01:21:22 pm »
It sounds like Lazarus was installed as root on your system. This really shouldn't be. BTW, sudo will only be effective if you are added to the sudoer list. Debian does not do that by default. Ubuntu and Mint add you to that list by default if I remember correctly.

Thanks.. I've just tried out 1.4RC3 and get the same behaviour. There was another quirk when I was trying to install LazOpenGLContext to the menu bar from Project|Project Inspector in that it was having access problems creating a backup directory under usr/share/lazarus/~~~, I can't remember the full path. Also whilst I thought I had fixed the -lGL issue it would seem I was mistaken. It has reared its ugly head again... usr/bin/ld can't find -lGL.

In respect of the program having problems with accessing /usr/share/lazarus~~~ root:root is listed as owner:group so I tried changing it to root:me but that did not help. I suppose I could try me:me but I'm wary of tinkering beneath the hood in case things blow up. I'm just about to go back and try 1.0.12

At the moment I am installing lazarus, fpc and fpc-src from .deb files using the GDebi Package Installer. I would not know if that would result in permission errors. Previously I used the Software Manage within Mint to install laz1.0.1 and fpc2.6.2 and that did not result in these problems however it is possible that I could have picked up something extra that made things gel because I went overboard and installed everything that looked like it was relevant.

You are right about Mint giving the default user sudoer rights.

After I've tried 1.0.12 then... if it results in the same problems I'll go back to the version from the Mint/Ubuntu repositories and see if there is an obvious difference. Not that I would be able to spot it if there was.

update 1.0.12 behaves in the same way but.. the Mint update manager woke up and decided to drag in a load of other stuff, 2.6.2-8 attached. Who am I to argue.

Oh dear....  :( That looks like there may be pain on the horizon.... MEH!
« Last Edit: April 12, 2015, 02:03:25 pm by MorbidFractal »

 

TinyPortal © 2005-2018