Sleuth3 misbehaving on a Pi
George T. Greenfield (154) 748 posts |
I’m using Sleuth3 on a Raspberry Pi (model B, RISC OS 5.21, 13-Sep-14). I’m getting persistent unrecoverable errors when attemping any processing (rotation, finding zones, OCR’ing) of previously scanned sprites: the full error message reads: Two oddities: the same Sleuth3 version has no problem processing identical sprite files when running under 5.20 on RPCEmu, and on the Pi, it /is/ possible to process a page as above, providing it has been scanned first as part of a continuous process – it is only when processing previously-scanned pages that the problem arises. AFAICS, the Sleuth3 versions running on RPCEmu and the Pi are identical – same files, same file sizes, same dates. Both versions create a scrap file in !Scrap.ScrapDirs when launched; the memory allocated to both in Application Tasks is the same: 1692K; moreover, the Model B Pi has twice as much installed RAM (512MB) as is available to RPCEmu. Do 5.20 and 5.21 differ in the way malloc (whatever that might be) is handled? In short, I cannot see why the RPCEMu version works properly and the Pi version doesn’t. Any advice or help with this would be appreciated – it’s not a showstopper as I have RPCEmu to fall back on, but the Pi is my main RISC OS platform and I would like this useful app to work properly on it! |
Raik (463) 2061 posts |
Not sure but RPCEmu is StrongARM, RPi not. Have you try other CPU settings via !Configure? |
George T. Greenfield (154) 748 posts |
Good point. I’ve always run the Pi in ARMv5 compatibility mode. Sleuth’s !Boot file is dated May 1998 and the !Run file is dated May 2004 in my installation. I’ll try the other CPU options to see if that helps. |
Raik (463) 2061 posts |
A other option should be aemulor. |
George T. Greenfield (154) 748 posts |
On selecting ‘OCR’ with a sprite loaded into Sleuth, rotated and zoned: Aemulor: same error as original. CPU speed set to default (700MHz) from 900MHz: same error as original. All other icon bar apps quit before running Sleuth: same error as original. ARMv7 strict mode (‘ae’ on) and fast mode (‘ae’ off): both produced type 5 fatal errors. Sleuth deleted and reinstalled from originally supplied ZIP: same error as original. So, it beats me; just one of those RISC OS oddities, I suppose, ;-) |
Raik (463) 2061 posts |
Is it the last Version of Sleuth? Was V3 the last? Not sure. I newer used Sleuth. |
Chris Johnson (125) 825 posts |
Just to say: I tried Sleuth3 on the BB a long time ago now and could never get it to work. I might give it a go on the RPi to see what happens. |
Jon Abbott (1421) 2651 posts |
Is Sleuth 3 even 32bit compatible? It might be worth contacting David Bradforth to see if the source is available. As far as I can tell, the latest version is 3.02 which was released in 2000 so is unlikely to be 32bit. |
Chris Johnson (125) 825 posts |
Yes, it is 32-bit. It runs fine on my Iyonix. The version I have is 3.09, no date, but it does have 2004 in the author field (c. APDL and ProAction software). Edit: The !RunImage is dated 3 Jun 2004. |
George T. Greenfield (154) 748 posts |
My version is 3.09 also, and, as mentioned earlier, runs fine on RPCEmu0.8.11/5.20. It does partially work on the Pi, i.e., you can scan and process a sprite as a continuous operation. The problem in my case arises when processing of previously scanned sprites is attempted. |
Jon Abbott (1421) 2651 posts |
There’s a couple of possible root causes I can think of, if it is Sleuth code related: 1. Alignment issues, although I’d expect putting the Pi in ARMv5 mode to resolve it There’s also the possibility its an OS issue. If someone would like to eMail me a copy and detail steps to reproduce the problem, I’m happy to take a look into it for you: jon at jaspp dot org dot uk |
Steve Pampling (1551) 8170 posts |
Drop the !RunImage file onto Armalyser and select “Statistics” only.
Picked up by Armalyser too I think. |
Chris Johnson (125) 825 posts |
There are two occurrences of ‘not 32bit safe’. LDMFD sp!,{a1-ip,pc}^and LDMFD sp!,{v1-v6,pc}^However, Armalyser is vintage 2007, so it could be missing some instructions that are not modern hardware friendly. |
Jon Abbott (1421) 2651 posts |
They could well be the cause of the problems. Have you tried changing them, you can probably just drop the ^ (change E8FD9FFF to E8BD9FFF and E8FD83F0 to E8BD83F0)
I did eMail the author and enquire about the source last year, but didn’t hear anything back. If anyone knows the authors eMail address, perhaps send him a polite eMail, as it could do with a few tweaks. |
George T. Greenfield (154) 748 posts |
Jon: I don’t have Armalyser, but can send you a zipped copy of Sleuth, a sample sprite and details how to reproduce the problem if you are willing to take a look. Email me at george.greenfield/at/tiscali.co.uk [replace /at/ with the usual symbol] and I’ll attach the necessary bits to the reply. |
Jon Abbott (1421) 2651 posts |
I’ve now taken a look (thanks for the Repro George), there are two issues: 1. Although it’s 32bit compatible, it’s not ARMv7 compatible. It looks like it’s making use of rotated loads as setting the Pi to ARMv5 appears to resolve the issue Issue 1 would need a recompile to resolve, or simply run the Pi in ARMv5 mode (change under Configure\CPU)
Place this in the !Sleuth directory and run it, ensuring you take a backup of !RunImage first. EDIT: Although the above fixes the crashing on my Pi, it’s not working for George. Could someone else please try Sleuth in ARMv7, then ARMv5 and see if it’s resolves the crashing when performing an OCR. |
George T. Greenfield (154) 748 posts |
Update: Sleuth3 (with Jon’s mods incorporated) is now working on my Pi. As to the original problem, I suspect a USB card corruption issue, or maybe I had too many nested directories (8), since moving the directory containing the problem sprites to the card’s top level resulted in successful access by Sleuth. I’ve also updated the Pi’s OS version and firmware. The latter (as Jon has pointed out here |