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

Script crashes with exit status 3221225477 if iRacing hasn't been started once #4

Closed
immutef opened this issue Jun 4, 2016 · 6 comments

Comments

@immutef
Copy link

immutef commented Jun 4, 2016

Hey, I recently got everything working with node-irsdk in electron. So far, so good. I first thought I set up my computer somewhat wrong (wrong MSVS version, missing an SDK, or so) but it seems to be another problem.

I have the reproducable error that happens when iRacing hasn't been started once on the machine.

The iRacing service is running after a fresh start / reboot, but the app immediately crashes without a stack trace or message and with exit status 3221225477.

After starting iRacing once, this issue doesn't occur anymore. I can even close iRacing and the app will start (but receive no data).

My wild guess: could it be that trying to access the shared memory map file (which doesn't exist if the sim hasn't been started at least once) let the library fail?

I've seen that Kutu does a little check on a local webserver whether the sim is running or not and only accesses the file if it is running. Maybe you could address this issue the same?

My C/C#/C++/Whatever skills are too bad thus I can't fix that myself :(

@immutef
Copy link
Author

immutef commented Jun 4, 2016

I guess I may work around this issue by doing the HTTP request in my node application and not to include the irsdk-library until the sim "is running". I guess I'll give that a try so far.

@immutef
Copy link
Author

immutef commented Jun 4, 2016

Just to let you know, polling the URL until "running:1" is returned just fixed my issue. I can delay the require('node-irsdk') and init/getInstance calls until then which works fine and resolves the issue.

@apihlaja
Copy link
Owner

apihlaja commented Jun 4, 2016

Actually, I was suspecting same, noticed it couple of days ago. Apparently I start sim at first almost always.

I have only mini laptop until friday so I can´t test the fix myself. At least, it doesnt crash anymore when not having iRacing installed at all. If you want to try it, there is branch issue-4. You can clone repo or use npm to install that branch: npm install apihlaja/node-irsdk#issue-4

@immutef
Copy link
Author

immutef commented Jun 8, 2016

I will give it a try these days.

@apihlaja
Copy link
Owner

The fix was working as expected so I released a patch.

@immutef
Copy link
Author

immutef commented Jun 14, 2016

I can now confirm that you solved the issue. Thank you very much! :-)

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

2 participants