unity – Raycast returns miss even though it clearly hits it’s target collider, how to debug?


The target is a stock 3D Object Unity Cube.
The script firing the rays has a Public GameObject called ‘target’, the cube is correctly set as the target.

Here is the bulk of the raycasting I am doing. The rays are aimed at an array of positions within the bounds of the box called ‘vertices’.

This was working yesterday and I didn’t change the code and now it no longer works and I am completely stumped with no idea how to even begin to debug why.

    for (int i = 0; i < vertices.Length; i++)
        Vector3 direction = vertices(i) - self.position;

        Ray ray = new Ray(self.position, direction);

        if (Physics.Raycast(ray, out raycastHit))
            if (raycastHit.collider.transform == target)
                Debug.DrawRay(self.position, direction, Color.green, 5.0f, true);
                hitCount += 1f;
                Debug.DrawRay(self.position, direction, Color.red, 5.0f, true);

linux – How can I debug an intermittent server crash that rejects SSH connections, causes I/O errors, and renders existing sessions useless?

I’ve been running a home server based on debian for ~10 years now and recently decided to replace it with an HP EliteDesk 705 65W G4 Desktop Mini PC, but the new machine keeps crashing.

The machine will run fine for a few hours, then suddenly begins:

  1. Rejecting SSH connections immediately
  2. Returning “Command not found” for any commands run in existing ssh connections (e.g., ls)
  3. Giving I/O errors in response to running processes like docker stats
  4. Not showing any display output to connected monitors

I typically run a few home services in docker containers and initially thought an oddity of my config might be causing the crashes, so I decided to select a random existing github repo with a few containers and run it from scratch. I decided to use this HTPC download box repo, which seems to have a few linuxserver.io containers and should be a reasonable approximation for the lower bound of the workload my services would put on the machine.

Steps I have followed to create the crash:

  1. Install headless debian (netinstall image); configure the OS by following the below steps:
  2. Set hostname: test
  3. Set domain: example.com
  4. Add a new user, add user to sudoers, set up SSH to allow for only keys and only nick can log in (including adding my desktop’s public key to ~/.ssh/authorized_keys)
adduser nick
usermod -aG sudo nick
sudo nano /etc/ssh/sshd_config; the specific settings you want are:
PermitRootLogin no
Protocol 2
MaxAuthTries 3
PubkeyAuthentication yes
PasswordAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
UsePAM no
AllowUsers nick
  1. Restart ssh: sudo service sshd restart
  2. Install necessary services: sudo apt-get install docker docker-compose git
  3. Add your user to the docker group: sudo usermod -aG docker nick
  4. Generate a new ssh key and add it to your GitHub account: ssh-keygen -t ed25519, then copy the public key to GH
  5. Set your global git vars: git config --global user.name 'Nick'; git config --global user.email nick@example.com

Wait 2 days, verify no crash occurs

  1. Run the following commands:
cd /opt
sudo mkdir htpc-download-box
sudo chown -R nick:nick htpc-download-box
git clone git@github.com:sebgl/htpc-download-box.git
cd htpc-download-box
docker-compose up -d

(Note: I do no configuration whatsoever of the containers in the docker-compose file, I just start them running and then confirm I can access them via browser. I use the exact .env.example as the .env for the project.)

Wait a few hours, observe that server has crashed. Unable to log in via SSH and other issues as stated above. Interestingly, I can still view the web UI of some containers (e.g., sonarr) but when trying to browse the filesystem via that web UI, I am unable to see any folders and manually typing the path indicates that the user has no permissions to view that folder.

Since I observe crashes when running either my actual suite of services or the example repo detailed here, I must conclude it’s an issue with the machine itself. I have tested the nvme drive with smartmontools and both the short and long tests report no errors.

I am not familiar enough with Linux to know how to proceed from here (maybe give it another 10 years!) – what logs can I examine to determine what might cause the crash? Should I be setting up additional logging of some sort to try to ascertain the cause?

All of the issues are so general (I/O errors, SSH refusal, etc.) that Googling for the past week has not gotten me anywhere; I was sure the clean reinstall and using a new repo would not crash and I could then incrementally add my actual docker containers until a crash occurred, therefore finding the problematic container via trial and error, but I am now at a complete loss for how to proceed.

database – How can I debug max_user_connections PHP Warning

