findDrawableById - no error on simulator when drawable not found.

Former Member
Former Member
In the CIQ_LOG.TXT:


[FONT=Courier New]ERROR: Unexpected Type Error
DETAILS:
STORE_ID: 6e94a77d10274e15a567db0a7b8fb302
CALLSTACK:
C:\Hudson\workspace\Fitness-Manual-Kauai-Release\TVM\api\WatchUi.mb (findDrawableById:554)
@PC = 0x00000000[/FONT]

This should really show some kind of error when compiling or testing on the simulator. Instead it works fine, yet crashes on the watch.
  • You'll want to use Coleman's format for bug reports (in the sticky at the top), and include your environment (sdk, etc) as well as a bit of code to show this, as that's the fastest way to get a ticket created and fixed.
  • Former Member
    Former Member
    Thanks for that. I should've subscribed to this topic when I could've remembered what I did to cause this. D'oh! But I think it was SDK 2.2.3.

    I find very strange with the Monkey C compiler that certain things don't cause errors during compilation time that I think really should.

    e.g. referring to undefined variables don't cause errors during compilation. These may not get discovered for a while when the app is running, if located inside an 'if' clause, for example.

    In the above I think I was referring to an undefined drawable, yet the app still ran on the simulator but crashed on the watch - if I recall correctly.
  • I find very strange with the Monkey C compiler that certain things don't cause errors during compilation time that I think really should.

    While it does seem that the compiler could detect many situations like this, this behavior is normal for dynamic languages like MonkeyC (Python, JavaScript, ...).

    In the above I think I was referring to an undefined drawable, yet the app still ran on the simulator but crashed on the watch - if I recall correctly.

    If you've built and run the program to run on the simulator as device X, it should load the same layout as it does when you build and run the app on the physical device. If you can produce a test case to reproduce the issue, it would be helpful to improve the ConnectIQ platform.

    Travis