Recent

Author Topic: Common File Dialogs Have Been Broken for a Very Long Time (Ex: Ubuntu AARCH64)  (Read 25411 times)

msintle

  • Sr. Member
  • ****
  • Posts: 276
It really does feel like the matrix is glitching out for me, doesn't it?

I give up - the matrix wins :)

Edit: If you want to attach your script here, happy to give it one more go. If you want, I can attach mine too.

rvk

  • Hero Member
  • *****
  • Posts: 6663
Edit: If you want to attach your script here, happy to give it one more go. If you want, I can attach mine too.
Attached. Wonder if that works better. (oops. needed to zip that. forum doesn't support .sh)

I also put it on a git gist.
https://gist.githubusercontent.com/rvk01/542c008b41ded26817737dba597e9298/raw/714f3b3e49e21482c7e05da0f3e3f87d52a70482/lazarus_on_linux.sh

With wget you can get in into your directory:
Code: Bash  [Select][+][-]
  1. wget https://gist.githubusercontent.com/rvk01/542c008b41ded26817737dba597e9298/raw/714f3b3e49e21482c7e05da0f3e3f87d52a70482/lazarus_on_linux.sh

msintle

  • Sr. Member
  • ****
  • Posts: 276
Guess what, it's working with your ZIP file.

diff'ing both files on the command line produced a ton of output.

Loading both in text editor I can see the version I copied from the forum has some extra whitespace at the start of each line.

Really picky Linux, what can I say.

I'll let you know what happens to the actual build, thanks.

TRon

  • Hero Member
  • *****
  • Posts: 3982
Loading both in text editor I can see the version I copied from the forum has some extra whitespace at the start of each line.

Really picky Linux, what can I say.
That explains why the heredoc failed. Not really linux related rrather how heredoc works.
I do not have to remember anything anymore thanks to total-recall.

rvk

  • Hero Member
  • *****
  • Posts: 6663
Loading both in text editor I can see the version I copied from the forum has some extra whitespace at the start of each line.
I saw that too.
The forum adds a space for empty lines.
But I tested this and it still works for me.
More likely would be the linebreaks.
These need to be LF only in Linux.
Windows is CR+LF.
And Mac is CR.

So if you copy from Mac or Windows you get wrong linebreaks.

msintle

  • Sr. Member
  • ****
  • Posts: 276
My Parallels downgraded from v20 to v18 and its Parallels Tools integration failed at that point (since the VM's had earlier been upgraded to v20), so actually I wasn't able to copy anything over from macOS, but launched Firefox inside the Ubuntu VM directly, and copied from there.

I'm sure there's a reason why it failed, but at this level of "complexity" and failure frequency, the device is surely imitating some kind of malicious Skynet entity!

Anyways, now launching Lazarus (which required two modifications to the .desktop file - first to make it executable, then to allow launching it [oddly enough that latter step is new to me]), it insists it cannot find FPC sources.

I had logged off before trying, and I did reboot after the first launch refusal just for good measure.

msintle

  • Sr. Member
  • ****
  • Posts: 276
Ingoring the FPC source pleading, I can see all file dialogs - and setting dialogs - work properly in Lazarus now; that's a first for aarch64 ubuntu indeed.

Notwithstanding the fact that I was incapable of running a darn shell script properly, thus setting a very low bar on my future prospects; would anyone understand why the workaround code doesn't succeed 100% when called during one of the startup unit's initialization routine, but does succeed when called from the proper widget initialization place?

Please consider it a rhetorical question of sorts at least ;)

Thanks again, everyone.

rvk

  • Hero Member
  • *****
  • Posts: 6663
Anyways, now launching Lazarus (which required two modifications to the .desktop file - first to make it executable, then to allow launching it [oddly enough that latter step is new to me]), it insists it cannot find FPC sources.
Last time I tried it was enhough for me to just right click and choose make it launchable (or something). Not finding the source could be that you need to loggoff before starting the program. But yes... That part isn't perfected. I often need to choose fpc executable and the fpc directory to get therl config correct. Luckily a one time thing (if you don't reinstall each day ;) ).

msintle

  • Sr. Member
  • ****
  • Posts: 276
You know what the default FPC source installation folder is?

msintle

  • Sr. Member
  • ****
  • Posts: 276
BTW package installations work fine, so somehow it can find some sources, apparently.

Even the glitches in the matrix are themselves glitchy, it seems like. :D

rvk

  • Hero Member
  • *****
  • Posts: 6663
You know what the default FPC source installation folder is?
You need the one that's just installed/copied.

So the one in the home directory subfolder dev/fpc.

msintle

  • Sr. Member
  • ****
  • Posts: 276
Cool, will add that in.

I just compiled my app with this latest Lazarus version, and it no longer freaks out (read: instantly crashes) when I cancel out of certain dialogs.

What does this tell us about our overall research here?

rvk

  • Hero Member
  • *****
  • Posts: 6663
Cool, will add that in.
I normally need to provide the fpc executable and the path to fpc.
I do that with the browse button.

What does this tell us about our overall research here?
It tells is that the fix from last week in trunk is working :)

msintle

  • Sr. Member
  • ****
  • Posts: 276
What does this tell us about our overall research here?
It tells is that the fix from last week in trunk is working :)

Right, but how come just calling the same fix code had no effect when I called it in the initialization of one of my core units? This had fixed the common file dialog bugs successfully.

rvk

  • Hero Member
  • *****
  • Posts: 6663
Right, but how come just calling the same fix code had no effect when I called it in the initialization of one of my core units?
This had fixed the common file dialog bugs successfully.
You mean it did work in the initialization or it didn't work?

The code for masking the exception already existed for intel machines. It just wasn't present on aarch64 (because nobody ever got a problem there).

 

TinyPortal © 2005-2018