Posts Tagged ‘Bug’


21.02.2012

BoB bug

posted by Karsten

in Uncategorized

I was teaching Android Game App development today. The session where I go through all of the code. The session as such went quite well IMHO.

Except, I “obviously” plugged my own games, as examples of game representations within a game. A student of mine downloaded BoB, and played it hanging about while waiting for a mate finishing asking me questions. To my surprise BoB crashed on him!

Apart from being only “slightly” embarrassing this was a great opportunity for a more in depth bug report. Not only had I observed him play a normal game, but also seen him finish, so I knew that the bug was in the transition between playing and finishing a game. So, I got him to file a bug report, and my was it interesting!

I can now locate the bug in the Scoreloop API, perhaps not surprising as the BoB game is using an old’ish version of the library, but nonetheless it is reassuring to know that the bug is related to failing to sending the highscore correctly, and not timing out, therefore not allowing the surfacedeletion to happen. This makes Android timeout, and that seemingly blows up everything within the system, as my code relies on the normal OS life cycle of an app. I must find a proper solution to this problem, but at least I now know the cause of the problem.

Oh, and btw, how we can teach Computer Science in a lecture hall with no adequate internet / 3g access is beyond me…

Share
27.02.2011

Rhomobile – installation problems

posted by Karsten

in Uncategorized

This last week I’ve been negotiating with a company to do some consultancy work creating an Android app using Rhomobile. Whilst I cannot go into detail at this moment about the app, the funding is dependent on some governmental funding scheme, and still awaiting clearence, I thought I’d better install Rhomobile and check it out – it looks great “on paper” as it is a multi-platform mobile phone app environment based on Ruby on Rails.

So I started installing the environment following the very good instructions on Rhomobile’s site, however after doing so, remembering to set JAVA_HOME manually (Ubuntu’s update-java-alternatives doesn’t – surprisingly!), I ran into trouble. I got:

platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java:461: cannot find symbol

symbol : method setForeground(boolean)
location: class com.rhomobile.rhodes.RhodesService
setForeground(true);
^
platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java:480: cannot find symbol
symbol : method setForeground(boolean)
location: class com.rhomobile.rhodes.RhodesService
setForeground(false);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

It turns out that Rhomobile uses the deprecated setForeground(boolean) method, which Google has removed in the newest Android SDK. Luckily I had an older version of the Android SDK on my desktop, and it turns out that it works perfectly on that version. I can only hope Rhomobile fix this soon. I really hate using old SDKs!

Share
04.08.2009

Sidebar bug resolved

posted by Karsten

in elggcontent, RedGloo

Richard Hussey kindly pointed out, that there was a small bug in the sidebar (the area underneath Profile pictures) when viewing your personal page.

Normally there shouldbe a section called "Forum & Blogs", however this didn't show on personal pages. This has now been resolved. It was a bug in the ELGG code, where a piece of code was inside an ELSE part of an IF statement. I have now moved it outside this block, and it seems to work fine. Yay!

Share
Tags:
25.11.2008

PDF files not shown in IE

posted by Karsten

in elggcontent, RedGloo

Phil Flynn brought to my attention that pdf files couldn't be viewed when saved in RedGloo's filesystem. This came as a surprise to me, as I definately could view them. I tried for sanity sake to view the file using IE (I use Firefox) and it didn't show…

This really surprised me, and I tried to look for several options. By chance I found a MS bug report where it was tied to the https protocol (MS claiming it as expected behaviour). I tried to view the pdf file using the http protocol. This worked!

I have now removed https from the default url, and only use https for login purposes. This is something I wanted to do for some time, but didn't get around until now…

Share
Tags: , ,
04.11.2008

Smack Library Bug

posted by Karsten

in RedGloo

For the better part of 1.5 days I’ve been bug hunting a problem in the MeAggregator code base. The problem arised when accessing a Smack library bespoke client using the Ruby xmpp4r library utilising the the Smack ChatManager (via threadid feature of Xmpp). Every so often the Smack client would seem forgetfull and forget about the thread and create a new one, even though the thread clearly was in use.

I tried everything debugging-wise, believe me, and was starting to give up. But I can now, gladly, declare that I found the bug. 8)

The Smack library store all the treads in a ReferenceMap using new ReferenceMap<String, Chat>(ReferenceMap.HARD, ReferenceMap.WEAK);

Unfortunately this allows the garbage collector of Java to remove the thread if it can’t find any references to the thread string in the memory. Obviously as all other references to the string isin Ruby these will be thrown out.

I’ve now added a simple hashmap to the code which stores the string / chat combination on the java side, and it works!!

I can see why Smack would like to free the memory, but I really believe this behaviour ought to be documented in the javadocs of Smack, so that the code can make provisions for it.

I probably should let them know…

Share
Tags: , ,
23.05.2008

Gtk.TreeStore

posted by Karsten

in RedGloo

I think I've found an error in the Gtk library. I'm using a Gtk.TreeStore to store information, and as this could be many different kinds of objects I set the type to object. But nothing would work properly. I'd spent the better of 6 hours toying with all kinds of setting, before I tried changing the type to string and use the tostring on the different objects. Voila now it stores everything…

 

This is bizarre, because the documentation states that any object can be stored in the storage… At the moment I can't be fussed to look into the library to find the cause, but I write this merely so that I might remember 😉 

Share
Tags: ,