3

I’m an amateur using xCode 10.3 on a MacBook Pro in Safe Mode,Mojave 10.14.6 with 4GB of DDR to generate tensors of complex numbers (to be processed in subsequent projects). The code, which I modified from Numerical Recipes to make it handle double complex variables, uses malloc to allocate memory for the tensor. It all seems to work (or at least run to completion for tensors up to 4x625x625 but crashes when it gets to generating element about [3][251][527] on a tensor allocated for 4x1296x1296. This seems to be about when The memory graph climbs up to ~90 MB. The computer goes through a restart and comes back up without asking for a login password still in xCode with the project loaded and ready to build/run. On a 4GB computer it’s surprising that it crashes at 90 MB. Is there anything special in xCode or in the OS about 90 MB? Are there any suggestions about what could be causing this strange restart behavior? Is this what happens if a memory access is attempted outside the allocated range?

  • 2
    Don't run that on Safe Mode. Safe mode is suited only for maintenance and is limited on resources. Seems like this is dropping the GUI, not a real reboot. Run it on normal mode. If you need a clean environment then create a new user just to run that, and log in using normal mode. – Prado Aug 29 at 3:19
  • An app should not be able to crash the machine by memory access - I would suggest you have a hardware memory dfault and need to check that - I would also note that you seem to be crashing the Window server and not the OS - perhaps yopur variable definitions are wrong and a pointer is outside the correct range but then again that should only crash the app you are usinhg. There should also be crash logs in – user151019 Aug 29 at 11:09
  • I tried it several times after a normal full start. It still crashes and restarts the computer all by itself. xCode tried to come up but just hung, no indication it knew it crashed. There are no xCode entries in User Reports in Console (which is what I assume you mean by “crash logs”.) – Nick Boshaft Aug 30 at 0:13

You must log in to answer this question.

Browse other questions tagged .