🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Setting M5Image source from network hangs the UI layer/thread when any kind of error occurs

    Bug Report
    1
    1
    1.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Toukokuu
      last edited by

      • Core 2
      • UIFlow 1.7.6

      if M5Image.set_network_img_src() call receives any kind of error it will hang the UI completely even if try..except is used. Setting image source, label text etc. will no longer work but all other code will continue to run in the background like timers or main loop.

      example:

      try:
        print("before")
        image0.set_network_img_src('http://192.168.1.100/someimage.png')
        print("after")
      except:
        print("except")
      

      will print 2 first but never the third "except print" when any kind of error happens (loading error comes delayed):

      before
      after
      lodepng_error: invalid ADLER32 encountered (checking ADLER32 can be disabled)
      

      You can test it by taking any .png and open it with a notepad and mess the contents to corrupt it. Then download it with set_network_img_src

      1 Reply Last reply Reply Quote 0
      • First post
        Last post