Categories
Bada

A few Bada IDE Errors and Tips

In my struggle of developing a smooth bada application and learning C++ at the same time, there have been countless frustrating moments, just today most likely the worst. I simply want to share with you some of those obscurities of bada API’s and its IDE, so if you are as unlucky as me at least know about it beforehand and don’t attempt time wasting work on an illusionary solution.

Suffering from random application disappearance?

Wonder why your application you are currently target-debugging on your handset randomly closes just about every time you put your Wave aside to look at the code on your desktop screen? You might just have auto-orientation of landscape and portrait mode active, this can be triggered by natural hand movements. If you didn’t specify exact positioning and sizes of your controls for landscape or portrait orientation modes, they can end up sitting on coordinates outside the screen boundaries – your app crashes without a noise! I discovered this rather by chance, as I was willingly ignoring it at the frustrating thought of having a fatal runtime error deep down the essential parts of my code without any hint of where to find it. This error, just like so many others, are only reproducible on the target-debugging handset and not the simulator, thus making it one of the most evil kind. Just deactivate Auto-Orientation mode and you are done!

Tiny

ContextMenu controls can only fit icons of 52×52 size – yes, that’s horribly small.

Clone War

Don’t try to clone instances of CustomListItems. This simply does not work. After checking the API for the CustomListItem you can see that there is in fact no copy-constructor available for it that would allow to clone an existing CustomListItem instance like this: CustomListItem *pCustomListItemClone = new CustomListItem(*CustomListItemOriginal); – Don’t try this at home! This is lethal to your simulator!

The copy still shares references with its original, causing the app to crash sooner or later when automatically removing both items and thus twice attempting to delete data with the shared reference. Now the very weird thing is that copy-construction of CustomListItemFormat objects is initially prohibited by the compiler with a hint on private references, question is, why not for CustomListItems as well? Would have saved me precious time.

Layer Anarchy

In the emulator, the control with last focus is in foreground. But in fact, on device, the creation order dictates the layer arrangement hierarchy – at least that’s what I have experienced.

Error: make ****

The worst obscurity of bada happened to me today, in just a glimpse pulverizing hours of work and costing me the whole day to repair. Just as I wanted to run my app in the simulator after successfully testing it on my Wave – POW! Compile Error!

I still haven’t figured out why the bada IDE failed to create the simulator exe. All it did was displaying the “make: *** [App.exe] Error1”, just a tad too abstract to actually work with it. All day reverse engineering didn’t do it, even completely reinstalling the SDK thrice with clean wiped registry showed no affect.

Funny thing though: target debugging and running the app on the Samsung Wave worked totally flawless.  Fortunately, I started to backup my project files a few days ago, somehow though the last two backups suffered the same error, so I had to resort to a 5 hours old backup. I’m just glad it wasn’t any worse. I carefully updated snipped by snippet of code to finally localize the error, but nothing! No error appeared as I copied the whole project code. So it seems that out of a sudden my project folder got corrupted, making it impossible to compile the project exe for the simulator.

The only solution I see here: Make Backups, Backups, Backups!

Leave a Reply