[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49688: 28.0.50; Attempting to show images crashes Emacs
From: |
Alan Third |
Subject: |
bug#49688: 28.0.50; Attempting to show images crashes Emacs |
Date: |
Thu, 22 Jul 2021 23:11:22 +0100 |
On Thu, Jul 22, 2021 at 11:01:19PM +0200, Rudolf Adamkovič wrote:
> TWO CORRECTIONS:
>
> (1) I attached a wrong crash report. Please see the new attachment.
I did wonder. ;)
> (2) I *do* see album art now. (And Emacs does not crash.)
Good. :)
> I apologize for my mistakes.
No problem.
I can't see why this should fail. The code that's failing shouldn't be
affected by anything we do, unless the images are invalid or
something.
Can you see if the following change makes any difference?
modified src/nsimage.m
@@ -251,7 +251,6 @@ @implementation EmacsImage
+ (instancetype)allocInitFromFile: (Lisp_Object)file
{
- NSImageRep *imgRep;
Lisp_Object found;
EmacsImage *image;
NSString *filename;
@@ -265,18 +264,12 @@ + (instancetype)allocInitFromFile: (Lisp_Object)file
image = [[EmacsImage alloc] initByReferencingFile:filename];
image->bmRep = nil;
-#ifdef NS_IMPL_COCOA
- imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]];
-#else
- imgRep = [image bestRepresentationForDevice: nil];
-#endif
- if (imgRep == nil)
+ if (![image isValid])
{
[image release];
return nil;
}
- [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])];
[image setName:filename];
return image;
--
Alan Third
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Rudolf Adamkovič, 2021/07/21
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Alan Third, 2021/07/22
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Rudolf Adamkovič, 2021/07/22
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Rudolf Adamkovič, 2021/07/22
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Rudolf Adamkovič, 2021/07/22
- bug#49688: 28.0.50; Attempting to show images crashes Emacs,
Alan Third <=
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Rudolf Adamkovič, 2021/07/23
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Alan Third, 2021/07/23
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Rudolf Adamkovič, 2021/07/24
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Rudolf Adamkovič, 2021/07/24
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Alan Third, 2021/07/24
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Rudolf Adamkovič, 2021/07/24
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Alan Third, 2021/07/24
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Rudolf Adamkovič, 2021/07/25
- bug#49688: 28.0.50; Attempting to show images crashes Emacs, Alan Third, 2021/07/26