Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 211361 - GraphicsExample crashes
Summary: GraphicsExample crashes
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.4   Edit
Hardware: Macintosh Mac OS X
: P3 major (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-28 19:26 EST by Alex Blewitt CLA
Modified: 2009-06-04 15:12 EDT (History)
2 users (show)

See Also:


Attachments
patch to GC (1.07 KB, patch)
2007-11-29 01:31 EST, Leo Dos Santos CLA
Silenio_Quarti: iplog+
Details | Diff
patch to Transform (972 bytes, patch)
2007-11-29 01:32 EST, Leo Dos Santos CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Blewitt CLA 2007-11-28 19:26:54 EST
I ran GraphicsExample, and used 'next' to step through the cycles of animations. A couple after it was drawing a spirograph-like drawing, it crashed.

Looking through the list, it looks like it crashed on the one after the StarPolyTab was shown; but that would have been the intro tab. I wonder whether doing a full cycle and coming across a new tab again results in calling code that's previously been free'd?

2007-11-29 00:17:56.228 java[23179:10b] *** _NSAutoreleaseNoPool(): Object 0xa847eb0 of class NSException autoreleased with no pool in place - just leaking
Stack: (0x954e9178 0x954170f8 0x9541d8e0 0x912ed39c 0x46ac)
2007-11-29 00:17:56.276 java[23179:10b] An uncaught exception was raised
2007-11-29 00:17:56.279 java[23179:10b] NSAffineTransform: Transform has no inverse
2007-11-29 00:17:56.282 java[23179:10b] *** _NSAutoreleaseNoPool(): Object 0x13bd30 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x954e9178 0x954170f8 0x95420d04 0x9135b014 0x9641a6ac 0x912ede28 0x46ac)
2007-11-29 00:17:56.284 java[23179:10b] *** _NSAutoreleaseNoPool(): Object 0x1693b0 of class NSCFData autoreleased with no pool in place - just leaking
Stack: (0x954e9178 0x954170f8 0x95428858 0x95428704 0x9135b068 0x9641a6ac 0x912ede28 0x46ac)
2007-11-29 00:17:56.286 java[23179:10b] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'NSAffineTransform: Transform has no inverse'
2007-11-29 00:17:56.289 java[23179:10b] Stack: (
Comment 1 Leo Dos Santos CLA 2007-11-29 01:31:00 EST
Created attachment 84036 [details]
patch to GC

The tab after StarPolyTab is CardsTab, which is where I'm seeing the crash happen. The gc.setTransform calls blow up on the subsequent call to invert when the matrix can't be inverted. This patch determines the determinant before calling invert. Don't know if SWT.ERROR_CANNOT_INVERT_MATRIX should be thrown here.
Comment 2 Leo Dos Santos CLA 2007-11-29 01:32:40 EST
Created attachment 84037 [details]
patch to Transform

Similar patch for Transform.invert();
Comment 3 Silenio Quarti CLA 2007-12-03 10:49:01 EST
I released your patches. I modified the patch for Transform a bit. I am still not sure about the patch for GC, but at least we should not crash.

Thanks