Running #CSpect on Ubuntu (Debian)

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
Post Reply
User avatar
MonkZy
Manic Miner
Posts: 279
Joined: Thu Feb 08, 2018 1:01 pm

Running #CSpect on Ubuntu (Debian)

Post by MonkZy »

I have spent a few evenings trying to run #CSpect on Ubuntu, with no success.

I have installed Mono

Code: Select all

me@home:~/cspect$ mono -V
Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1ubuntu1)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen
I have placed the roms and a 2GB image in the root of the install

Code: Select all

me@home:~/cspect$ ls
3xAY                 dll_src           LowResDemo         parallax.nex
ay8912.dll           DMA               Mouse              Plugin.dll
Beast                enNextZX.rom      NXtel.bat          Plugins
beast.bat            enNxtmmc.rom      NXtel.nex          snasm.exe
beast.nex            i2C_Sample        openal32.dll       SNASM.rtf
CSpect.exe           i2C_Sample.dll    OpenTK.dll
cspect-next-2gb.img  known_issues.txt  OpenTK.dll.config
CSpectReadme.txt     Layer2            parallax.bat
I am using the following line to launch CSpect. I am using -sound due to missing the openal32.dll. The dll zip file from the zxspectrumnext.online site will not open in my archive manager. I tried some other openal32.dlls I found elsewhere but have since been using -sound which I am assuming will let you run CSpect without the dll present.

Code: Select all

mono CSpect.exe -w3 -sound -zxnext -nextrom -mmc=cspect-next-2gb.img
It fails with a SIGABRT

Code: Select all

