Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Crash when attempting to Scan
Crash when attempting to Scan
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Mon Nov 22, 2010 11:20 am    Post subject: Crash when attempting to Scan

I only recently discovered that my HP 1520 All-in-one is compatible with Image Capture. So today I decided to try scanning directly from NeoOffice (since I seem to remember that such a function should work with Image capture compatible scanners).

Unfortunately, Neo has twice crashed while trying to do this. Here are my steps:

-In a new Text document, go to Insert>Picture>Request
-A new window opens asking me to "select a camera or scanner" The HP 1510 is highlighted, so I click Select
-That window disappears, and one labeled "HP PSC 1500 series" opens, with a message "'HP PSC 1500 series' was disconnected. This window looks very much like the image Capture window.
-If I click on the red "close" button of this window, Neo crashes.

Crash log attached.

Lorinda
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Nov 22, 2010 1:22 pm    Post subject:

Unfortunately I have bad news: this crash is a Mac OS X bug which can only be fixed by Apple.

Your crash log shows that NeoOffice has handed control over the Mac OS X's "ICAImportImage" function. That function displays the scanner selection dialog that you see and then does the actual reading from the scanner. What is happening is that the first task that that function performs - showing the scanner selection dialog - is working but that function is crashing during its second task - reading from the scanner.

Your assumption that if the Image Capture application does not crash, then Mac OS X's "ICAImportImage" function should also not crash makes sense. However, based on where the crash is occuring it appears that Mac OS X's "ICAImportImage" function was implemented by Apple with different code that the code that Image Capture uses.

Patrick
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Mon Nov 22, 2010 5:31 pm    Post subject:

Thanks for such a quick reply, Patrick! I'll force another crash and send the crash log to Apple, in the hopes that they will eventually fix this bug.

I don't want to take up any more of your precious time, but I'd be curious to hear from other users, to know if they've been able to scan directly into NeoOffice. [i.e. I'm wondering if it's specific to something in my setup, or a more global bug].

Lorinda
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Nov 22, 2010 6:08 pm    Post subject:

Just to be safe, I looked at Ed's image capture code and reread Apple's documentation for the "ICAImportImage" function. While it looks like we are passing correct values to that function, I noticed that for one value there is a more precise way to pas that one value than we are doing. So, in the following test patch I have changed Ed's code to use the more precise way of passing on that function's values. It may not help, but I figured it does not hurt to try.

Can you install the following test patch and tell us if the crashing still occurs?:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.1.2-Patch-1-Test-3-Intel.dmg

PowerPC:
http://joe.neooffice.org/test/NeoOffice-3.1.2-Patch-1-Test-3-PowerPC.dmg

Edit by pluby: I have created bug 3641 to track this issue.

Patrick
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Mon Nov 22, 2010 8:18 pm    Post subject:

Hmm... I installed the test patch, and now when I do Insert>Picture>Scan>Request... nothing happens at all.

Lorinda
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Nov 22, 2010 8:23 pm    Post subject:

Lorinda wrote:
Hmm... I installed the test patch, and now when I do Insert>Picture>Scan>Request... nothing happens at all.


That may actually be a good sign. What I now am worried about is if my code change in the test patch has disabled all scanning instead of just your specific crashing bug. Let me think about this tomorrow and see if this is an unintended error in my test patch. If not, I will revert the changes in the test patch.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Nov 24, 2010 8:27 am    Post subject:

I don't know if this will work, but I changed Ed's image capture code to ask the "ICAImportImage" function to get any type of image format it can. Previously, we have asked the function to return the image in TIFF, JPEG, GIF, or PNG format.

Can you install the following test patch and tell us if the crashing is still fixed and if an image appears in your Writer document after using your scanner?:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.1.2-Patch-1-Test-4-Intel.dmg

PowerPC:
http://joe.neooffice.org/test/NeoOffice-3.1.2-Patch-1-Test-4-PowerPC.dmg

Patrick
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Wed Nov 24, 2010 10:13 am    Post subject:

NeoOffice is now back to crashing again, in the same was as before. I've attached a crash log, just in case there's something new/different this time around.

FWIW, though, I just happened to have my iPod Touch connected to the computer this time, so it showed up in the "choose a scanner or camera" window, too. If I select it, I get a new window with a list of the pictures on the photo roll (screenshots, not photos synced from iPhoto), and I can insert one of those into a Writer document without problems.

