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

Where to place siappdll.dll? #2

Open
TheGreenMamba opened this issue Dec 10, 2022 · 21 comments
Open

Where to place siappdll.dll? #2

TheGreenMamba opened this issue Dec 10, 2022 · 21 comments

Comments

@TheGreenMamba
Copy link

Hi,
I'm wondering where I should place the siappdll.dll?
I tried many different locations:

  • .fusion360/wineprefixes/default/drive_c/Program\ Files/Autodesk
  • .fusion360/wineprefixes/default/drive_c/Program\ Files/Autodesk/webdeploy/production/81ea974ab1a66e3de83fe316ff859f913e6ff720/
  • .fusion360/wineprefixes/default/drive_c/Program\ Files/Autodesk/webdeploy/production/81ea974ab1a66e3de83fe316ff859f913e6ff720/CPP/lib

And a lot of others. It would be nice if the Readme.md would explain this a little bit more.

Thx for the awesome work!

@DD1984
Copy link
Owner

DD1984 commented Dec 11, 2022

siappdll.dll must be placed to folder where Fusion360.exe placed
in my filesystem this path is:
~/.wine/drive_c/users/dmitriy/Local Settings/Application Data/Autodesk/webdeploy/production/96a31d03bc575ff47e83b445639b5f6bf3c08c6f
be sure that you complete all other items of installation procedure, that was explained in readme

@DD1984
Copy link
Owner

DD1984 commented Dec 11, 2022 via email

@TheGreenMamba
Copy link
Author

I tested it yesterday, but unfortunately it doesn't work :(

  • spacenavd is installed and started via sudo spacenavd
  • spnavcfg is installed and recognizes the spacemouse
  • my Fusion360.exe is, for some strange reason, in /home/mamba/.fusion360/wineprefixes/default/drive_c/Program Files/Autodesk/webdeploy/production/81ea974ab1a66e3de83fe316ff859f913e6ff720/Fusion360.exe and this is where I put the dll.

But as I said, I can't get mouse to work in fusion.

Is there anything I can debug, to see if this dll gets loaded?

@DD1984
Copy link
Owner

DD1984 commented Dec 12, 2022

do you select "legacy" spacemouse driver in fusion360 settings?

@TheGreenMamba
Copy link
Author

yes, "legacy" is selected

@DD1984
Copy link
Owner

DD1984 commented Dec 15, 2022 via email

@TheGreenMamba
Copy link
Author

Sorry for taking so long to get back to this.
I tried the old solution, which is working perfect!

Thank you very much for the work! I now can get rid off Windows forever ❤️

@zakutin
Copy link

zakutin commented Feb 24, 2023

Hi @DD1984, I have the same issue as @TheGreenMamba has. Is there any way to get siappdll.dll working?

@DD1984
Copy link
Owner

DD1984 commented Feb 25, 2023

Hi @DD1984, I have the same issue as @TheGreenMamba has. Is there any way to get siappdll.dll working?

Hello, pls tell me model of your space mouse; i will add some debug and we will try to solve this issue

@DD1984 DD1984 reopened this Feb 25, 2023
@DD1984
Copy link
Owner

DD1984 commented Feb 25, 2023

Sorry for taking so long to get back to this. I tried the old solution, which is working perfect!

it is strange that old solution work, but new not. Both of them use similar methods to read data from spacenavd.
old solution read (using special daemon) 32 bytes from spacenavd socket and than send it from local network to fusion360 addon.
new solution read (into dll) 32bytes from socket directly using way with call linux kernel syscalls directly from dll (using asm)

pls try to use dll with debug
in console you can see similar this: [*** SPMOUSE ***] INFO Starting siappdll replacement

@TheGreenMamba
Copy link
Author

For me the new solution didn't work the last time I tried, but I just tested the dll with debug and now it's working!
I have a 3Dconnexion SpaceNavigator.

I'm using this to setup fusion and therefore I have to place the dll in $HOME/.fusion360/wineprefixes/default/drive_c/Program Files/Autodesk/webdeploy/production/81ea974ab1a66e3de83fe316ff859f913e6ff720.
BTW: I think it would be great if your project could be integrated into the project linked before 😍

When starting I can see the messages:

