Forum > Designer

Designer Unstable (macOS High Sierra) 2.0.0RC3 - Which Version to Use?

(1/2) > >>

kevin.black:
Hi,

I'm new to Lazarus (years ago), now moving from Delphi (10.2.3) with no 64bit macOS Support. I have some general stability issues and particularly the way the designer behaves.
Lazarus 2.0.0RC3
FPC 3.0.4
High Sierra 10.13.6 (Parallels VM)
x86_64 - Cocoa

When I try to use the designer, the form is offset (ie. there is a blank at the top). I need to resize the form very large and back, but resizing often garbles the form. Objects, like buttons, on the form disappear and reappear fairly randomly. If I click a button event (and the code isn't there) instead of getting a blank procedure I'm getting an AV and if there is code there, most of the time Lazarus hanging and I have two force quit. There are other issues that seem to randomly cause the IDE to disappear with me losing the unsaved work to-date. The attached images show the initial form - no buttons visible, the form after enlarging - buttons visible, but top of form still gacked (tech term) and finally the onClick event that, when clicked, causes Lazarus to freeze requiring force quit.

I have reinstalled FPC Source/FPC/Lazarus.

So my question is more Which combination of FPC/Lazarus/Widgetset should I use for best stability? Rather than spending several hours fixing these (probably complicated) issues if that makes sense.

I've been told by member zeljko to use QT5 (not the latest version, but this seems like a bit of ducking around although it's the next cab off the rank) and by member wallaby to use fpcupdeluxe (using say Lazarus 2 Fixes and FPC 3.2 fixes (I tried trunk and that failed after an hour or so, as did some other combinations).

UPDATE: FPCUPDeluxe with FPC 3.2 fixes and lazarus 2 fixes just installed successfully on macOS, I am installing cross-compile for x86_65 Windows.

Look I know lazarus/FPC is free, I have always been amazed at the effort that goes into this product. I also know that macOS is never the most popular development environment (although there is much ado in the Delphi environment WRT macOS development, it's pretty much an afterthought and (almost) nobody knows anything about it - including me), but I need something that is stable enough to actually do some development work without being a full time systems administrator of a macOS VM running Lazarus.

General question (and I have zeljko's advice WRT QT5): For development work (x64 macOS/darwin) what's about the best for stability and fixes?

My options are:

* 2.0.0RC3
* Some base version like 2.0.0RC with QT5
* FPCUPDeluxe, but with what? - as noted I am now trying Lazarus 2 Fixes/FPC3.2 Fixes
* Something else?
Ideally I'd like it to be easy to maintain and as stable as possible noting that I will be taking Delphi code (Apps and DLLs/DYLIBS VCL and FMX) and trying to convert to x86_64 Darwin?

Thanks for reading.....

dbannon:
Kevin, I assume you are using a cocoa version of the IDE ?  The IDE is a very severe test of Cocoa's progress.

I build a (fixes_2_0) 32bit Carbon IDE and set it to build 64bit Cocoa applications. Its trivial and resulting product is indistinguishable from the one made by a 64bit Cocoa IDE. This may sound like a bit of a cope out but it works for me !

(In practice, I do almost all development on Linux and only really use that Mac 32bit Fixes IDE when chasing a Mac specific issue but I am still sure I don't see any of the issues you mention.)

Probably also worth mentioning that you should consider logging bug reports for the issues you see, not just avoid them (like I do  :-[ ) ....

Davo

kevin.black:
Davo,

Thanks for the reply. No, it is i386-carbon, but that's by accident not design, I have not even thought about building the IDE as either 32 or 64 bit, thanks for the heads-up. I have an FPCUPDeluxe install as well, it is definitely x86-64-darwin-cocoa. The trunk trunk would not build, but fixes 3.2/fixes 2 does. I will reinstall that with i386 carbon if I can.

I omitted to say I used this to anchor the IDE like Delphi:

https://github.com/FlKo/LazarusDockedDesktops#how-to-install

TBF, if I use the IDE NOT anchored, I do not get the same (errant) behaviour when using the form designer. So logically something in the anchoring is what is causing that strange behaviour (I didn't think to test).

WRT reporting bugs, I am loathe to do that at the moment because I don't know if what I am seeing is because of my incompetence, expected behaviour or actually a bug. At least posting to the forum I get experts like you pointing out my shortcomings (in a nice way).

And this is just to give some idea of the sorts of issues I'm experiencing: I am porting over a DYLIB and test code from Delphi. The DYLIB uses TMS FMX Cloud Pack (now TMS LCL Cloud Pack) and they are similar, but not the same (the LCL version was last updated September 2016 so TMS are not interested and they certainly have no interest if I put any of their functions in a DYLIB - what were you thinking?). Anyway TL;DR, when converting the FMX code, changing, trying a build, the Lazarus IDE just goes away, ie. I'm in the middle of something and then nothing. restart the IDE and do a bit more, IDE goes away (I haven't documented exactly what I was doing, I will).

Last but not least (and macOS/carbon/Cocoa not my area of expertise), a couple of environment questions:
1.  Could I develop/build as a i386/Carbon App/DYLIB and then simply rebuild in x86_64/Cocoa when I have said software sort of working, is that viable?
2.  You say you develop on Linux and use only the MAC IDE for mac specific stuff, since OSX is essentially unix/linux, is it feasible to develop on Linux for an OSX app and using the $IFDEF UNIX rather than $IFDEF DARWIN, would the code then port to OSX (other than OSX specific functions)?

Thanks for sticking with me, your advice has given me many things to try.

Kevin

dbannon:
OK Kevin, maybe some thoughts ....

I don't use docking so no real help there.

Do I understand you are (forced to) using the FMX LCL that is based on LCL of a couple of years ago ?  Thats almost certainly going to end in tears I'm afraid. The Lazaras Devs have made huge strides with Cocoa LCL in that time, you really want to use the new stuff !

Have your code build 32bit carbon / 64bit cocoa at flick of a switch ? Yes, nominally. Thats what Lazarus is all about. However, in practice, there is, especially with Cocoa at the moment, always a few fine grained "got'ch" you will need to pick up and revise. maybe just doing something differently will work on all platforms, maybe you'll need the occasional $ifdef   But do try it !

Not sure exactly what you mean with second question. Between Linux and Mac, code will always need recompile and cross compiling to a Mac from Linux has proven beyond me at least. Most code just works with a recompile, things like keyboard shortcuts need ifdefs because the Mac uses different keys. A couple of other things ....

When it comes to using ifdef DARWIN or UNIX, its a case by case thing. My code has 14 DARWINs and only two UNIXs but your mileage will most certainly vary !

Davo


kevin.black:
Hi Davo,


--- Quote ---Do I understand you are (forced to) using the FMX LCL that is based on LCL of a couple of years ago ?  Thats almost certainly going to end in tears I'm afraid. The Lazaras Devs have made huge strides with Cocoa LCL in that time, you really want to use the new stuff !
--- End quote ---

TMS have a cloud pack (in my case it's for Dropbox) that we have Delphi code for. We have abstracted all of the cloud access functions into a DLL/DYLIB so that other software can access them (ie. C++ objective C etc). The port from FMX to LCL requires those (paid for) libraries. Of course we are not 'forced' to use them, but rewriting that code where we now just make a single call would be daunting. For example, the Oauth2 connection is this code (after I have set some basic properties):


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---TFMSDropboxComponent.DoConnect;
That's it. The default browser window pops etc etc. There are but in callbacks fo onConnect, onConnectionrefused, onTokenreceivd etc etc - no coding required on my part. So you can see what I'd be rather loathe to have to code all of this.  Since I have the TMS source, I also use their JSON processing functions because, well, they were there. Maybe the FMX code could be ported. I will ask if there is an update to their LCL codebase.

The last update of the FMX libraries was January 2019. The last update of the FCL libraries was September 2016. Are you suggesting, and I think you are, the likelihood of those libraries working with Cocoa in particular is pretty slim?


--- Quote ---Have your code build 32bit carbon / 64bit cocoa at flick of a switch ? Yes, nominally. Thats what Lazarus is all about. However, in practice, there is, especially with Cocoa at the moment, always a few fine grained "got'ch" you will need to pick up and revise. maybe just doing something differently will work on all platforms, maybe you'll need the occasional $ifdef   But do try it !
--- End quote ---

OK that's good news. I do not think I'm doing any cocoa specific 'stuff', but I do not know enough to be confident making that statement. As you say, just try it...


--- Quote ---When it comes to using ifdef DARWIN or UNIX, its a case by case thing. My code has 14 DARWINs and only two UNIXs but your mileage will most certainly vary !
--- End quote ---

Sorry, badly worded. The question was really is Darwin and Unix interchangeable. Clearly not, you have 14 darwin and 2 Unix IFDEFs.

So on a UNIX/Linux system running say UBUBTU will $IFDEF DARWIN code be executed?

and the corollary, on a macOS system running say High Sierra, will $IFDEF UNIX code be executed?

I am unsure when to use. Are they mutually exclusive like $IFDEF DARWIN vs $IFDEF MSWINDOWS?

Thanks again for the reply, although I am somewhat more depressed WRT LCL Cloud Pack. On the plus side I have successfully installed the package (after some degree of stuffing around). I am now trying to run their demos (and as I said, TMS have never tried nor do they have any interest in using their code in a DLL/DYLIB - sad really).

Kevin

Navigation

[0] Message Index

[#] Next page

Go to full version