Console-related exception if Aaru is launched as subprocess in Python #906

Closed
opened 2026-01-29 15:32:37 +00:00 by claunia · 11 comments
Owner

Originally created by @bitsgalore on GitHub (Sep 28, 2022).

Version

5.3.0

Commit hash

No response

Tested debug version?

  • Yes

Which operating systems have you used?

  • Windows
  • Linux
  • macOS
  • Other

What is the architectural bit size you're using?

  • 32-bit
  • 64-bit
  • Unsure or unknown

What processor are you using?

  • An Intel or AMD
  • An ARM or Apple Silicon
  • Unsure or unknown

Description

Calling Aaru as a subprocess from a Python script using the standard Python subprocess module results in an Aaru exception if the script is not launched from a terminal. I'm using Python 3.8.10 on Linux Mint 20.1 (ulyssa).

I'll try to demonstrate the issue using the following minimal script, which uses Aaru to create a dump of a 3.5" floppy (the actual Python code I'm developing is a GUI application, but for the sake of simplicity I left the GUI struff out of the example):

#! /usr/bin/env python3
import io
import subprocess as sub

# Aaru binary
aaruBin = "/usr/local/bin/aaru"

# Input device
inDevice = "/dev/sdd"

# Image file name
imageFile = 'test-aaru.img'

# File names for aaru stdout/stderr
aarOut = 'test-aaru.stdout'
aarErr = 'test-aaru.stderr'

# List with Aaru commmand line arguments
args = [aaruBin]
args.append("media")
args.append("dump")
args.append("--encoding")
args.append("utf-8")
args.append("--metadata")
args.append("-d")
args.append(inDevice)
args.append(imageFile)

# Unmount input device
p1 = sub.Popen(['umount', inDevice], stdout=sub.PIPE, stderr=sub.PIPE, shell=False)
output, errors = p1.communicate()

# Run Aaru as subprocess
p2 = sub.Popen(args, stdout=sub.PIPE, stderr=sub.PIPE, shell=False)
output, errors = p2.communicate()

# Write stdout/stderr to file
with io.open(aarOut, "w", encoding="utf-8") as fOut:
    fOut.write(output.decode("utf-8"))
with io.open(aarErr, "w", encoding="utf-8") as fErr:
    fErr.write(errors.decode("utf-8"))

print("aaru return code: " + str(p2.returncode))

The Python subprocess call opens pipes to capture Aaru's stdout and sderr output, and the capture output is written to 2 files.

Exact command line used

aaru media dump --encoding utf-8 --metadata -d /dev/sdd test-aaru.img

Expected behavior

The script runs without problems when run from the terminal like this:

python3 test.py

