BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Stack trace for Plugin Errors?

Go down

Stack trace for Plugin Errors? Empty Stack trace for Plugin Errors?

Post by zbx1425 Wed Jun 26, 2019 1:39 pm

I am recently developing a plugin, and some NullPointerException seem to be happening.
I am working on debugging the plugin, but I think providing stack trace when reporting a plugin error would be nice.
I'm using OBVE v1.5.3.9.
zbx1425
zbx1425

Posts : 136
Join date : 2017-08-18
Location : China

https://www.zbx1425.cn

Back to top Go down

Stack trace for Plugin Errors? Empty Re: Stack trace for Plugin Errors?

Post by leezer3 Wed Jun 26, 2019 4:46 pm

Can't you just run the plugin in a debugger?
A dead easy alternative would be to add a global exception handler to the plugin & save the stack traces yourself.

I don't think off the top of my head I can pull in stack traces from an external proxied assembly easily, but I can certainly test this easily enough.

leezer3

Posts : 1785
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Stack trace for Plugin Errors? Empty Re: Stack trace for Plugin Errors?

Post by zbx1425 Thu Jun 27, 2019 1:13 pm

@leezer3 Thank you! I've fixed the problem. It was quite stupid.
BTW How can I debug a plugin? Do I need to link a debugger to openBVE.exe?
zbx1425
zbx1425

Posts : 136
Join date : 2017-08-18
Location : China

https://www.zbx1425.cn

Back to top Go down

Stack trace for Plugin Errors? Empty Re: Stack trace for Plugin Errors?

Post by TheNetworkerLover Thu Jun 27, 2019 2:48 pm

my guess is yes. that would be the most logical idea. try to get one that's 32x not 64x or 86x, those tend to crash. at least for myself anyways. maybe a different story on your computer. or i am talking crap, this whole system modifications topic is not my strong point at allĀ  Laughing
TheNetworkerLover
TheNetworkerLover

Posts : 43
Join date : 2019-05-29
Location : Somewhere over the rainbow

Back to top Go down

Stack trace for Plugin Errors? Empty Re: Stack trace for Plugin Errors?

Post by leezer3 Fri Jun 28, 2019 1:11 pm

With Visual Studio, all you should need to do is copy your output plus PDB to the train folder, launch openBVE with the train and attach to the running openBVE process.

leezer3

Posts : 1785
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Stack trace for Plugin Errors? Empty Re: Stack trace for Plugin Errors?

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum