You Are Here:

Community: Developer Discussion Boards

#1 Old createImage on Nokia Series 40 MIDP Concept SDK Beta 0.3 - 2003-09-29, 13:51

Join Date: Mar 2003
Posts: 29
Location: Luton, Bedfordshire, UK
GerardMason
Offline
Registered User
I haven't installed NDS 2 yet so I'm still using 1.1, and this is the S40 emulator that came with it.

I'm creating a spacer graphic in a longish 'Settings' form, to separate out various sections. I create a mutable image, draw into it, then create an immutable one from it to actually add to the form.

This is the code (ignore the extra braces, that's just my hangup about name pollution):

// Create a nice spacer image.
Image spacer;
int layout = ImageItem.LAYOUT_NEWLINE_BEFORE | ImageItem.LAYOUT_CENTER | ImageItem.LAYOUT_NEWLINE_AFTER;
{
Image temp = Image.createImage( 50, 11 ); // 4 white pixels above and below.
Graphics g = temp.getGraphics();
g.setColor( 0 );
g.fillRect( 0, 5, 50, 3 ); // 5th to 7th vertically.
g.setColor( 255, 0, 0 );
g.drawLine( 1, 6, 49, 6 ); // 6th vertically.
// Now make it immutable so it can be used.
spacer = Image.createImage( temp );
}

It works on all the other emulators, but on this one I get the following error:

Nokia Series 40 MIDP Concept SDK Beta 0.3: MirrorProtocolParser.invokeMethod(Method, Object[]): Failure!

Nokia Series 40 MIDP Concept SDK Beta 0.3: java.lang.NullPointerException

Nokia Series 40 MIDP Concept SDK Beta 0.3: --- Error while invoking reflected method : createImmutableImage

Nokia Series 40 MIDP Concept SDK Beta 0.3: at s40a2.b([DashoPro-V1.32-013000])

Nokia Series 40 MIDP Concept SDK Beta 0.3: at s40a2.<init>([DashoPro-V1.32-013000])

Nokia Series 40 MIDP Concept SDK Beta 0.3: --- Target exception was:java.lang.NullPointerException

Nokia Series 40 MIDP Concept SDK Beta 0.3: at com.nokia.phone.sdk.concept.mirrors.lcdui.ImageCache.createImmutableImage([DashoPro-V1.32-013000])

Nokia Series 40 MIDP Concept SDK Beta 0.3: at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)

Nokia Series 40 MIDP Concept SDK Beta 0.3: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

Nokia Series 40 MIDP Concept SDK Beta 0.3: at java.lang.reflect.Method.invoke(Method.java:324)

Nokia Series 40 MIDP Concept SDK Beta 0.3: at s40p.a([DashoPro-V1.32-013000])

Nokia Series 40 MIDP Concept SDK Beta 0.3: at s40p.a([DashoPro-V1.32-013000])

Nokia Series 40 MIDP Concept SDK Beta 0.3: at s40o.run([DashoPro-V1.32-013000])

Nokia Series 40 MIDP Concept SDK Beta 0.3: at java.lang.Thread.run(Thread.java:536)


I don't have an actual S40 to test it on. Has anybody had a similar experience?


Cheers,
Gerard.
Reply With Quote

#2 Old 2003-09-29, 22:12

Join Date: Jun 2003
Posts: 4,325
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Offline
Forum Nokia Champion
Yep - I get the same in the S40 "Concept". Not a very good concept, is it? Good news is: I don't get the same error on the 7210 emulator, or on my 6100 phone.

If you're developing for the Series 40, use the 7210 emulator - not the concept beta - it's much more like the real thing.

Graham
Reply With Quote

#3 Old 2003-09-30, 11:00

Join Date: Mar 2003
Posts: 29
Location: Luton, Bedfordshire, UK
GerardMason
Offline
Registered User
Thanks!
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