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

SfPopupLayout - Java.Lang.IllegalArgumentException

Hi, 
I have a problem with reopening SfPopupLayout on Android (iOS is OK). After quick open and close popup several times in a row I get error: "Java.Lang.IllegalArgumentException: 'width and height must be > 0" 
Some devices work fine but some are witch error and application fall after reopening popup. (For example: Huawei P10 (android 9) - OK, Xiaomi, Redmi 4 (android 6) - ERROR, simulator (as attached picture)- ERROR). Please how to solve this problem? (I Attached notes with my codes).
Next question:
I can´t find a way how (and where) to write "try" "catch" in this case.

Thank you

Attachment: SfPopupLayoutCode_a215d768.zip

5 Replies

BS Balasubramani Sundaram Syncfusion Team October 22, 2019 03:03 PM UTC

Hi Tomas,  
 
Thank you for contacting Syncfusion support.   
 
Based on your provided code snippet we have analyzed the issue “Java.Lang.IllegalArgumentException”. Due to the unavailability of the specified device as you have mentioned so we have checked the issue with similar device Huawei 9N and Redmi Note 4 in that we have performed a continues open and close the popup as much but we could not able to replicate the issue in our end. Meanwhile, we also configure the simulator as you have mentioned in the image to check the issue. 
 
Please refer the sample and video, 
 
 
 
Note: Issue has been checked with Xamarin. Forms version 3.6.0.344 and Syncfusion NuGet version 17.3.0.14 
    
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us with the more details, so that it will be helpful for us to check on it and provide you the solution at the earliest.    
   
Regards,   
Balasubramani Sundaram   
 



TT Tomas Turek October 31, 2019 10:51 AM UTC

Thank you for your reply and sample.
Your provided code seems to be the same as mine.

Unfortunately, after a few more hours of investigation, I think that I found a place where the error occurs. In my project (on login page I call method to switch color theme mode of syncfusion component). I use your code from your documentation. If I switch theme on start app  -> then after quick open and close popup several times in a row I get error: "Java.Lang.IllegalArgumentException: 'width and height must be > 0" . I got this message from all opening popup (DataGrid row click, after Button click, ListView item click,....). 

I updated your sample (I place call method "ChooseThemeMode" into App).

How to solve it?





Attachment: Popup_Error_eb702099.zip


KK Karthikraja Kalaimani Syncfusion Team November 1, 2019 02:35 PM UTC

Hi Tomas,

Thanks for the update. 
 
We have checked the attached sample and we can able to reproduce the reported issue “java.Lang.IllegalArgumentException : ‘Width and Height’ must be > 0 Exception occurs while opening the popup”  from our side. Currently, we are validating the issue in both sample and source level. We will update you the details on 4th November 2019.We appreciate your patience until then. 
 
Regards,
Karthik Raja



KK Karthikraja Kalaimani Syncfusion Team November 4, 2019 12:52 PM UTC

Hi Tomas,

Thanks for your patience.

We have checked the reported issue “java.Lang.IllegalArgumentException : ‘Width and Height’ must be > 0 Exception occurs while opening the popup” and we have logged the bug report the same. We will fix this issue and include the issue fix in our upcoming weekly nuget which is scheduled on 19th November 2019.  We appreciate your patience until then. 
 
You can also track the status of the report in below feedback link 
 

Regards,
Karthik Raja 



KK Karthikraja Kalaimani Syncfusion Team November 19, 2019 09:05 AM UTC

Hi Tomas, 
Thanks for your patience.      
We have fixed this issue “Java.Lang.IllegalArgumentException occurs while opening the popup when ShowCloseButton is false” and included in our Weekly NuGet 17.3.0.28, which is available for download now.   
   
Please let us know if you require further other assistance from us.   
   
Regards,
Karthik Raja 


Loader.
Live Chat Icon For mobile
Up arrow icon