Skip to main content

Fast double touch on TextField raises NullPointerException on BlackBerryImplementation

5 replies [Last post]
ajochems
Offline
Joined: 2010-08-23
Points: 0

If i place a TextField on a form and do a fast double Touch click on that TextField a NullPointerException is raised. It only appears when a touch event happens and not with the trackball. If there is sufficient time between the two touch events no error appears so only with a fast 'Double-Click' action. It is not necesary that a double click action is needed but the entire MIDlet errors and closes so if a user accidentally does a double click the application gets killed. The stack trace is below and the error is raised because lightweightEdit is null.

Regards,

Andre

---

Thread [RedlineMZKBlackberry(289)id=295702528] (Suspended (exception NullPointerException))

BlackBerryImplementation$1$LightweightEdit.run() line: 223

MIDletMain.dispatchInvokeLater(Runnable, Object, int) line: 1023

MIDletMain(Application).doProcessNextMessage(Message) line: 2205

MIDletMain(Application).processNextMessage(Message) line: 1639

MIDletMain(Application).enterEventDispatcher() line: 1452

MIDletMain.main(String[]) line: 188

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vprise
Offline
Joined: 2003-11-07
Points: 0

Thanks for the stack trace. It seems to have been produced against a version older than the current SVN, can you reproduce this issue against the current SVN and provide an updated stack trace?

Thaks.

ajochems
Offline
Joined: 2010-08-23
Points: 0

I now am at revision 1604 for the RIM Port and the error still occurs, the current stacktrace is:

Thread [RedlineMZKBlackberry(286)id=379279360] (Suspended (exception NullPointerException))

BlackBerryImplementation$1$LightweightEdit.run() line: 218

MIDletMain.dispatchInvokeLater(Runnable, Object, int) line: 1023

MIDletMain(Application).doProcessNextMessage(Message) line: 2410

MIDletMain(Application).processNextMessage(Message, boolean) line: 1841

MIDletMain(Application).enterEventDispatcher() line: 1627

MIDletMain.main(String[]) line: 188

vprise
Offline
Joined: 2003-11-07
Points: 0

Thanks, I just committed a fix for this to SVN.

ajochems
Offline
Joined: 2010-08-23
Points: 0

Thank you for the fast fix! There is a small issue now with the compilation of BlackBerryImplementation. On line 258 you need to rename t because it now is a duplicate variable, i changed the line to: "} catch (Throwable t1) { " and now the file compiles. The error is solved with this fix.

Regards,

Andre

vprise
Offline
Joined: 2003-11-07
Points: 0

Thanks, since switching back to a Mac I can't compile it without going into a Windows VM which is a pain... I committed a fix.