Connecting via Python STOMP client causes Access violation

You are here: Home > Forum > General > General questions, comments, and issues > Connecting via Python STOMP client causes Access violation

Page 1 of 1

Connecting via Python STOMP client causes Access violation 24/01/2021 at 00:13 #136725
doublea999
Avatar
5 posts
Hi all,

Just wondering if anyone has recent experience on interfacing with the gateway via this Python STOMP module?
https://github.com/jasonrbriggs/stomp.py/

Loader v5.13
Python 3.8.6
stomp 6.1.0

Code I tried:

import stomp
stomp.Connection11(([('myhostip', 51515)])
stomp.connect()

which would trigger an Access violation in the sim.

Access violation at address 004053F4 in module 'SimSigLoader.exe'
Read of address 00000074.

I get different addresses for "read of address" but they are all within 000000FF. The program execution address that it crashes is always consistent. The sim seems to continue to run normally after the exception throw. And new attempts to connect consistently triggers the same fault.

I also tried connection with the other protocol versions 1.0 and 1.2, and also adding headers={'accept-version':1.1} to connect() explicitly. Tested on at least 2 different sims (London Bridge and Birmingham).


Thanks all.
Cheers!

Log in to reply
Connecting via Python STOMP client causes Access violation 24/01/2021 at 00:16 #136726
headshot119
Avatar
4869 posts
Quote:
dest='/topic/TD_ALL_SIG_AREA'
conn=stomp.Connection([('10.10.13.10',51515)], [('10.10.13.10', 51517)])

conn.set_listener('test',MyListener())
conn.start()
conn.send_frame('CONNECT',body='accept-version:1.1')
conn.subscribe(destination=dest, id=1, ack='auto')
I'll find what version of STOMP I'm using

Edit

4.1.8 I believe

"Passengers for New Lane, should be seated in the rear coach of the train " - Opinions are my own and not those of my employer
Last edited: 24/01/2021 at 00:20 by headshot119
Reason: None given

Log in to reply
Connecting via Python STOMP client causes Access violation 24/01/2021 at 00:32 #136727
doublea999
Avatar
5 posts
Thanks for quick reply headshot119!

The version you ran on was from quite a while ago and it runs on Python 2. That Python module has changed quite a bit since then: https://github.com/jasonrbriggs/stomp.py/blob/dev/CHANGELOG.md

API here: http://jasonrbriggs.github.io/stomp.py/stomp.html

I'm running out of time for today. I'll try again later with some logging turned on.

Log in to reply
Connecting via Python STOMP client causes Access violation 24/01/2021 at 00:33 #136728
headshot119
Avatar
4869 posts
It is an old version, I've just checked the date the files got created. I've never updated.

Let me know your findings and I'll see if we need to change anything.

"Passengers for New Lane, should be seated in the rear coach of the train " - Opinions are my own and not those of my employer
Log in to reply
Connecting via Python STOMP client causes Access violation 24/01/2021 at 21:42 #136758
clive
Avatar
2736 posts
doublea999 in post 136725 said:

Access violation at address 004053F4 in module 'SimSigLoader.exe'
Read of address 00000074.
That's in the library function for joining two strings.

doublea999 in post 136725 said:

I get different addresses for "read of address" but they are all within 000000FF. The program execution address that it crashes is always consistent.
It looks like something has been passed a character ('t' in this case) when it should have been passed a string.

Unless you have the log file entry that shows more information, there's nothing I can suggest.

Log in to reply