ADDITIONAL SYSTEM INFORMATION :
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.eclipse.swt.internal.win32.OS.MoveMemory(I[BI)V+0
j org.eclipse.swt.graphics.Image.init(Lorg/eclipse/swt/graphics/Device;Lorg/eclipse/swt/graphics/Image;Lorg/eclipse/swt/graphics/ImageData;)[I+1407
j org.eclipse.swt.graphics.Image.init(Lorg/eclipse/swt/graphics/ImageData;)V+14
j org.eclipse.swt.graphics.Image.<init>(Lorg/eclipse/swt/graphics/Device;Lorg/eclipse/swt/graphics/ImageData;)V+32
J 1074% C1 com.geor.cmp.cwx.ui.ImagePreviewToolBar$5.widgetSelected(Lorg/eclipse/swt/events/SelectionEvent;)V (378 bytes) @ 0x031e956c [0x031e8600+0xf6c]
j org.eclipse.swt.widgets.TypedListener.handleEvent(Lorg/eclipse/swt/widgets/Event;)V+1003
j org.eclipse.swt.widgets.EventTable.sendEvent(Lorg/eclipse/swt/widgets/Event;)V+214
j org.eclipse.swt.widgets.Widget.sendEvent(Lorg/eclipse/swt/widgets/Event;)V+25
j org.eclipse.swt.widgets.Display.runDeferredEvents()Z+92
j org.eclipse.swt.widgets.Display.readAndDispatch()Z+59
j com.geor.cmp.cwx.ui.MainWindow.open()V+236
j com.geor.cmp.cwx.CWXClientDefault.open(Lcom/geor/cmp/cwx/ui/MainWindow;)V+1
j com.geor.cmp.cwx.api.CWXClientAPI.openCWXWin(Lcom/geor/cmp/cwx/ui/MainWindow;)V+9
j com.geor.cmp.cwx.AppLauncher$1.run()V+39
j java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+95
j java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
Stack: [0x466c0000,0x46710000], sp=0x4670f0d0, free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [swt-win32-3557.dll+0x2c263]
C [swt-win32-3557.dll+0x158e]
j org.eclipse.swt.internal.win32.OS.MoveMemory(I[BI)V+0
j org.eclipse.swt.graphics.Image.init(Lorg/eclipse/swt/graphics/Device;Lorg/eclipse/swt/graphics/Image;Lorg/eclipse/swt/graphics/ImageData;)[I+1407
j org.eclipse.swt.graphics.Image.init(Lorg/eclipse/swt/graphics/ImageData;)V+14
j org.eclipse.swt.graphics.Image.<init>(Lorg/eclipse/swt/graphics/Device;Lorg/eclipse/swt/graphics/ImageData;)V+32
J 1074% C1 com.geor.cmp.cwx.ui.ImagePreviewToolBar$5.widgetSelected(Lorg/eclipse/swt/events/SelectionEvent;)V (378 bytes) @ 0x031e956c [0x031e8600+0xf6c]
j org.eclipse.swt.widgets.TypedListener.handleEvent(Lorg/eclipse/swt/widgets/Event;)V+1003
j org.eclipse.swt.widgets.EventTable.sendEvent(Lorg/eclipse/swt/widgets/Event;)V+214
j org.eclipse.swt.widgets.Widget.sendEvent(Lorg/eclipse/swt/widgets/Event;)V+25
j org.eclipse.swt.widgets.Display.runDeferredEvents()Z+92
j org.eclipse.swt.widgets.Display.readAndDispatch()Z+59
j com.geor.cmp.cwx.ui.MainWindow.open()V+236
j com.geor.cmp.cwx.CWXClientDefault.open(Lcom/geor/cmp/cwx/ui/MainWindow;)V+1
j com.geor.cmp.cwx.api.CWXClientAPI.openCWXWin(Lcom/geor/cmp/cwx/ui/MainWindow;)V+9
j com.geor.cmp.cwx.AppLauncher$1.run()V+39
j java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+95
j java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
A DESCRIPTION OF THE PROBLEM :
swtæ转å¾çï¼å¤§å¾ç第äºæ¬¡æ转çæ¶åå°±ä¼åºç°éåºç¨åºçæ åµ
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
大å¾çæ转
ACTUAL -
éåºç¨åº
---------- BEGIN SOURCE ----------
private void addLeftEvent(final Button button) {
button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
try {
if (imagePreview.image != null) {
ImageData srcData = imagePreview.image.getImageData();
int bytesPerPixel = srcData.bytesPerLine / srcData.width;
int destBytesPerLine = srcData.height * bytesPerPixel;
byte[] newData = new byte[srcData.data.length];
int width = 0, height = 0;
for (int srcY = 0; srcY < srcData.height; srcY++) {
for (int srcX = 0; srcX < srcData.width; srcX++) {
int destX = 0, destY = 0, destIndex = 0, srcIndex = 0;
destX = srcY;
destY = srcData.width - srcX - 1;
width = srcData.height;
height = srcData.width;
destIndex = (destY * destBytesPerLine) + (destX * bytesPerPixel);
srcIndex = (srcY * srcData.bytesPerLine) + (srcX * bytesPerPixel);
System.arraycopy(srcData.data, srcIndex, newData, destIndex, bytesPerPixel);
}
}
ImageData targData = new ImageData(width, height, srcData.depth, srcData.palette, destBytesPerLine,
newData);
imagePreview.image = new Image(null, targData);
imagePreview.preview(imagePreview.image);
imagePreview.plusViewer(imagePreview.image);
}
} catch (Exception e1) {
CWXUtil.appendErrorMessages(e1);
log.error(String.format("å·¦æ转å¼å¸¸ [%s]", e1));
}
}
});
}
---------- END SOURCE ----------
FREQUENCY : always
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.eclipse.swt.internal.win32.OS.MoveMemory(I[BI)V+0
j org.eclipse.swt.graphics.Image.init(Lorg/eclipse/swt/graphics/Device;Lorg/eclipse/swt/graphics/Image;Lorg/eclipse/swt/graphics/ImageData;)[I+1407
j org.eclipse.swt.graphics.Image.init(Lorg/eclipse/swt/graphics/ImageData;)V+14
j org.eclipse.swt.graphics.Image.<init>(Lorg/eclipse/swt/graphics/Device;Lorg/eclipse/swt/graphics/ImageData;)V+32
J 1074% C1 com.geor.cmp.cwx.ui.ImagePreviewToolBar$5.widgetSelected(Lorg/eclipse/swt/events/SelectionEvent;)V (378 bytes) @ 0x031e956c [0x031e8600+0xf6c]
j org.eclipse.swt.widgets.TypedListener.handleEvent(Lorg/eclipse/swt/widgets/Event;)V+1003
j org.eclipse.swt.widgets.EventTable.sendEvent(Lorg/eclipse/swt/widgets/Event;)V+214
j org.eclipse.swt.widgets.Widget.sendEvent(Lorg/eclipse/swt/widgets/Event;)V+25
j org.eclipse.swt.widgets.Display.runDeferredEvents()Z+92
j org.eclipse.swt.widgets.Display.readAndDispatch()Z+59
j com.geor.cmp.cwx.ui.MainWindow.open()V+236
j com.geor.cmp.cwx.CWXClientDefault.open(Lcom/geor/cmp/cwx/ui/MainWindow;)V+1
j com.geor.cmp.cwx.api.CWXClientAPI.openCWXWin(Lcom/geor/cmp/cwx/ui/MainWindow;)V+9
j com.geor.cmp.cwx.AppLauncher$1.run()V+39
j java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+95
j java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
Stack: [0x466c0000,0x46710000], sp=0x4670f0d0, free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [swt-win32-3557.dll+0x2c263]
C [swt-win32-3557.dll+0x158e]
j org.eclipse.swt.internal.win32.OS.MoveMemory(I[BI)V+0
j org.eclipse.swt.graphics.Image.init(Lorg/eclipse/swt/graphics/Device;Lorg/eclipse/swt/graphics/Image;Lorg/eclipse/swt/graphics/ImageData;)[I+1407
j org.eclipse.swt.graphics.Image.init(Lorg/eclipse/swt/graphics/ImageData;)V+14
j org.eclipse.swt.graphics.Image.<init>(Lorg/eclipse/swt/graphics/Device;Lorg/eclipse/swt/graphics/ImageData;)V+32
J 1074% C1 com.geor.cmp.cwx.ui.ImagePreviewToolBar$5.widgetSelected(Lorg/eclipse/swt/events/SelectionEvent;)V (378 bytes) @ 0x031e956c [0x031e8600+0xf6c]
j org.eclipse.swt.widgets.TypedListener.handleEvent(Lorg/eclipse/swt/widgets/Event;)V+1003
j org.eclipse.swt.widgets.EventTable.sendEvent(Lorg/eclipse/swt/widgets/Event;)V+214
j org.eclipse.swt.widgets.Widget.sendEvent(Lorg/eclipse/swt/widgets/Event;)V+25
j org.eclipse.swt.widgets.Display.runDeferredEvents()Z+92
j org.eclipse.swt.widgets.Display.readAndDispatch()Z+59
j com.geor.cmp.cwx.ui.MainWindow.open()V+236
j com.geor.cmp.cwx.CWXClientDefault.open(Lcom/geor/cmp/cwx/ui/MainWindow;)V+1
j com.geor.cmp.cwx.api.CWXClientAPI.openCWXWin(Lcom/geor/cmp/cwx/ui/MainWindow;)V+9
j com.geor.cmp.cwx.AppLauncher$1.run()V+39
j java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+95
j java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
A DESCRIPTION OF THE PROBLEM :
swtæ转å¾çï¼å¤§å¾ç第äºæ¬¡æ转çæ¶åå°±ä¼åºç°éåºç¨åºçæ åµ
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
大å¾çæ转
ACTUAL -
éåºç¨åº
---------- BEGIN SOURCE ----------
private void addLeftEvent(final Button button) {
button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
try {
if (imagePreview.image != null) {
ImageData srcData = imagePreview.image.getImageData();
int bytesPerPixel = srcData.bytesPerLine / srcData.width;
int destBytesPerLine = srcData.height * bytesPerPixel;
byte[] newData = new byte[srcData.data.length];
int width = 0, height = 0;
for (int srcY = 0; srcY < srcData.height; srcY++) {
for (int srcX = 0; srcX < srcData.width; srcX++) {
int destX = 0, destY = 0, destIndex = 0, srcIndex = 0;
destX = srcY;
destY = srcData.width - srcX - 1;
width = srcData.height;
height = srcData.width;
destIndex = (destY * destBytesPerLine) + (destX * bytesPerPixel);
srcIndex = (srcY * srcData.bytesPerLine) + (srcX * bytesPerPixel);
System.arraycopy(srcData.data, srcIndex, newData, destIndex, bytesPerPixel);
}
}
ImageData targData = new ImageData(width, height, srcData.depth, srcData.palette, destBytesPerLine,
newData);
imagePreview.image = new Image(null, targData);
imagePreview.preview(imagePreview.image);
imagePreview.plusViewer(imagePreview.image);
}
} catch (Exception e1) {
CWXUtil.appendErrorMessages(e1);
log.error(String.format("å·¦æ转å¼å¸¸ [%s]", e1));
}
}
});
}
---------- END SOURCE ----------
FREQUENCY : always