I get the bottom error in the debug file frequently.
I am a beginner in WordPress. I think there is something wrong in theme. Is there any way to debug clearly when this PHP Warning happened?

PHP Warning:  mysqli_real_connect(): (HY000/1203): User timecode_main already has more than 'max_user_connections' active connections in /public_html/wp-includes/wp-db.php on line 1635

windows 10 – PC crashes with debug LEDs saying “CPU not detected” when I try to run the game: Valorant. But it can run the game with integrated GPU

My graphics card is GTX 1650. My CPU is core i5 7400. My motherboard is MSI B250I gaming pro ac. I have the latest drivers for everything. Game used to run perfectly until last night. I had to move my pc from one room to another and suddenly this problem started happening. Everything works fine as expected, except for Valorant. I can do my coding, studying, etc. without any problem.

But when I start Valorant, within a couple seconds the monitor says no video input. It sounds like the turning off but some parts of the computer stay running. The CPU and GPU fans keep spinning. Hard disks keep spinning. RGB stuff keep working. But the debug LED indicates “CPU not detected” (according to manual from MSI website). But no buttons or inputs work. Even the restart button on the front of the casing doesn’t work. I have to turn the power off and on again to restart the pc.

Since it says no video output, I tried to see if the problem is with the GPU (although the debug LEDs say “CPU not detected”). I removed the graphics card and tried to run Valorant with the integrated graphics adapter (Intel HD 630). It ran fine without issue (not counting 30 fps max as an issue here). I played some deathmatches just to make sure the game was not the problem.

I later uninstalled the graphics driver using DDU and reinstalled the latest one again. But the problem persists. I uninstalled and reinstalled Valorant too. Didn’t help.

Does anyone have any idea or suggestion that I can try? I can’t even pinpoint the problem in order to begin troubleshooting. Runs fine without GPU when CPU is doing all the work. But crashes with GPU installed and says “CPU not detected” when most of the workload is alleviated off of the CPU. Please help, thanks!

node.js – Debug library from node_modules in my app with VSC

Enterprise where I work has developed an internal app using react.js and typescript also developed some node modules and now is my turn to work with it and I figure out an issue that bring me to this question.

How can I debug with VSC a node module from my app? I have access to both source codes. My directories structure.

|-- my-app
       |--App.tsx #File that import @enterprise/my-node-module and use someFunction that I want to debug
|-- my-node-module
       |--Action.ts #File with someFunction that I want to debug
|-- another-node-module #Another node module

