AtomicTorch Studio Forums

VoidExpanse => Help section => Topic started by: tristan_bethe on March 07, 2015, 06:48:23 AM

Title: object reference not set to an instance of an object
Post by: tristan_bethe on March 07, 2015, 06:48:23 AM
When I try to start voidexpanse I get:

Startup error:
object reference not set to an instance of an object 

And a quit button..

Any idea what is the cause?

Screenshot and dxdiag can be downloaded here: http://we.tl/WaD6VcAeLF

Title: Re: object reference not set to an instance of an object
Post by: ai_enabled on March 07, 2015, 06:54:38 AM
Hello! Please upload the game logs files from Documents/AtomicTorchStudio/VoidExpanse/Logs folder.
Title: Re: object reference not set to an instance of an object
Post by: tristan_bethe on March 07, 2015, 07:06:37 AM
Lets see.. I cannot find a way to actually upload it so let me upload it here:


http://we.tl/uarV9aUVLJ


thx!
Title: Re: object reference not set to an instance of an object
Post by: ai_enabled on March 07, 2015, 07:13:50 AM
Thanks for logs. Please restart the Steam client and wait until it download an update for VoidExpanse.
Hope it helps, but if still no luck - upload the new logs, we will fix it on Monday when we will be at office.
Title: Re: object reference not set to an instance of an object
Post by: tristan_bethe on March 07, 2015, 07:15:42 AM
Even if I did not install it via steam? this is the download directly from the atomictorch site...

Title: Re: object reference not set to an instance of an object
Post by: ai_enabled on March 07, 2015, 07:21:56 AM
Oh... I'm sorry, I thought it was a Steam version.

I have one idea. Your CPU has a 32 CPU logical cores, it's really cool, but may be too much for our threading system :-).
Could you try to assign for example 2, 4 or 8 CPU cores on VoidExpanse process with Task Manager please? Open up Task Manager, go to the processes tab, right click on the process VoidExpanse, then select set affinity.
But you need to do it during the logo screen shown... so you need to be very fast. Hardcore debugging, right... :-)
Title: Re: object reference not set to an instance of an object
Post by: tristan_bethe on March 07, 2015, 07:23:44 AM
Aha yes I had this issue with the latest farcry game as well.. I had to go into my bios and disable multithreading. I'll try that first

thx
Title: Re: object reference not set to an instance of an object
Post by: ai_enabled on March 07, 2015, 07:25:45 AM
Yes, that may be caused by Intel HyperThreading, but I'm sure you can fix it with Task Manager (for each launch).
Thanks for reporting, we will try to get a fancy server CPU to debug this issue.
Regards!
Title: Re: object reference not set to an instance of an object
Post by: tristan_bethe on March 07, 2015, 12:13:15 PM
Ah found a solution!

Here they discuss solutions on how to add an affinity preset to a shortcut : http://www.tomshardware.co.uk/forum/229129-28-affinity-prior-launch

Quotewell i use win7 and that doesnt work for me,
What i am trying to do is make a program use both cores for smoother sailing

C:\Windows\System32\cmd.exe /C start /affinity 0 1 C:\Program Files\SpacialAudio\SAMBC\SAMBC.exe
(modified command line to set sam using the two cores)

C:\Program Files\SpacialAudio\SAMBC\SAMBC.exe
(is the original command line)

And a little further:

QuoteOrion, your command line should read:

C:\Windows\System32\cmd.exe /C start "" /affinity 3 "C:\Program Files\SpacialAudio\SAMBC\SAMBC.exe"

I've added the quotes for clarity. I'm not sure if it likes spaces in paths. I've added the first set of quotes because Start will annoyingly use the first set of quoted text as the title.

The affinity should be a single hexadecimal number, not a list of CPU numbers:
1 = use CPU 0
2 = use CPU 1
3 = use CPU 1 and 0
4 = use CPU 2
...
F = use CPU 3, 2, 1 and 0


Some of the hex numbers give different errors while starting voidexpanse and using one cpu makes it run very choppy.. but there are combinations that work..




Title: Re: object reference not set to an instance of an object
Post by: ai_enabled on March 08, 2015, 12:10:38 AM
Great!
So it works now flawlessly? How many CPU cores assigned to process?
Please could you upload more game logs for analyzing all errors?
Regards!
Title: Re: object reference not set to an instance of an object
Post by: tristan_bethe on March 08, 2015, 07:49:47 AM
Okay.. I've made a whole set of logs and put them in separate folders indicating which cpu it used with what hex number.. I went from 1-C

Seems like when ever it includes a Hyperthreaded core it gives an error.. the error when using 9 was different then the rest.. I've included a screenshot.

There must be a Hex number for selecting only the 16 real cores.. but I am not smart enough to find it out and do not have enough patience to try them all :)

Hope it helps: http://we.tl/ZDSlb506hV
Title: Re: object reference not set to an instance of an object
Post by: ai_enabled on March 08, 2015, 07:33:10 PM
Wow, that's epic! Thank you very much, we will include the fix for this issue in the next build.
Regards!
Title: Re: object reference not set to an instance of an object
Post by: askew1 on March 09, 2015, 01:27:01 PM
Quote from: tristan_bethe on March 08, 2015, 07:49:47 AM
There must be a Hex number for selecting only the 16 real cores.. but I am not smart enough to find it out and do not have enough patience to try them all :)

Here's something you can try Tristan. If you have 32 cores (16 real and 16 hyperthreaded) they should be alternating.

The Hexadecimal for 10101010101010101010101010101010 is AAAAAAA (http://i.imgur.com/oFVxzEu.png).
The Hexadecimal for 01010101010101010101010101010101 is 55555555 (http://i.imgur.com/3iJOMlT.png).

From what I'm reading the value to AVOID the hyper-threaded cores should be '55555555' (That's 8 5's). You can try both of these values in your shortcut though.

The calculator I used is here: http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html.
Title: Re: object reference not set to an instance of an object
Post by: ai_enabled on March 09, 2015, 07:55:44 PM
I've fixed the issue. It was not HT issue, it was just small mistake in the code. It's appears only if the game can use more than 8 threads simultaneously and it's very random (the order of scheduled loading tasks is different every time you run the game).
Title: Re: object reference not set to an instance of an object
Post by: tristan_bethe on March 10, 2015, 10:23:22 AM
Mmmh did not feel that random.. but then again both hex codes you provided also did not work. Looking foreward to the new version!

Thx!
Title: Re: object reference not set to an instance of an object
Post by: askew1 on March 10, 2015, 11:03:28 AM
Until they publish a new version, you can try these instead.

5555 - This will only use the first 4 real cores.
FFFF - This will use the first 4 real cores and the first 4 hyper-threaded cores.

ai_enabled is saying that the code has problems with more than 8 threads. So you can limit it to either 4 or 8 with these values.
Title: Re: object reference not set to an instance of an object
Post by: tristan_bethe on March 10, 2015, 11:13:24 AM
Weird thing is though that with the earlier tests I've sent it crashed even with 2 cores or one if it was the wrong one :) But atleast I found one that worked well enough :)