FMX.Browser.Linux - Segmentation fault (11)

Issue #250 new
Pavel B created an issue

I receive Segmentation fault (11) or empty URL (TLinuxWebBrowserService(Data).FURL)

procedure FmuxLoadFinished(Data: Pointer); cdecl;
begin
TLinuxWebBrowserService(Data).FURL := FmuxWebViewGetUrl(TLinuxWebBrowserService(Data).FWebView); ← here
TLinuxWebBrowserService(Data).FWebControl.FinishLoading;
end;

It looks like FWebView is allways 0x3 for any project

{<System.TInterfacedObject> = {<System.TObject> = {}, FRefCount = -11056}, FURL = '', FWebControl = 0x27d57e0, FWebView = 0x3}

Just drop on a form a TWebBrowser component, one button and navigate on click for example to https://www.google.com

Thank you
Pavel

Comments (10)

  1. Pavel B reporter

    Sydney 10.4.1

    Also some hints/warnings

    [DCC Warning] FMX.Platform.Linux.pas(62): W1000 Symbol 'MessageDialog' is deprecated: 'Use FMX.DialogService methods'
    [DCC Warning] FMX.Platform.Linux.pas(62): W1000 Symbol 'MessageDialog' is deprecated: 'Use FMX.DialogService methods'
    [DCC Warning] FMX.Platform.Linux.pas(62): W1000 Symbol 'InputQuery' is deprecated: 'Use FMX.DialogService methods'
    [DCC Warning] FMX.Platform.Linux.pas(62): W1000 Symbol 'InputQuery' is deprecated: 'Use FMX.DialogService methods'
    [DCC Warning] FMX.Platform.Linux.pas(62): W1000 Symbol 'GetWindowScale' is deprecated
    [DCC Warning] FMX.Platform.Linux.pas(212): W1000 Symbol 'GetWindowScale' is deprecated
    [DCC Hint] FMX.Platform.Linux.pas(366): H2077 Value assigned to 'Handled' never used
    [DCC Warning] FMX.Media.Linux.pas(108): W1020 Constructing instance of 'TLinuxVideoCaptureDevice' containing abstract method 'TVideoCaptureDevice.GetCaptureSetting'
    [DCC Warning] FMX.Media.Linux.pas(108): W1020 Constructing instance of 'TLinuxVideoCaptureDevice' containing abstract method 'TVideoCaptureDevice.DoSetCaptureSetting'
    [DCC Warning] FMX.Media.Linux.pas(108): W1020 Constructing instance of 'TLinuxVideoCaptureDevice' containing abstract method 'TVideoCaptureDevice.DoGetAvailableCaptureSettings'

  2. Pavel B reporter

    GetIt

    const
    ResName = 'fmux';
    LibName = 'libfmux';
    LibVer = '1.51';
    LibRev = '$Rev: 698 $';

    Ubuntu 20.4 (target) + Windows 10

  3. Eugene Kryukov repo owner

    Checked GetIt version - works fine.

    Can you please do following on your Linux machine:

    1. Delete ~/.fmxlinux folder
    2. Run your application
    3. Check ~/.fmxlinux folder - what FmxLinux runtime lib version inside (should be libfmux-1.51.so)

  4. Eugene Kryukov repo owner

    That really weird. It works fine and we don’t get any other similar reports. Looks you the problem in your side - we added new property to TLinuxWebBrowserService and that why FWebView property may wrong. So, looks like your app uses wrong dcu or sources.

    Did you do any changes in our sources ?

    Can you try WebBrowser with new project ?

  5. Pavel B reporter

    After spending A LOT OF TIME I have found that it depends on URL
    for the first case when URL was url:=url+'?'+System.string.Join('&',parts1); i have received Segmentation fault (11)
    if I have doubled the parameters url:=url+'?'+System.string.Join('&',parts1)+'&'+System.string.Join('&',parts1);
    I do not receive any error. In fact there is only one parameter that make problems “redirect_uri=http%3A%2F%2F127.0.0.1%3A9888%2F”
    if I put this paramater 2 times in URL I do not receive Segmentation fault (11)

    I have no idea why.

    The app is cross platform and only in LINUX has this problem. ON MacOS64, Android, Windows its OK

    Thank you.

  6. Log in to comment