If you'd like, I can test with one or two other cameras, but I don't have access to other scanners to try. (I might have such access the week after Christmas, but that's iffy at the moment).

Lorinda
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Nov 24, 2010 10:31 am    Post subject:

Lorinda wrote:
NeoOffice is now back to crashing again, in the same was as before. I've attached a crash log, just in case there's something new/different this time around.


OK. I will roll back the changes in the last test patch to the previous changes that stopped the crashing.

But before I do that I have one question: can you do the following steps? This will tell me if the HP scanner is sending some special image format that I need to add to our list of requested image formats:

1. Launch the Image Capture application and select your HP scanner.

2. Change the "Import To:" listbox to "Desktop" and import an image from the scanner.

3. Right-click or Control-click on the image file that is created on your Desktop and in the popup menu that appears, select the "Get Info" menu.

4. In the window that appears, tell us the full file name including the file extension that is displayed at the top of that window.

Patrick
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Wed Nov 24, 2010 11:09 am    Post subject:

The file is named Scan.tiff

Note, however, that in Image Capture I can choose from several formats (JPEG, TIFF, PNG, PDF, GIF, JPEG 2000, BMP). Currently it's set to TIFF.

Two other notes that may or may not be connected:
-I notice that when I pull up Image Capture, I get a message that the Scanner is warming up. I'm wondering if somehow that status is being misinterpreted as "Disconnected" by the ICAImportImage function.
-In Image Capture, there's a checkbox for "Detect Separate Items" that is checked by default. I'm guessing this shouldn't be an issue, since I don't think it comes into play until after the preview scan is done, but I thought I should mention it, in case that setting is causing problems.

Lorinda
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Nov 25, 2010 10:40 am    Post subject:

I have reverted the changes in the last test patch so that the following test patch now has the fixes in the second to last test patch. Also, although it might not change anything, I added PDF and BMP image formats to the list of supported image formats.

Can you install the following test patch and tell us if the crashing still occurs? If not and the scanner is finished warming up, does the import now work?:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.1.2-Patch-1-Test-5-Intel.dmg

PowerPC:
http://joe.neooffice.org/test/NeoOffice-3.1.2-Patch-1-Test-5-PowerPC.dmg

Patrick
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Sun Nov 28, 2010 8:19 pm    Post subject:

Thanks, Patrick. It still crashed, although it seemed to take a little more time to do so this time. (Once the scanning window closed, I had the spinning beach ball, Neo crashed a few seconds later.) I've attached the crash log, just in case there's knew info in it.

I think my guess about the Disconnected warning being related to the scanner warming up is wrong. When Image Capture or Preview show the scanner warming up, the scanner head moves across the glass. In Neo, when I get the disconnected warning, nothing happens with the scanner. This time I let is sit for quite a while, and I did eventually here the scanner/printer do something (it may have been the print heads moving), but the disconnected message never changed.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Nov 29, 2010 5:06 am    Post subject:

I have bad news: your crash log indicates that the crashing is still occurring within the Mac OS X "ICAImportImage" function and I have run out of values to tweak when invoking this function so I think that we are going to have to hope that Apple will eventually fix whatever bug is causing this crashing within the ICAImportImage function.

One thing that you might consider trying is installing HP's latest scanner driver update for Mac OS X 10.6 that I found here.

From what I can tell, HP only gave Apple print driver software for inclusion in Mac OS X 10.6 and did not provide a complete set of scanner driver software. From what you describe, it appears that the Image Capture and Preview applications are not using the ICAImportImage function at all and, instead, Apple is using some much lower level proprietary code to directly interact with your HP scanner that Apple did not include in the ICAImportImage function. My hope is that the HP scanner driver software update makes your scanner work within the limitations of the ICAImportImage function.

Patrick
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Tue Nov 30, 2010 9:11 am    Post subject:

Thanks for the link. I tried running the driver installer, but mine isn't supported by that update. I'll try looking around for one that is, but I'm pretty sure that for the moment there is nothing more to do except wait for Apple to fix the issues.

I've got other options for scanning, so it's not a big deal.

I will report back if I have a chance to use other scanners later, just for the sake of completeness.

Thanks again for seeking a solution to this.

Lorinda
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Nov 30, 2010 9:27 am    Post subject:

Lorinda wrote:
I will report back if I have a chance to use other scanners later, just for the sake of completeness.


Just out of curiosity, does the unresolved Snow Leopard issue described in this NeoWiki article still occur? While it is unrelated to the problem that you see, I just wanted to know if Apple ever fixed this other ICAImportImage function bug that appeared in Mac OS X 10.6.

Patrick
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.