Bug? B4i / Hosted Builder: Sporadic “Class not found” errors at runtime after successful compile

b4x-de

Active Member
Licensed User
Longtime User
Hi all,

for some time now I’ve been seeing a strange issue with B4i when using the Hosted Mac Builder in Verion 10.00:
The project compiles successfully without any errors, but fails at runtime on the device with a “Class not found” exception.

B4X:
Copying updated assets files (134)
Error occurred on line: 6 (Main)
Class not found: B4IXUI
Stack Trace: (
  CoreFoundation       973E47E5-88F0-3367-B9D4-46D5CB999B75 + 825556
  libobjc.A.dylib      objc_exception_throw + 88
  CoreFoundation       973E47E5-88F0-3367-B9D4-46D5CB999B75 + 1394900
  XEssentials          -[B4IShell createObject:] + 148
  XEssentials          -[B4IShell raiseEventImpl:method:args::] + 1292
  XEssentials          -[B4IShellBI raiseEvent:event:params:] + 1008
  XEssentials          -[B4IStaticModule initializeModule] + 252
  XEssentials          -[b4i_main initializeStaticModules] + 48
  XEssentials          -[B4IShellBI raiseEvent:event:params:] + 180
  XEssentials          __33-[B4I raiseUIEvent:event:params:]_block_invoke + 24
 libdispatch.dylib    D34AC6A9-10DC-3535-9944-E3EFC5994788 + 6876
 libdispatch.dylib    D34AC6A9-10DC-3535-9944-E3EFC5994788 + 112620
 libdispatch.dylib    D34AC6A9-10DC-3535-9944-E3EFC5994788 + 232228
 libdispatch.dylib    D34AC6A9-10DC-3535-9944-E3EFC5994788 + 69320
 libdispatch.dylib    _dispatch_main_queue_callback_4CF + 44
 CoreFoundation       973E47E5-88F0-3367-B9D4-46D5CB999B75 + 439584
 CoreFoundation       973E47E5-88F0-3367-B9D4-46D5CB999B75 + 122132
 CoreFoundation       973E47E5-88F0-3367-B9D4-46D5CB999B75 + 117828
 GraphicsServices     GSEventRunModal + 120
 UIKitCore            C98EAB32-B273-3430-B0C5-46522C904CBB + 695772
 UIKitCore            UIApplicationMain + 336
 XEssentials          main + 100
 dyld                 9DC34712-11AA-3B1D-AFE0-01B95A6E40D3 + 20008
)
Application_Start
Application_Active

XUI is only an example. The problem is not specific to XUI. The same behavior occurs with various other classes, including:
  • my own project classes
  • classes from libraries
  • classes that previously worked fine for a long time
I could provide multiple similar stack traces with different missing classes. The posted error message is only representative, not the root issue. What is clear so far:
  • The classes do exist
  • The compiler clearly knows them (otherwise the build would fail)
  • The error happens only at runtime, during static module initialization
  • This does not look like a coding or reference error
My workaround was Tools → Clean Project what usually fixes the problem. However:
  • The issue reappears randomly after some time
  • Sometimes without meaningful code changes
  • Cleaning the project is therefore only a temporary workaround, not a real solution
So my questions:
  • Is this a known or reproducible issue with the Hosted Builder?
  • Is this likely a cache or packaging problem on the builder side?
  • Is there any way to prevent this permanently, other than repeatedly cleaning the project?
Thanks for any insights or shared experiences.
 
Top