Posts Tagged ‘bug’

When I tried to add an Oracle WebLogic Server 12c as a new server runtime to a project in OEPE (Eclipse), OEPE refused to recognize the information I entered. Fortunately, Daniel G. told me that I have to select the wlserver folder first, then backspace a few times to remove wlserver from the path and type in the wlserver back to trigger the screen to fresh. The goal is to change the path using different ways to trigger a refresh action, which doesn’t get triggered when it supposed to. Once I was able to trigger the fresh action on wlserver folder, OEPE was able to recognize the server runtime installed in the folder. ;)

This definitely worth a bug on OEPE!

Buggy FireBug

Posted: June 19, 2009 in Life in general
Tags: , ,

I have a page with Javascript loaded from different directories. For one reason, the Javascripts source loaded from one of the directories did not display. This means I could not use the debugger to insert break points directly. The Firbug version was 1.3.3. Initially, I was able to get the source code to show after randomly clicked around, i.e. click on Yslow and switch back to script tab. Unfortunately, it was not a reliable workaround. Eventually, an idea came to me to work around the issue: insert a runtime error. A runtime error can be as simple as referencing a non-existing function. Make sure you don’t introduce syntax error, which will stop the browser from reading the source code. With the new runtime error, Firebug will show an error in the console and provide a link to the source code. Once I could see the source code, I added break points at the lines that I was actually interested and removed the artificial runtime error from the source code before reloaded the page.

An IE 7 bug

Posted: May 15, 2009 in Technology
Tags: ,

Recently, I encountered an IE 7 bug and it’s documented at here. I try to see if I can workaround the issue next week.

I have a JSON response that has data in a nested object within a data entry. Mapping and reading the nested data is easy and straightforward. The interesting part is that the nested object is optional and therefore may not exist in the response sometimes. Unfortunately, JsonReader can’t handle this and would throw a silent exception that caused the whole UI initialization to halt. The API doc seem to suggest that the proper behavior is for the library to use pre-configured defaultValue when data doesn’t exist. Here is the original code from the readRecords function from JsonReader:

for(var j = 0; j < fl; j++){
  f = fi[j];
  var v = this.ef[j](n);
  values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue, n);
}

Exception would occur at the point of calling this.ef[j](n) to access the data at field index j from the parameter n, which contains JSON fragment. This prevented the defaultValue ever being used in the next line.

What I did to work around this issue is to add a try-catch block around the line and set v to undefined in the catch clause. This allows the defaultValue to be used when data is missing.