Next ROM enabled
* Assertion at local-propagation.c:330, condition `ins->opcode > MONO_CEE_LAST' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at OpenTK.BindingsBase.MarshalStringArrayToPtr (string[]) <0x0009f>
  at OpenTK.Graphics.OpenGL.GL.ShaderSource (uint,int,string[],int*) <0x00023>
  at OpenTK.Graphics.OpenGL.GL.ShaderSource (int,string) <0x0006f>
  at A.F.A (OpenTK.Graphics.OpenGL.ShaderType,string,int&) <0x00037>
  at A.F.A (string,string,string) <0x000d7>
  at A.v.A (string[]) <0x00697>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0x000d1>

Native stacktrace:

	mono(+0xc8514) [0x55c5db358514]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890) [0x7ff1f6d21890]
	/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7) [0x7ff1f6744e97]
	/lib/x86_64-linux-gnu/libc.so.6(abort+0x141) [0x7ff1f6746801]
	mono(+0x289769) [0x55c5db519769]
	mono(+0x2899fc) [0x55c5db5199fc]
	mono(+0x289b93) [0x55c5db519b93]
	mono(+0x962ab) [0x55c5db3262ab]
	mono(+0x12d5da) [0x55c5db3bd5da]
	mono(+0x12df39) [0x55c5db3bdf39]
	mono(+0x3c170) [0x55c5db2cc170]
	mono(+0xc9ef6) [0x55c5db359ef6]
	mono(+0xca83c) [0x55c5db35a83c]
	[0x408f4298]

Debug info from gdb:

[New LWP 11040]
[New LWP 11041]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007ff1f6d2123a in __waitpid (pid=11042, stat_loc=0x7ffd8f37632c, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
30	../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
  Id   Target Id         Frame 
* 1    Thread 0x7ff1f78db780 (LWP 11039) "Main" 0x00007ff1f6d2123a in __waitpid (pid=11042, stat_loc=0x7ffd8f37632c, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
  2    Thread 0x7ff1f57ff700 (LWP 11040) "SGen worker" 0x00007ff1f6d1c9f3 in futex_wait_cancelable (private=<optimised out>, expected=0, futex_word=0x55c5db84ba08) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  3    Thread 0x7ff1f3434700 (LWP 11041) "Finalizer" 0x00007ff1f6d1f6d6 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x55c5db83c640) at ../sysdeps/unix/sysv/linux/futex-internal.h:205

Thread 3 (Thread 0x7ff1f3434700 (LWP 11041)):
#0  0x00007ff1f6d1f6d6 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x55c5db83c640) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x55c5db83c640, abstime=0x0) at sem_waitcommon.c:111
#2  0x00007ff1f6d1f7c8 in __new_sem_wait_slow (sem=0x55c5db83c640, abstime=0x0) at sem_waitcommon.c:181
#3  0x000055c5db474dc9 in ?? ()
#4  0x000055c5db452be1 in ?? ()
#5  0x000055c5db51214a in ?? ()
#6  0x00007ff1f6d166db in start_thread (arg=0x7ff1f3434700) at pthread_create.c:463
#7  0x00007ff1f682788f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7ff1f57ff700 (LWP 11040)):
#0  0x00007ff1f6d1c9f3 in futex_wait_cancelable (private=<optimised out>, expected=0, futex_word=0x55c5db84ba08) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55c5db84ba20, cond=0x55c5db84b9e0) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55c5db84b9e0, mutex=0x55c5db84ba20) at pthread_cond_wait.c:655
#3  0x000055c5db4e0863 in ?? ()
#4  0x00007ff1f6d166db in start_thread (arg=0x7ff1f57ff700) at pthread_create.c:463
#5  0x00007ff1f682788f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7ff1f78db780 (LWP 11039)):
#0  0x00007ff1f6d2123a in __waitpid (pid=11042, stat_loc=0x7ffd8f37632c, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1  0x000055c5db3585f0 in ?? ()
#2  <signal handler called>
#3  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#4  0x00007ff1f6746801 in __GI_abort () at abort.c:79
#5  0x000055c5db519769 in ?? ()
#6  0x000055c5db5199fc in ?? ()
#7  0x000055c5db519b93 in ?? ()
#8  0x000055c5db3262ab in ?? ()
#9  0x000055c5db3bd5da in ?? ()
#10 0x000055c5db3bdf39 in ?? ()
#11 0x000055c5db2cc170 in ?? ()
#12 0x000055c5db359ef6 in ?? ()
#13 0x000055c5db35a83c in ?? ()
#14 0x00000000408f4298 in ?? ()
#15 0x00007ff1f3704263 in System_Runtime_InteropServices_Marshal_AllocHGlobal_int (cb=-603568715) from /usr/lib/mono/aot-cache/amd64/mscorlib.dll.so
#16 0x00000000415e20e0 in ?? ()
#17 0x00007ffd8f3779c8 in ?? ()
#18 0x00007ffd8f377b20 in ?? ()
#19 0x00007ffd8f3779d8 in ?? ()
#20 0x00007ff1f78db740 in ?? ()
#21 0x00007ff1f583aeb0 in ?? ()
#22 0x0000000000000001 in ?? ()
#23 0x000055c5dc865870 in ?? ()
#24 0x00007ffd8f3781f0 in ?? ()
#25 0x00007ffd8f377b20 in ?? ()
#26 0x00007ffd8f377b70 in ?? ()
#27 0x000055c5dc00e010 in ?? ()
#28 0x00007ff1f581a4f0 in ?? ()
#29 0x0000000000000001 in ?? ()
#30 0x0000000000000002 in ?? ()
#31 0x000055c5dc00e010 in ?? ()
#32 0x00000000408f4a46 in ?? ()
#33 0x00007ffd8f3781e0 in ?? ()
#34 0x00007ff1f5804f78 in ?? ()
#35 0x00007ff1f583ae90 in ?? ()
#36 0x00007ff1f583ae90 in ?? ()
#37 0x00000000415e20e0 in ?? ()
#38 0x0000000000000000 in ?? ()

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Quite likely I have made a mistake somewhere. Does anyone have experience of running CSpect under Linux?
User avatar
MonkZy
Manic Miner
Posts: 279
Joined: Thu Feb 08, 2018 1:01 pm

Re: Running #CSpect on Ubuntu (Debian)

Post by MonkZy »

I Have now solved this.

Ubuntu 18.04 has an old version of Mono (4.6.2) in their repo :oops:

I followed the instructions here :

https://www.mono-project.com/download/s ... wnload-lin

and updated Mono to the latest stable version (6.8.0).

#CSpect is now working :D
Post Reply