However, if I run it by double-clicking on it (the script is executable), an exception is raised in Aaru (and the dump isn't completed).

Actual behavior

See debug output below.

The exception appears to be related to happen while Aaru tries to send output to the console. I'm getting the exact same exception in my (more complex) GUI application.

I also tried to disable stdout/stderr output altogether by using:

p2 = sub.Popen(args, stdout=None, stderr=None, shell=False)

However this doesn't make any difference (apart from the fact that I cannot see the exception description in this case). I also experimented with changing the shell value, but this isn't the culprit either. Since I've used similar subrprocess calls many times in the past without any issues, I suspect something in Aaru's console output routines might be the culprit.

I can work around this issue in the development version of my GUI application by launching it from a terminal, but this isn't a good option for the packaged version (which has a clickable desktop launcher).

On a side note, this issue happens on a Windows 10 VM as well (using the Aaru Windows binaries), but since subprocess calls on Windows work slightly differently relative to Linux I won't go into details here, as that might make this bug report unnecessarily convoluted.

Output of command execution with debug output enabled

DEBUG (Dump-Media command): --cicm-xml=
DEBUG (Dump-Media command): --debug=True
DEBUG (Dump-Media command): --device=/dev/sdd
DEBUG (Dump-Media command): --encoding=utf-8
DEBUG (Dump-Media command): --first-pregap=False
DEBUG (Dump-Media command): --fix-offset=True
DEBUG (Dump-Media command): --force=False
DEBUG (Dump-Media command): --format=
DEBUG (Dump-Media command): --metadata=True
DEBUG (Dump-Media command): --options=
DEBUG (Dump-Media command): --output=test-aaru.img
DEBUG (Dump-Media command): --persistent=False
DEBUG (Dump-Media command): --resume=True
DEBUG (Dump-Media command): --retry-passes=5
DEBUG (Dump-Media command): --skip=512
DEBUG (Dump-Media command): --stop-on-error=False
DEBUG (Dump-Media command): --trim=True
DEBUG (Dump-Media command): --verbose=False
DEBUG (Dump-Media command): --subchannel=any
DEBUG (Dump-Media command): --private=False
DEBUG (Dump-Media command): --fix-subchannel-position=True
DEBUG (Dump-Media command): --retry-subchannel=True
DEBUG (Dump-Media command): --fix-subchannel=False
DEBUG (Dump-Media command): --fix-subchannel-crc=False
DEBUG (Dump-Media command): --generate-subchannels=False
DEBUG (Dump-Media command): --skip-cdiready-hole=True
DEBUG (Dump-Media command): --eject=False
DEBUG (Dump-Media command): --max-blocks=64
DEBUG (Dump-Media command): --use-buffered-reads=True
DEBUG (Dump-Media command): --store-encrypted=True
DEBUG (Dump-Media command): --title-keys=True
DEBUG (Dump-Media command): Parsed options:
DEBUG (SCSI Device): INQUIRY took 64 ms.
DEBUG (SCSI Device): INQUIRY took 288 ms.
DEBUG (ATA Device): IDENTIFY PACKET DEVICE took 0.0058 ms.
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.ArgumentOutOfRangeException: Count cannot be less than zero. (Parameter 'count')
   at System.String.Ctor(Char c, Int32 count)
   at Aaru.Progress.ClearCurrentConsoleLine()
   at Aaru.Progress.UpdateStatus(String text)
   at Aaru.Core.Devices.Dumping.Dump.Start() in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/Dump.cs:line 214
   at Aaru.Commands.Media.DumpMediaCommand.Invoke(Boolean debug, Boolean verbose, String cicmXml, String devicePath, Boolean resume, String encoding, Boolean firstPregap, Boolean fixOffset, Boolean force, Boolean metadata, Boolean trim, String outputPath, String options, Boolean persistent, UInt16 retryPasses, UInt32 skip, Byte speed, Boolean stopOnError, String format, String subchannel, Boolean private, Boolean fixSubchannelPosition, Boolean retrySubchannel, Boolean fixSubchannel, Boolean fixSubchannelCrc, Boolean generateSubchannels, Boolean skipCdiReadyHole, Boolean eject, UInt32 maxBlocks, Boolean useBufferedReads, Boolean storeEncrypted, Boolean titleKeys)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__19_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass21_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__20_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__10_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__9_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseExceptionHandler>b__0>d.MoveNext()
Originally created by @bitsgalore on GitHub (Sep 28, 2022). ### Version 5.3.0 ### Commit hash _No response_ ### Tested debug version? - [X] Yes ### Which operating systems have you used? - [ ] Windows - [X] Linux - [ ] macOS - [ ] Other ### What is the architectural bit size you're using? - [ ] 32-bit - [X] 64-bit - [ ] Unsure or unknown ### What processor are you using? - [X] An Intel or AMD - [ ] An ARM or Apple Silicon - [ ] Unsure or unknown ### Description Calling Aaru as a subprocess from a Python script using the standard Python [subprocess](https://docs.python.org/3/library/subprocess.html) module results in an Aaru exception if the script is not launched from a terminal. I'm using Python 3.8.10 on Linux Mint 20.1 (ulyssa). I'll try to demonstrate the issue using the following minimal script, which uses Aaru to create a dump of a 3.5" floppy (the actual Python code I'm developing is a GUI application, but for the sake of simplicity I left the GUI struff out of the example): ```python #! /usr/bin/env python3 import io import subprocess as sub # Aaru binary aaruBin = "/usr/local/bin/aaru" # Input device inDevice = "/dev/sdd" # Image file name imageFile = 'test-aaru.img' # File names for aaru stdout/stderr aarOut = 'test-aaru.stdout' aarErr = 'test-aaru.stderr' # List with Aaru commmand line arguments args = [aaruBin] args.append("media") args.append("dump") args.append("--encoding") args.append("utf-8") args.append("--metadata") args.append("-d") args.append(inDevice) args.append(imageFile) # Unmount input device p1 = sub.Popen(['umount', inDevice], stdout=sub.PIPE, stderr=sub.PIPE, shell=False) output, errors = p1.communicate() # Run Aaru as subprocess p2 = sub.Popen(args, stdout=sub.PIPE, stderr=sub.PIPE, shell=False) output, errors = p2.communicate() # Write stdout/stderr to file with io.open(aarOut, "w", encoding="utf-8") as fOut: fOut.write(output.decode("utf-8")) with io.open(aarErr, "w", encoding="utf-8") as fErr: fErr.write(errors.decode("utf-8")) print("aaru return code: " + str(p2.returncode)) ``` The Python subprocess call opens pipes to capture Aaru's stdout and sderr output, and the capture output is written to 2 files. ### Exact command line used aaru media dump --encoding utf-8 --metadata -d /dev/sdd test-aaru.img ### Expected behavior The script runs without problems when run from the terminal like this: ```bash python3 test.py ``` However, if I run it by double-clicking on it (the script is executable), an exception is raised in Aaru (and the dump isn't completed). ### Actual behavior See debug output below. The exception appears to be related to happen while Aaru tries to send output to the console. I'm getting the exact same exception in my (more complex) GUI application. I also tried to disable stdout/stderr output altogether by using: ```python p2 = sub.Popen(args, stdout=None, stderr=None, shell=False) ``` However this doesn't make any difference (apart from the fact that I cannot see the exception description in this case). I also experimented with changing the `shell` value, but this isn't the culprit either. Since I've used similar subrprocess calls many times in the past without any issues, I suspect something in Aaru's console output routines might be the culprit. I can work around this issue in the development version of my GUI application by launching it from a terminal, but this isn't a good option for the packaged version (which has a clickable desktop launcher). On a side note, this issue happens on a Windows 10 VM as well (using the Aaru Windows binaries), but since subprocess calls on Windows work slightly differently relative to Linux I won't go into details here, as that might make this bug report unnecessarily convoluted. ### Output of command execution with debug output enabled ```shell DEBUG (Dump-Media command): --cicm-xml= DEBUG (Dump-Media command): --debug=True DEBUG (Dump-Media command): --device=/dev/sdd DEBUG (Dump-Media command): --encoding=utf-8 DEBUG (Dump-Media command): --first-pregap=False DEBUG (Dump-Media command): --fix-offset=True DEBUG (Dump-Media command): --force=False DEBUG (Dump-Media command): --format= DEBUG (Dump-Media command): --metadata=True DEBUG (Dump-Media command): --options= DEBUG (Dump-Media command): --output=test-aaru.img DEBUG (Dump-Media command): --persistent=False DEBUG (Dump-Media command): --resume=True DEBUG (Dump-Media command): --retry-passes=5 DEBUG (Dump-Media command): --skip=512 DEBUG (Dump-Media command): --stop-on-error=False DEBUG (Dump-Media command): --trim=True DEBUG (Dump-Media command): --verbose=False DEBUG (Dump-Media command): --subchannel=any DEBUG (Dump-Media command): --private=False DEBUG (Dump-Media command): --fix-subchannel-position=True DEBUG (Dump-Media command): --retry-subchannel=True DEBUG (Dump-Media command): --fix-subchannel=False DEBUG (Dump-Media command): --fix-subchannel-crc=False DEBUG (Dump-Media command): --generate-subchannels=False DEBUG (Dump-Media command): --skip-cdiready-hole=True DEBUG (Dump-Media command): --eject=False DEBUG (Dump-Media command): --max-blocks=64 DEBUG (Dump-Media command): --use-buffered-reads=True DEBUG (Dump-Media command): --store-encrypted=True DEBUG (Dump-Media command): --title-keys=True DEBUG (Dump-Media command): Parsed options: DEBUG (SCSI Device): INQUIRY took 64 ms. DEBUG (SCSI Device): INQUIRY took 288 ms. DEBUG (ATA Device): IDENTIFY PACKET DEVICE took 0.0058 ms. Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Count cannot be less than zero. (Parameter 'count') at System.String.Ctor(Char c, Int32 count) at Aaru.Progress.ClearCurrentConsoleLine() at Aaru.Progress.UpdateStatus(String text) at Aaru.Core.Devices.Dumping.Dump.Start() in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/Dump.cs:line 214 at Aaru.Commands.Media.DumpMediaCommand.Invoke(Boolean debug, Boolean verbose, String cicmXml, String devicePath, Boolean resume, String encoding, Boolean firstPregap, Boolean fixOffset, Boolean force, Boolean metadata, Boolean trim, String outputPath, String options, Boolean persistent, UInt16 retryPasses, UInt32 skip, Byte speed, Boolean stopOnError, String format, String subchannel, Boolean private, Boolean fixSubchannelPosition, Boolean retrySubchannel, Boolean fixSubchannel, Boolean fixSubchannelCrc, Boolean generateSubchannels, Boolean skipCdiReadyHole, Boolean eject, UInt32 maxBlocks, Boolean useBufferedReads, Boolean storeEncrypted, Boolean titleKeys) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context) at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__19_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseHelp>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass21_0.<<UseTypoCorrections>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__20_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__18_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__10_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__9_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseExceptionHandler>b__0>d.MoveNext() ```
claunia added the bugneeds triage labels 2026-01-29 15:32:37 +00:00
Author
Owner

@claunia commented on GitHub (Sep 28, 2022):

Hi,

In 5.3.0 we were using System.Console that is, quite peculiar, with any kind of TTY that's not the Win32 basic one.

Please try in -devel where we use Spectre.Console and comment the results.

@claunia commented on GitHub (Sep 28, 2022): Hi, In 5.3.0 we were using System.Console that is, quite peculiar, with any kind of TTY that's not the Win32 basic one. Please try in -devel where we use Spectre.Console and comment the results.
Author
Owner

@robin-francois commented on GitHub (Sep 29, 2022):

Hi @bitsgalore,

If necesarry, we can provide you with a version to test the new behaviour in the 6.0-devel version.

I have been through your repository and I have seen that you have been integrating aaru in your existing workflow. We are very happy about that and would love to discuss and exchange with you if you have any questions. We have a Discord server but we can use any communication mean you prefer.

Regards

@robin-francois commented on GitHub (Sep 29, 2022): Hi @bitsgalore, If necesarry, we can provide you with a version to test the new behaviour in the 6.0-devel version. I have been through your repository and I have seen that you have been integrating aaru in your existing workflow. We are very happy about that and would love to discuss and exchange with you if you have any questions. We have a Discord server but we can use any communication mean you prefer. Regards
Author
Owner

@bitsgalore commented on GitHub (Sep 29, 2022):

Hi @claunia and @robin-francois,

Thanks for the prompt response! I tried to build the development version (after first installing the .NET SDK and runtime following the instructions here), as well as pcregrep (which is not listed as a dependency, but is needed anyway).

However, running the build script fails with various reported errors and warnings. One recurring error is:

/usr/share/dotnet/sdk/6.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(267,5):
error NETSDK1005: Assets file '/home/johan/Aaru/Aaru/obj/project.assets.json' doesn't have a target for 'net6'. Ensure that
restore has run and that you have included 'net6' in the TargetFrameworks for your project. [/home/johan/Aaru/Aaru/Aaru.csproj]

But if I check project.assets.json, I see:

<TargetFramework>net6.0</TargetFramework>

and in project.assets.json:

{
  "version": 3,
  "targets": {
    "net6.0": {
      "Aaru.Compression.Native/6.0.0-alpha8": {
        "type": "package",
        "runtimeTargets": {
          "runtimes/android-arm/native/libAaru.Compression.Native.so": {
            "assetType": "native",
            "rid": "android-arm"
          },
          ::
          etc

So I don't really understand what I'm doing wrong (should perhaps add that I've never built a .NET application before).

I uploaded the full build log (stdout + stderr) here, in case that helps.

But if you would be able to provide me with binaries of the 6.0 devel version that might perhaps be easier.

(BTW I'll try to sett up a Discord account later today)

@bitsgalore commented on GitHub (Sep 29, 2022): Hi @claunia and @robin-francois, Thanks for the prompt response! I tried to build the development version (after first installing the .NET SDK and runtime following the instructions [here](https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2004)), as well as pcregrep (which is not listed as a dependency, but is needed anyway). However, running the build script fails with various reported errors and warnings. One recurring error is: ``` /usr/share/dotnet/sdk/6.0.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(267,5): error NETSDK1005: Assets file '/home/johan/Aaru/Aaru/obj/project.assets.json' doesn't have a target for 'net6'. Ensure that restore has run and that you have included 'net6' in the TargetFrameworks for your project. [/home/johan/Aaru/Aaru/Aaru.csproj] ``` But if I check project.assets.json, I see: ```xml <TargetFramework>net6.0</TargetFramework> ``` and in project.assets.json: ```json { "version": 3, "targets": { "net6.0": { "Aaru.Compression.Native/6.0.0-alpha8": { "type": "package", "runtimeTargets": { "runtimes/android-arm/native/libAaru.Compression.Native.so": { "assetType": "native", "rid": "android-arm" }, :: etc ``` So I don't really understand what I'm doing wrong (should perhaps add that I've never built a .NET application before). I uploaded the full build log (stdout + stderr) [here](https://gist.github.com/bitsgalore/a9fe1448c0479cc15383e31809ab46e7), in case that helps. But if you would be able to provide me with binaries of the 6.0 devel version that might perhaps be easier. (BTW I'll try to sett up a Discord account later today)
Author
Owner

@robin-francois commented on GitHub (Sep 29, 2022):

Hello @bitsgalore,

You will find the two amd64 tarballs here (standard and debug): https://www.swisstransfer.com/d/393d3d82-8880-4389-bf5b-abcf81d0ca38

Please be aware that dumps with the devel version should not be kept and devel versions should only be used for debugging.

Regards

@robin-francois commented on GitHub (Sep 29, 2022): Hello @bitsgalore, You will find the two amd64 tarballs here (standard and debug): https://www.swisstransfer.com/d/393d3d82-8880-4389-bf5b-abcf81d0ca38 Please be aware that dumps with the `devel` version should not be kept and `devel` versions should only be used for debugging. Regards
Author
Owner

@bitsgalore commented on GitHub (Sep 29, 2022):

Hi @robin-francois,

That's perfect, I just gave it a spin and now it all works perfectly, also inside my workflow. Thanks for that! Do you have any indication at what time (roughly) these changes will make it into a regular release?

As for Discord: I tried to set up an account, but after completing the lengthy verification process (which involved several CAPTCHA rounds, including a pretty bizarre one involving swimming rabbits), Discord then instantly disabled the account for violating their Terms Of Service. No idea why, but it looks like that's not going to work. Anyway, as I saw you also DMed me on Twitter, I'll drop you a message there with my email address. Thanks again for your help!

@bitsgalore commented on GitHub (Sep 29, 2022): Hi @robin-francois, That's perfect, I just gave it a spin and now it all works perfectly, also inside my workflow. Thanks for that! Do you have any indication at what time (roughly) these changes will make it into a regular release? As for Discord: I tried to set up an account, but after completing the lengthy verification process (which involved several CAPTCHA rounds, including a pretty bizarre one involving swimming rabbits), Discord then instantly disabled the account for violating their Terms Of Service. No idea why, but it looks like that's not going to work. Anyway, as I saw you also DMed me on Twitter, I'll drop you a message there with my email address. Thanks again for your help!
Author
Owner

@claunia commented on GitHub (Sep 30, 2022):

Hi @bitsgalore,

There is not a timeframe for when 6.0 will be released (it has a huge roadmap and 5.3 is stable on all it does so no hurries for 6.0 until all that needs to be done is done).

However, if you can provide me with the smallest python snippet that exhibits the error I'll see how to fix it in the -stable (5.3) branch, as what makes it work in -devel is a huge framework change that added thousands of bugs in the process, so backporting is unfortunately, not an option.

@claunia commented on GitHub (Sep 30, 2022): Hi @bitsgalore, There is not a timeframe for when 6.0 will be released (it has a huge roadmap and 5.3 is stable on all it does so no hurries for 6.0 until all that needs to be done is done). However, if you can provide me with the smallest python snippet that exhibits the error I'll see how to fix it in the -stable (5.3) branch, as what makes it work in -devel is a huge framework change that added thousands of bugs in the process, so backporting is unfortunately, not an option.
Author
Owner

@bitsgalore commented on GitHub (Oct 3, 2022):

@claunia If that's possible that would be perfect, thanks! I think the snippet in my original issue description is already pretty much the smallest one I can think of. Just save the code to a text file, make it executable (chmod 755 test.py), modify aaruBin and inDevice to your local situation if necessary and then double-click in a file explorer window. Of course I can prepare a minimal GUI example, but it won't make any difference for the purpose of reproducing the error (and adding the GUI code will make it quite a bit more convoluted). But if you prefer a GUI example just let me know, and I'll prepare one.

As an aside, I'm wondering if simply adding an option to suppress all stdout/stderr output (perhaps using a --quiet option) could be a viable fix here? My software doesn't really need or use the stdout/stderr output anyway (aaru's exit code + the generated output files provide all the info it needs). Just thought I'd mention this, as I imagine this might perhaps be relatively simple to implement?

@bitsgalore commented on GitHub (Oct 3, 2022): @claunia If that's possible that would be perfect, thanks! I think the snippet in my original issue description is already pretty much the smallest one I can think of. Just save the code to a text file, make it executable (`chmod 755 test.py`), modify *aaruBin* and *inDevice* to your local situation if necessary and then double-click in a file explorer window. Of course I can prepare a minimal GUI example, but it won't make any difference for the purpose of reproducing the error (and adding the GUI code will make it quite a bit more convoluted). But if you prefer a GUI example just let me know, and I'll prepare one. As an aside, I'm wondering if simply adding an option to suppress all stdout/stderr output (perhaps using a `--quiet` option) could be a viable fix here? My software doesn't really need or use the stdout/stderr output anyway (aaru's exit code + the generated output files provide all the info it needs). Just thought I'd mention this, as I imagine this might perhaps be relatively simple to implement?
Author
Owner

@bitsgalore commented on GitHub (Nov 16, 2022):

Hi @claunia, a small update on this: for the time being I've now added a wrapper for ddrescue to my own workflow software (I had already developed that several years ago for another project), and made the wrapped imaging application user-defined, with Ddrescue and Aaru as current options.

I would suggest to leave this issue in the Aaru 5.3 branch as-is (i.e. don't fix it). Once 6.0 is out, my software will readily support it, and in the meantime me and my colleagues can just move ahead with ddrescue. This way we also prevent that this issue ends up eating up time for you that would perhaps be better spent on the 6.0 release.

Does that make sense? Feel free to close the issue if you like. Thanks again for your help!

@bitsgalore commented on GitHub (Nov 16, 2022): Hi @claunia, a small update on this: for the time being I've now added a wrapper for ddrescue to my own workflow software (I had already developed that several years ago for another project), and made the wrapped imaging application user-defined, with Ddrescue and Aaru as current options. I would suggest to leave this issue in the Aaru 5.3 branch as-is (i.e. don't fix it). Once 6.0 is out, my software will readily support it, and in the meantime me and my colleagues can just move ahead with ddrescue. This way we also prevent that this issue ends up eating up time for you that would perhaps be better spent on the 6.0 release. Does that make sense? Feel free to close the issue if you like. Thanks again for your help!
Author
Owner

@claunia commented on GitHub (Nov 25, 2022):

Sounds perfect, but the issue shall only be closed if you know it doesn't fail with 6.0.

@claunia commented on GitHub (Nov 25, 2022): Sounds perfect, but the issue shall only be closed if you know it doesn't fail with 6.0.
Author
Owner

@bitsgalore commented on GitHub (Nov 25, 2022):

OK, I will let you know once 6.0 is out! (BTW it worked fine for me with the 6.0 development version I tried, so I don't expect that will change in the eventual release.)

@bitsgalore commented on GitHub (Nov 25, 2022): OK, I will let you know once 6.0 is out! (BTW it worked fine for me with the 6.0 development version I tried, so I don't expect that will change in the eventual release.)
Author
Owner

@claunia commented on GitHub (Apr 26, 2024):

Same as #843 works in -devel. Closing.

@claunia commented on GitHub (Apr 26, 2024): Same as #843 works in `-devel`. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: aaru-dps/Aaru-aaru-dps#906