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

Unhandled Exception in SocketInitiator.OnStart() can Terminate Process #833

Closed
Falcz opened this issue Feb 13, 2024 · 9 comments
Closed

Comments

@Falcz
Copy link
Contributor

Falcz commented Feb 13, 2024

We ran into a case of our process terminating due to unhandled exception on a dedicated thread:

Exception Info: System.NullReferenceException: Object reference not set to an instance of an object.
   at QuickFix.AbstractInitiator.Connect()
   at QuickFix.Transport.SocketInitiator.OnStart()

I suspect the sessionId coming in from disconnected isn't being found during LookupSession, but I haven't managed to catch it in the act.

@Falcz
Copy link
Contributor Author

Falcz commented Feb 13, 2024

#834 doesn't solve the root cause, but it does provide a layer of protection for the application from current/future exceptions that occur in the loop.

@gbirchmeier
Copy link
Member

Did you see this exception when running 1.11.2?

I've done a lot of work in the past month updating files to use proper nullable (?) annotations, and in the process fixing places where vars might be null. (I see your fix is applied to my more-recent version of the file, with my changes in it.)

However, I haven't finished nullable-izing all the classes yet, so I'm not surprised that the null-risk is still present.

The try/catch is a good step for now. I'll add it in. If you are able to get a full stacktrace on the null, please let me know.

@Falcz
Copy link
Contributor Author

Falcz commented Feb 13, 2024

We ran into the issue while running 11.0.0.

Nice, I'll keep an eye out for the changes!

I'll fix up the missing session, that's what I get for not using an IDE

@gbirchmeier
Copy link
Member

I'll get it on my branch. It ties into that other issue I'm working on anyway. Thanks

@Falcz
Copy link
Contributor Author

Falcz commented Feb 13, 2024

Just saw your comment regarding the logger on PR. Sounds good, thanks!

@Falcz
Copy link
Contributor Author

Falcz commented May 16, 2024

Hey @gbirchmeier, unfortunately this took our server down again today - any word on the 11.0.3 release?

@gbirchmeier
Copy link
Member

@Falcz I'm hoping to get it out in the next month or two. There are 3 open issues I want to get into it.

@Falcz
Copy link
Contributor Author

Falcz commented Jun 3, 2024

Awesome, thanks!

@gbirchmeier
Copy link
Member

Hey @Falcz , I'm putting out 1.12 right now.

Do you want to send me your name for our published "Contributors" list? See the bottom of this page. All I know is your github handle and your email address.

hlibman-connamara pushed a commit to hlibman-connamara/quickfixn that referenced this issue Dec 6, 2024
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