We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

When change the ToolbarOptions in XAML file, I have a problem

Hi,

I changed my XAML file because I need reduce the number of options to my cliente in SfRichTextEditor.

So, I changed to this: 

 <StackLayout Grid.Row="2">
                                <richtexteditor:SfRichTextEditor x:Name="edtPrescricao" VerticalOptions="FillAndExpand" ToolbarOptions="Bold,FontColor,NumberList"
                                                                 Text=""
                                                                 BackgroundColor="#ffffff" />
                            </StackLayout>


When I call the page and when I click in the component to write, the stack tracer send me the error:

  at Syncfusion.XForms.iOS.RichTextEditor.SfToolbar.UpdateToolBar (Syncfusion.XForms.RichTextEditor.SfToolbarStatus toolbarStatus) [0x00006] in <74bdba3b822041c58c766ede3d0eecc6>:0 
  at Syncfusion.XForms.iOS.RichTextEditor.SfRichTextEditorRendererExt.DidReceiveScriptMessage (WebKit.WKUserContentController userContentController, WebKit.WKScriptMessage message) [0x001ca] in <74bdba3b822041c58c766ede3d0eecc6>:0 
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.14.0.114/src/Xamarin.iOS/UIKit/UIApplication.cs:86 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.14.0.114/src/Xamarin.iOS/UIKit/UIApplication.cs:65 
  at e_Beauty.iOS.Application.Main (System.String[] args) [0x00001] in /Users/henriquequeirozdrumond/e-Beauty2/e_Beauty.iOS/Main.cs:18 

What's problem? Thanks


13 Replies

DS Devaraj Sekar Syncfusion Team December 4, 2019 11:13 AM UTC

Hi Henrique, 
  
Thank you for contacting Syncfusion support. 
  
We were able to reproduce the mentioned issue and we are analyzing on this issue, will update you further details on 5th December 2019. 
  
Regards, 
Devaraj S 



DS Devaraj Sekar Syncfusion Team December 5, 2019 04:21 AM UTC

Hi Henrique, 
  
Thank you for the patience. 
  
The reported issue has been fixed and updated in the latest NuGet version (17.3.0.33), which can be downloaded from the below mentioned link. 
  
  
Kindly, let us know if you require any further assistance. 
  
Regards, 
Devaraj S


HE Henrique December 11, 2019 01:03 PM UTC

Devaraj,

After update, this error not occursed again . Tks a lot.


DS Devaraj Sekar Syncfusion Team December 12, 2019 05:30 AM UTC

Hi Henrique, 
  
Thank you for the update. 
  
We are glad that the issue has resolved. Kindly, let us know if you require any further assistance. 
  
Regards, 
Devaraj S 



JA Javan April 16, 2021 01:54 AM UTC

Looks like this error is back in iOS

XAML:
<richTextEditor:SfRichTextEditor 
     x:Name="editorEntryBody"
ToolbarPosition="Top"
     ToolbarOptions="Bold,Italic,Underline,BulletList,NumberList"
     TextChanged="EditorEntryBody_TextChanged"
     FormatChanged="EditorEntryBody_FormatChanged"
     AutoSize="TextChanges"
Padding="5,10"
DefaultFontSize="{StaticResource bodyTextFontSize}"
PlaceHolder="{x:Static resx:InterfaceStrings.placeholder_LifeEntry_Body}"
HtmlText="{Binding HtmlBodyText, Mode=OneTime}" />


ERROR:
Object reference not set to an instance of an object

STACK TRACE:
  at Syncfusion.XForms.iOS.RichTextEditor.SfToolbar.UpdateFontFamily (System.String fontname) [0x0003e] in <736461ce2e8c4b1cbe97508ca627e04b>:0 
  at Syncfusion.XForms.iOS.RichTextEditor.SfToolbar.UpdateToolBar (Syncfusion.XForms.RichTextEditor.SfToolbarStatus toolbarStatus) [0x000d8] in <736461ce2e8c4b1cbe97508ca627e04b>:0 
  at Syncfusion.XForms.iOS.RichTextEditor.SfRichTextEditorRendererExt+<>c__DisplayClass59_2.<DidReceiveScriptMessage>b__1 () [0x00018] in <736461ce2e8c4b1cbe97508ca627e04b>:0 
  at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSAction.cs:152 
--- End of stack trace from previous location where exception was thrown ---

  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:86 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:65 
  at LifeCloud.iOS.Application.Main (System.String[] args) [0x00001] in C:\Projects\Lifecloud\LifeCloud\LifeCloud.iOS\Main.cs:17 


DS Devaraj Sekar Syncfusion Team April 16, 2021 03:49 AM UTC