[*** SPMOUSE ***] INFO Starting siappdll replacement
09f0:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 000000000011F904, 000000000011F920 000000000011F900
09f0:fixme:nls:get_dummy_preferred_ui_language (0x38 0x409 000000000011F904 000000000011F920 000000000011F900) returning a dummy value (current locale)
09f0:fixme:heap:RtlSetHeapInformation handle 0000000000000000, info_class 1, info 0000000000000000, size 0 stub!
[*** SPMOUSE ***] INFO Siappdll loaded:
[*** SPMOUSE ***] INFO Loaded from: C:\Program Files\Autodesk\webdeploy\production\81ea974ab1a66e3de83fe316ff859f913e6ff720\siappdll.dll
[*** SPMOUSE ***] TRACE Stub called: SiInitialize
[*** SPMOUSE ***] TRACE Creating socket
[*** SPMOUSE ***] TRACE Attempting to connect to /var/run/spnav.sock
[*** SPMOUSE ***] TRACE Stub called: SiOpenWinInit
[*** SPMOUSE ***] TRACE SiOpen called for app: Fusion360
[*** SPMOUSE ***] TRACE Stub called: SiSetUiMode

and when I use the mouse in fusion, I can see:

[*** SPMOUSE ***] TRACE Stub called: SiGetEventWinInit
[*** SPMOUSE ***] TRACE called: SiGetEvent
[*** SPMOUSE ***] TRACE message send
[*** SPMOUSE ***] TRACE 0 0 -7 0 -2 46 0 8
[*** SPMOUSE ***] TRACE Stub called: SiGetEventWinInit
[*** SPMOUSE ***] TRACE called: SiGetEvent
[*** SPMOUSE ***] TRACE Queue size: 0

I don't care about the output, so I'll leave it like that.

@zakutin
Copy link

zakutin commented Feb 25, 2023

Hello, pls tell me model of your space mouse; i will add some debug and we will try to solve this issue

I have a 3Dconnexion SpaceNavigator USB model. Here is some info from spacenavd:

sudo spacenavd -v -d
Spacenav daemon v1.2-2-gd186c5d
reading config file: /etc/spnavrc
found usb device [46d:c626]: "3Dconnexion SpaceNavigator" (/dev/input/event18) 
adding device (id: 0).
device name: 3Dconnexion SpaceNavigator
  Number of axes: 6 (0a 6r)
  Number of buttons: 2 (evdev offset: 256)
using device: 3Dconnexion SpaceNavigator (/dev/input/event18)
  device flags: swap y-z invert y-z
trying to open X11 display ":0"
   XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.532U01
Using XTEST to send key events

The dll with debug shows:

[*** SPMOUSE ***] INFO Starting siappdll replacement
[*** SPMOUSE ***] INFO Siappdll loaded:
[*** SPMOUSE ***] INFO Loaded from: C:\Program Files\Autodesk\webdeploy\production\414da7cdec4faa7986fe0d205fb521fc68f5d46c\siappdll.dll
[*** SPMOUSE ***] TRACE Stub called: SiInitialize
[*** SPMOUSE ***] TRACE Creating socket
[*** SPMOUSE ***] ERROR Failed to create socket
[*** SPMOUSE ***] ERROR connection to daemon failed
[*** SPMOUSE ***] TRACE Stub called: SiOpenWinInit
[*** SPMOUSE ***] TRACE SiOpen called for app: Fusion360
[*** SPMOUSE ***] TRACE Stub called: SiSetUiMode

It doesn't even connect to the socket as in @TheGreenMamba 's case.

What I noticed, that the cube test program from libspnav doesn't work with spacenavd when it is started as a systemd service.

So I tried to launch fusion360 with the spacenavd in both non-daemonized mode and as a systemd service — no luck, I'm still getting the same debug message from dll.

EDIT: the old method with AddIns, however, works well!

@DD1984
Copy link
Owner

DD1984 commented Feb 25, 2023

For me the new solution didn't work the last time I tried, but I just tested the dll with debug and now it's working!

pls, if it possible, test dll without debug again.
i did not change anything, only enable debug; dll with debug work good - we can see:
[*** SPMOUSE ***] TRACE 0 0 -7 0 -2 46 0 8 in log

about integration to cryinkfly project - i think that it is good idea - i will try

@DD1984
Copy link
Owner

DD1984 commented Feb 26, 2023

@zakutin thanks for debug log
in your case linux syscall socket() finishing with error, i do not understand what must happened for this error - there are very small type of reasons for this error.
let's try to debug it.
is this error occur each time when you start fusion360?
give me your cpu type and linux kernel version

@zakutin
Copy link

zakutin commented Feb 26, 2023

is this error occur each time when you start fusion360?

As for dll method, yes.

give me your cpu type and linux kernel version

  • Fedora Workstation 37
  • wine-8.1 (Staging)
  • Linux t480 6.1.13-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 22 17:53:57 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         39 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  8
  On-line CPU(s) list:   0-7
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
    CPU family:          6
    Model:               142
    Thread(s) per core:  2
    Core(s) per socket:  4
    Socket(s):           1
    Stepping:            10
    CPU(s) scaling MHz:  35%
    CPU max MHz:         3400,0000
    CPU min MHz:         400,0000
    BogoMIPS:            3600,00
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm p
                         be syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aper
                         fmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe 
                         popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd
                          ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust sgx bmi1 avx2 smep bmi2 erms invpci
                         d mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_a
                         ct_window hwp_epp md_clear flush_l1d arch_capabilities
