iOS Question [Solved] Error CreateBitmap Object was not initialized (UIImage)

angel_

Well-Known Member
Licensed User
Longtime User
When I call this code two or three times in a row:

B4X:
Dim cvs2 As B4XCanvas
cvs2.Initialize(pnl)
cvs2.CreateBitmap

I have this error:

B4X:
Error occurred on line: 654 (m03)
Object was not initialized (UIImage)
Stack Trace: (
  CoreFoundation       <redacted> + 252
  libobjc.A.dylib      objc_exception_throw + 56
  CoreFoundation       <redacted> + 0
  NameApp             -[B4IObjectWrapper object] + 136
  NameApp             -[B4XCanvas CreateBitmap] + 56
  NameApp             -[b4i_m03 _guardar:] + 6976
  NameApp             -[ResumableSub_b4xmainpage_guardar resume::] + 8160
  CoreFoundation       <redacted> + 144
  CoreFoundation       <redacted> + 292
  NameAppr             +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
NameApp             -[B4IShell runMethod:] + 448
NameApp             -[B4IShell raiseEventImpl:method:args::] + 2172
NameApp             -[B4IShellBI raiseEvent:event:params:] + 1580
NameApp             -[B4IDelegatableResumableSub resume::] + 380
NameApp             -[B4I checkAndRunWaitForEvent:event:params:] + 516
NameApp             -[B4IShellBI raiseEvent:event:params:] + 1436
NameApp            __37-[B4ICommon ReturnFromResumableSub::]_block_invoke + 368
libdispatch.dylib    <redacted> + 24
libdispatch.dylib    <redacted> + 16
libdispatch.dylib    <redacted> + 1068
CoreFoundation       <redacted> + 12
CoreFoundation       <redacted> + 1924
CoreFoundation       CFRunLoopRunSpecific + 436
GraphicsServices     GSEventRunModal + 104
UIKitCore            UIApplicationMain + 212
NameApp             main + 124
libdyld.dylib        <redacted> + 4
)
 
Last edited:

angel_

Well-Known Member
Licensed User
Longtime User
Solved

B4X:
Dim cvs2 As B4XCanvas
cvs2.Initialize(pnl)
cvs2.CreateBitmap
'Do something
cvs2.Release
 
Upvote 0
Top