Also I have configured VSC to debug my app and works perfect.

  "version": "0.2.0",
  "configurations": [{
      "type": "chrome",
      "request": "attach",
      "port": 9222,
      "name": "Attach Chrome against localhost",
      "url": "http://localhost:3000",
      "webRoot": "${workspaceFolder}"
      "name": "Chrome",
      "type": "chrome",
      "request": "launch",
      "url": "http://localhost:3000",
      "webRoot": "${workspaceFolder}/src",
      "sourceMapPathOverrides": {
        "webpack:///src/*": "${webRoot}/*"
      "runtimeArgs": ["--preserve-symlinks"]

Package.json script from my app

"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build"

As you can notice I tried to debug using this but nothing. The main reason for this is that I don’t know how to debug module directly and has been builded to work as a middleware with redux-thunk.

Hope somebody can help me.

How can I try to debug this discrepancy between Map and ParallelMap?

It is hard for me to present the actual set of functions that is prompting this question, because it is part of a very large code base. But to summarise, I have a setup like the following:

ClearAll(f, g1, g2);

f(mol_Molecule) := (* Transform mol and return a new molecule; f in pure *);

g1(lst : {__Molecule}) := Map(f, lst);

g2(lst : {__Molecule}) := ParallelMap(f, lst);

The argument lst usually has about 1,000 molecules, and the parallel version runs about 12 times faster on my computer. But while the function g1 always returns the correct result, the function g2 sometimes does not.

I understand that this is hardly enough detail. But I am quite baffled, and looking for pointers on what could cause such an error, and what I should try to inspect. The documentation clearly states that ParallelMap "…automatically distributes different applications of f among different kernels and processors," so I assumed that ParallelMap could be used as a drop-in replacement for Map.

Thanks in advance for your help.


flinty has brought up a very relevant point that I forgot to mention in the question. The function f is a pure function and does not mutate any variable.

javascript – How can i print value or debug wp.ajax.post?

I am trying to print the value of

        window.wp.ajax.post( 'csf-get-icons', {
        nonce: $button.data('nonce')
      }).done( function( response ) {


        CSF.vars.icon_modal_loaded = true;

        var $load = $modal.find('.csf-modal-load').html( response.content ); 

$load variable, this value is not returning properly, I am trying with console.log, but it is not working, is there any way out

thanks for the help

debug – Erro React Native – Execution failed for task ‘:app:multiDexListDebug’

(base) elvis@Perbrass-MacBook-Pro Fale_Whatsapp_sem_numero % react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using “–no-jetifier” flag.
Jetifier found 1268 file(s) to forward-jetify. Using 8 workers…
info Starting JS server…

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    info Launching emulator…
    info Successfully launched emulator.
    info Installing the app…
    Starting a Gradle Daemon (subsequent builds will be faster)

Configure project :react-native-firebase_admob
:react-native-firebase_admob package.json found at /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-firebase/admob/package.json
:react-native-firebase_app package.json found at /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_admob:firebase.bom using default value: 25.12.0
:react-native-firebase_admob:ads.consent using default value: 1.0.6
:react-native-firebase_admob package.json found at /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-firebase/admob/package.json
:react-native-firebase_admob:version set from package.json: 7.6.9 (7,6,9 – 7006009)
:react-native-firebase_admob:android.compileSdk using custom value: 29
:react-native-firebase_admob:android.targetSdk using custom value: 29
:react-native-firebase_admob:android.minSdk using custom value: 16
:react-native-firebase_admob:reactNativeAndroidDir /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/react-native/android

Configure project :react-native-firebase_app
:react-native-firebase_app package.json found at /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_app:firebase.bom using default value: 25.12.0
:react-native-firebase_app:play.play-services-auth using default value: 18.1.0
:react-native-firebase_app package.json found at /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-firebase/app/package.json
:react-native-firebase_app:version set from package.json: 8.4.6 (8,4,6 – 8004006)
:react-native-firebase_app:android.compileSdk using custom value: 29
:react-native-firebase_app:android.targetSdk using custom value: 29
:react-native-firebase_app:android.minSdk using custom value: 16
:react-native-firebase_app:reactNativeAndroidDir /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/react-native/android

Task :app:multiDexListDebug FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
209 actionable tasks: 2 executed, 207 up-to-date
/Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-async-storage/async-storage/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar: D8: Type com.reactnativecommunity.asyncstorage.AsyncStoragePackage is defined multiple times: /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-async-storage/async-storage/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar:com/reactnativecommunity/asyncstorage/AsyncStoragePackage.class, /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-community/async-storage/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar:com/reactnativecommunity/asyncstorage/AsyncStoragePackage.class

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:multiDexListDebug’.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Type com.reactnativecommunity.asyncstorage.AsyncStoragePackage is defined multiple times: /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-async-storage/async-storage/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar:com/reactnativecommunity/asyncstorage/AsyncStoragePackage.class, /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-community/async-storage/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar:com/reactnativecommunity/asyncstorage/AsyncStoragePackage.class

  • Try:
    Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.

  • Get more help at https://help.gradle.org


error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with –verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
/Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-async-storage/async-storage/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar: D8: Type com.reactnativecommunity.asyncstorage.AsyncStoragePackage is defined multiple times: /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-async-storage/async-storage/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar:com/reactnativecommunity/asyncstorage/AsyncStoragePackage.class, /Users/perbras/Documents1/Pessoal/Projetos/Fale_no_Whatsapp_sem_o_numero/App/Fale_Whatsapp_sem_numero/node_modules/@react-native-community/async-storage/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar:com/reactnativecommunity/asyncstorage/AsyncStoragePackage.class
(base) elvis@Perbrass-MacBook-Pro Fale_Whatsapp_sem_numero %

domain name system – Bind 9 debug logging requests from localhost

If I do, for example
dig delfi.lv
from a PC on LAN, I get some log messages in /var/cache/bind/named.run like:

29-Oct-2020 12:01:51.905 client @0x7f2adc000cd0 (delfi.lv): query: delfi.lv IN A +E(0) (

But if I do the same request from localhost (the server itself) I get the same answer, but no messages in the log file. How to fix it?