Hi Henrique, 
Thank you for contacting Syncfusion support. 
The reported issue with has been fixed and included in our upcoming weekly NuGet package, which is estimated to be available on 20th April 2021 tentatively. 
The custom NuGet for the same fix can be downloaded from the below link. 
Custom NuGet link: NuGet Link 
Regards, 
Devaraj S 



DS Devaraj Sekar Syncfusion Team April 20, 2021 10:30 AM UTC

Hi Team, 
Thank you for the patience. 
The reported issue with has been fixed and included in our latest NuGet release version “19.1.0.57”, which can be downloaded from the below link. 
Regards, 
Devaraj S 



DA Dr. Arno Pernozzoli April 27, 2021 10:34 AM UTC

Hi,

the problem seems to persist in 19.1.0.58 for iOS.
When ToolbarOptions is set either in XAML or code behind, an exception is thrown, see here an excerpt to better locate the issue:
  at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/Common/src/CoreLib/System/Collections/Generic/List.cs:161 
  at Syncfusion.XForms.iOS.RichTextEditor.SfToolbar.SetNativeToolbarItemsFrame () [0x00010] in <83608ada74b348d7988c8785aeb29530>:0 
  at Syncfusion.XForms.iOS.RichTextEditor.SfToolbar.UpdateChildrenFrame (CoreGraphics.CGRect rect) [0x0000f] in <83608ada74b348d7988c8785aeb29530>:0

Regards
Arno


GR Gayathri Ramalingam Syncfusion Team April 28, 2021 06:49 AM UTC

Hi Arno 
 
We tried to reproduce the issue “Exception occurs while customizing toolbaroptionusing SfRichTextEditor in Xamarin.Forms.iOS in 19.1.0.58, but it is working fine as expected.  
  
We have created a simple sample based on the provided information and the sample can be downloaded from the below link.  
  
  
Kindly provide the following details to investigate further on this issue.   
1.      Modify / Simple sample with which the issue could be reproduced. 
2.      Replication procedure to reproduce the issue or screen shot illustrating the issue. 
3.      SfRichTextEditor version. 
The above details will be more helpful for us to reproduce the issue in our side and assist you with the better solution at the earliest.   
 
 
With Regards, 
Gayathri R 
 
 
 



DA Dr. Arno Pernozzoli April 30, 2021 09:15 AM UTC

Hi,

pls. find attached the sample to reproduce the problem.
The issue occurs when using two editors in one view, the one with toolbar disabled, the other with custom ToolbarOptions.
I have a rather more complex scenario, where read-only RtfEditors without a toolbar are showing notes for different entries but in the end this was the root cause for the issue.

Regards
Arno

Attachment: ToolbarRTE1172888999_ba679043.zip


GR Gayathri Ramalingam Syncfusion Team May 3, 2021 04:52 AM UTC

Hi Arno, 
 
We were able to reproduce the issue “ArgumentOutOfRangeException exception occurs while using more than one SfRichTextEditor in single view" in Xamarin.Forms.iOS in our side and we suspect this to be a defect. We have forwarded this issue to our development team for further analysis and we will update further details by 06-May-2021.  
  
With Regards,  
Gayathri R  
 



GR Gayathri Ramalingam Syncfusion Team May 6, 2021 11:45 AM UTC

Hi Arno,

 

Thank you for using Syncfusion products.
 
 
We confirmed that the issue with “ArgumentOutOfRangeException exception occurs while using more than one SfRichTextEditor in single view” is a defect and we have logged a defect report. The fix for this issue is estimated to be available on May 27th 2021 
 

 
With Regards, 
Gayathri R 
 
 



GR Gayathri Ramalingam Syncfusion Team May 27, 2021 07:03 AM UTC

Hi Arno,

The issue with "
ArgumentOutOfRangeException exception occurs while using more than one SfRichTextEditor in single view" has been fixed and the patch for this fix can be downloaded from the following location. 

Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location: 
 

Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location:
  
  
NuGet:  

Assembly Version: 19.1.0.63
Installation Directions : 
This patch should replace the files “Syncfusion.SfRichTextEditor.XForms.dll and Syncfusion.SfRichTextEditor.XForms.iOS.dll” under the following folder.
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.5.1
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\9.3.0.61\precompiledassemblies\9.3.0.61\4.0

To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.

Note : 
You can change how you receive bug fixes by navigating to the following link and updating your preferences.
  
   
Kindly follow the steps to clear the NuGet cache and then install patched NuGet again to get this issue resolved.     
   
  
Disclaimer: 
Please note that we have created this patch for version 19.1.0.63 specifically to resolve the following issue(s) reported in this/the Forum(s). 149626

If you have received other patches for the same version for other products, please apply all patches in the order received.
This fix will be included in our Vol 2 Main release which will be available in June 2021.

Regards,
 
 
Gayathri R  
  
 


Loader.
Live Chat Icon For mobile
Up arrow icon