Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amiga CLI commands keep crashing? #90

Open
aiobofh opened this issue Sep 26, 2018 · 4 comments
Open

Amiga CLI commands keep crashing? #90

aiobofh opened this issue Sep 26, 2018 · 4 comments

Comments

@aiobofh
Copy link

aiobofh commented Sep 26, 2018

Hey! First of all a HUGE THANK YOU for amitools/vamos. This is GRAVELY entertaining and fun!

But. I might just have misunderstood something or there is something wrong with my set-up or there is a bug somewhere in the python code.

If I invoke the SAS/C tools i tried out first everythings seems to work pretty ok. But for example Dir or Delete or List... or whatever keep crashing on me:

$ vamos -c ~/.vamosrc dir sys:
06:53:00.559 machine: ERROR: ----- ERROR in CPU Run #1 -----
06:53:00.559 machine: ERROR: Run: 'dir': Initial PC=002204, SP=004f48
06:53:00.559 machine: ERROR: PC=00001c6e SR=-----
06:53:00.560 machine: ERROR: D0=00000006 D1=000059b0 D2=00004c56 D3=00000000 D4=00000000 D5=00000000 D6=00000000 D7=00000000
06:53:00.560 machine: ERROR: A0=000059b0 A1=00004c56 A2=00001ae8 A3=0000133c A4=00000000 A5=00004f44 A6=00001ae8 A7=00004c24
06:53:00.560 machine: ERROR: SP-32=000000 SP-28=000000 SP-24=000000 SP-20=000000 SP-16=000000 SP-12=000000 SP-08=000000 SP-04=000000
06:53:00.560 machine: ERROR: SP+00=002380 SP+04=002000 SP+08=000000 SP+12=ff01dd05 SP+16=000000 SP+20=ff01dd05 SP+24=0059b8 SP+28=00133c
06:53:00.560 machine: ERROR: Traceback (most recent call last):
06:53:00.560 machine: ERROR: File "musashi/pytraps.pyx", line 20, in musashi.emu.trap_wrapper
06:53:00.560 machine: ERROR: py_func(opcode, pc)
06:53:00.560 machine: ERROR: File "/usr/local/lib/python2.7/dist-packages/amitools-0.2.0-py2.7-linux-x86_64.egg/amitools/vamos/libcore/stub.py", line 175, in base_func
06:53:00.560 machine: ERROR: res = impl_method(ctx)
06:53:00.560 machine: ERROR: File "/usr/local/lib/python2.7/dist-packages/amitools-0.2.0-py2.7-linux-x86_64.egg/amitools/vamos/lib/DosLibrary.py", line 1069, in MatchFirst
06:53:00.560 machine: ERROR: err = mfn.first(ctx)
06:53:00.560 machine: ERROR: File "/usr/local/lib/python2.7/dist-packages/amitools-0.2.0-py2.7-linux-x86_64.egg/amitools/vamos/lib/dos/MatchFirstNext.py", line 34, in first
06:53:00.560 machine: ERROR: self.path = self.matcher.begin()
06:53:00.560 machine: ERROR: File "/usr/local/lib/python2.7/dist-packages/amitools-0.2.0-py2.7-linux-x86_64.egg/amitools/vamos/lib/dos/PathMatch.py", line 154, in begin
06:53:00.560 machine: ERROR: if self.path_mgr.ami_path_exists(self.lock,ami_path):
06:53:00.560 machine: ERROR: File "/usr/local/lib/python2.7/dist-packages/amitools-0.2.0-py2.7-linux-x86_64.egg/amitools/vamos/path/vamos.py", line 180, in ami_path_exists
06:53:00.560 machine: ERROR: sys_path = self.ami_to_sys_path(lock, ami_path, mustExist=True)
06:53:00.560 machine: ERROR: NameError: global name 'lock' is not defined
06:53:00.560 main: ERROR: vamos failed!

Is this due to a bug or something in my set-up. I just tried it yesterday evening - But I was supprised that more complex tools like the SAS/C suite works nicely but the AmigaDOS stuff doesnt.

Kind regards,
AiO

@rmtew
Copy link
Contributor

rmtew commented Sep 26, 2018 via email

@aiobofh
Copy link
Author

aiobofh commented Sep 26, 2018

Great - Thanks! Hand-patched it for now :) But it exposed more things.

07:10:23.697 machine: ERROR: File "/usr/local/lib/python2.7/dist-packages/amitools-0.2.0-py2.7-linux-x86_64.egg/amitools/vamos/lib/dos/MatchFirstNext.py", line 72, in _fill_fib
07:10:23.697 machine: ERROR: self.anchor.w_cstr(path_ptr, path)
07:10:23.697 machine: ERROR: AttributeError: 'AccessStruct' object has no attribute 'w_cstr'

I guess it will be looked in to deeper in a better time than during the morning-coffee-before-work-hack :D

@cnvogelg
Copy link
Owner

Thanks for your bug report!
bc92fe0 should fix the issue...
Please test

@aiobofh
Copy link
Author

aiobofh commented Sep 27, 2018

@cnvogelg That's awesome thank you! Works like a charm now.

Now my smakefile can clean-up after itself, using DELETE :D

However I noticed a few other quirks. I dynamically concatenate several smakefiles into one big (only way i know how to emulate include-directive). And the AmigaDOS type command redirects text to CON: anyway (i guess) even though I use > redirection to a file.

This might be something to add (as a feature)?

And... Vamos does not seem to like invoking smake inside a smakefile (of the generated files i mentioned above) For example:

$ cat smakefile
INCDIR=/include/
all:
smake -s -f $(INCDIR)some_other_smake.mk check VARIABLE=value
clean:
smake -s -f $(INCDIR)some_other_smake.mk clean VARIABLE=value

This works with the same smake version in FS-UAE, but in Vamos i get infinite recursion or something.

21:05:55.714 machine: ERROR: File "/usr/local/lib/python2.7/dist-packages/amitools-0.2.0-py2.7-linux-x86_64.egg/amitools/vamos/machine/machine.py", line 478, in run
21:05:55.714 machine: ERROR: raise NestedCPURunError(pc, run_state.error)
21:05:55.714 machine: ERROR: NestedCPURunError: Nested CPU Run Failed: pc=001c26: NestedCPURunError: Nested CPU Run Failed: pc=001c26: RuntimeError: maximum recursion depth exceeded

But I guess this is a known "bug" or lacking feature too? I recall reading something about sub-processes not being implemented yet - Correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants