iOS Question iSVG Library Error

Mike1970

Well-Known Member
Licensed User
Hi everyone, i'm coding an app for iOS, i always tried with my iPhoneXR
Now i tried to run the same app on iPad and it crashes on loading an SVG File.


B4X:
*** Assertion failure in +[SVGLength pixelsPerInchForCurrentDevice], /Users/b4j/Downloads/SVGKit-2.x/Source/DOM classes/SVG-DOM/SVGLength.m:197
Error occurred on line: 261 (LoginModule)
Error loading SVG file.
Stack Trace: (
  CoreFoundation       FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 1226784
  libobjc.A.dylib      objc_exception_throw + 56
  CoreFoundation       FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 135044
  LiveBadge            -[iSVG Initialize::] + 384
  CoreFoundation       FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 1252368
  CoreFoundation       FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 6912
  LiveBadge            +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1624
  LiveBadge            -[B4IShell runVoidMethod] + 232
  LiveBadge            -[B4IShell raiseEventImpl:method:args::] + 1800
  LiveBadge            -[B4IShellBI raiseEvent:event:params:] + 1580
 LiveBadge            +[B4IDebug delegate:::] + 80
 LiveBadge            -[b4i_loginmodule _createtabbaritem::::] + 632
 LiveBadge            -[ResumableSub_loginmodule_JobFinito resume::] + 14308
 LiveBadge            -[b4i_loginmodule _jobfinito:] + 560
 LiveBadge            -[ResumableSub_loginmodule_Login resume::] + 3384
 CoreFoundation       FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 1252368
 CoreFoundation       FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 6912
 LiveBadge            +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1624
 LiveBadge            -[B4IShell runMethod:] + 448
 LiveBadge            -[B4IShell raiseEventImpl:method:args::] + 2172
 LiveBadge            -[B4IShellBI raiseEvent:event:params:] + 1580
 LiveBadge            -[B4IDelegatableResumableSub resume::] + 380
 LiveBadge            -[B4I checkAndRunWaitForEvent:event:params:] + 552
 LiveBadge            -[B4IShellBI raiseEvent:event:params:] + 1436
 LiveBadge            -[B4ICommon CallSub4::::] + 344
 LiveBadge            -[B4ICommon CallSub2::::] + 360
 LiveBadge            -[b4i_httpjob _complete::] + 888
 LiveBadge            -[b4i_httputils2service _completejob::::] + 1288
 LiveBadge            -[b4i_httputils2service _hc_responsesuccess::] + 636
 CoreFoundation       FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 1252368
 CoreFoundation       FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 6912
 LiveBadge            +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1624
 LiveBadge            -[B4IShell runMethod:] + 448
 LiveBadge            -[B4IShell raiseEventImpl:method:args::] + 2172
 LiveBadge            -[B4IShellBI raiseEvent:event:params:] + 1580
 LiveBadge            __61-[B4IHttp URLSession:downloadTask:didFinishDownloadingToURL:]_block_invoke + 268
 libdispatch.dylib    B7EED4C7-560D-3DA6-9B50-ED52A150AAC6 + 377220
 libdispatch.dylib    B7EED4C7-560D-3DA6-9B50-ED52A150AAC6 + 60628
 libdispatch.dylib    B7EED4C7-560D-3DA6-9B50-ED52A150AAC6 + 377220
 libdispatch.dylib    B7EED4C7-560D-3DA6-9B50-ED52A150AAC6 + 57744
 CoreFoundation       FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 693160
 CoreFoundation       FF63481D-FB6A-353B-B2C1-AC4EAECF594D + 672668
 CoreFoundation       CFRunLoopRunSpecific + 464
 GraphicsServices     GSEventRunModal + 104
 UIKitCore            UIApplicationMain + 1936
 LiveBadge            main + 124
 libdyld.dylib        1DB44CE7-7030-3D97-9461-6EC743F47783 + 4960
)
 

Semen Matusovskiy

Well-Known Member
Licensed User
I saw this error on native iPhone 7 with IOS 13.3, unlike everything worked, at least, in Simulator for iPhone 7 (IOS 13.3) and on native IPhone 6s Plus (IOS 13.3 also).
According my investigations, this happens, when you read first SVG file only. So I used Try Catch. If there is an error, I execute svg.Initialize again.
 
Last edited:

Mike1970

Well-Known Member
Licensed User
I saw this error on native iPhone 7 with IOS 13.3, unlike everything worked, at least, in Simulator for iPhone 7 (IOS 13.3) and on native IPhone 6s Plus (IOS 13.3 also).
According my investigations, this happens, when you read first SVG file only. So I used Try Catch. If there is an error, I execute svg.Initialize again.
Thanks i will try this
 
Top