Virtualization features: 
  Virtualization:        VT-x
Caches (sum of all):     
  L1d:                   128 KiB (4 instances)
  L1i:                   128 KiB (4 instances)
  L2:                    1 MiB (4 instances)
  L3:                    6 MiB (1 instance)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-7
Vulnerabilities:         
  Itlb multihit:         KVM: Mitigation: VMX disabled
  L1tf:                  Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
  Mds:                   Mitigation; Clear CPU buffers; SMT vulnerable
  Meltdown:              Mitigation; PTI
  Mmio stale data:       Mitigation; Clear CPU buffers; SMT vulnerable
  Retbleed:              Mitigation; IBRS
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS Not affected
  Srbds:                 Mitigation; Microcode
  Tsx async abort:       Not affected

@DD1984
Copy link
Owner

DD1984 commented Feb 26, 2023

@zakutin pls check dll with debug - i was add showing socket() error - maybe it will be helpful

@zakutin
Copy link

zakutin commented Mar 1, 2023

Here is the log message:

[*** SPMOUSE ***] INFO Starting siappdll replacement
[*** SPMOUSE ***] INFO Siappdll loaded:
[*** SPMOUSE ***] INFO Loaded from: C:\Program Files\Autodesk\webdeploy\production\414da7cdec4faa7986fe0d205fb521fc68f5d46c\siappdll.dll
[*** SPMOUSE ***] TRACE Stub called: SiInitialize
[*** SPMOUSE ***] TRACE Creating socket
010c:fixme:sync:NtCreatePort (0x2400f0,(nil),0,1501976048,0x743723c17cbe),stub!
[*** SPMOUSE ***] ERROR Failed to create socket with err: -1073741822
[*** SPMOUSE ***] ERROR connection to daemon failed
[*** SPMOUSE ***] TRACE Stub called: SiOpenWinInit
[*** SPMOUSE ***] TRACE SiOpen called for app: Fusion360
[*** SPMOUSE ***] TRACE Stub called: SiSetUiMode

@DD1984
Copy link
Owner

DD1984 commented Sep 12, 2023

@zakutin pls check dll from latest commit

@zakutin
Copy link

zakutin commented Sep 12, 2023

Thanks, it is working now!

Log message:

[*** SPMOUSE ***] INFO Starting siappdll replacement
[*** SPMOUSE ***] INFO Siappdll loaded:
[*** SPMOUSE ***] INFO Loaded from: C:\Program Files\Autodesk\webdeploy\production\624b40b404e655742657beed791e582133d3b3ce\siappdll.dll
[*** SPMOUSE ***] INFO Creating socket
0178:fixme:sync:NtCreatePort ((nil),(nil),0,1376400,0x7e0dd7fc9f09),stub!
[*** SPMOUSE ***] ERROR l_socket() return err: 0xc0000002
[*** SPMOUSE ***] INFO trying l_socket_int80h()
[*** SPMOUSE ***] INFO Using int80h api!!!
[*** SPMOUSE ***] INFO fd: 332
[*** SPMOUSE ***] INFO Attempting to connect to /var/run/spnav.sock

@thepkc
Copy link

thepkc commented Apr 22, 2024

Similar to the original issue
d1b26f064192ff3fcabb49e23e1771cc wineprefixes/default/drive_c/Program Files/Autodesk/webdeploy/production/35a60349b112668a59dd7bbcc68b2622875103f4/siappdll.dll

Log:
[*** SPMOUSE ] INFO Starting siappdll replacement
[
SPMOUSE ] INFO Siappdll loaded:
[
SPMOUSE ] INFO Loaded from: C:\Program Files\Autodesk\webdeploy\production\35a60349b112668a59dd7bbcc68b2622875103f4\s
iappdll.dll
[
SPMOUSE ] INFO Creating socket
[
SPMOUSE ] INFO fd: 0
[
SPMOUSE ] INFO Attempting to connect to /var/run/spnav.sock
[
SPMOUSE ] ERROR connect() return err: 0xc0000002
[
SPMOUSE ] ERROR Failed to connect
[
SPMOUSE ***] ERROR connection to daemon failed

I tried to strace, but could not find any calls to actually open that sock. Any thoughts?

@thepkc
Copy link

thepkc commented Apr 22, 2024

oh and:

» wine --version
wine-9.7 (Staging)

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

4 participants