Instrumentinfo null pointer exception
Instrumentinfo null pointer exception
Hi, after update to the 7.2.0.13 api semplified reference the info.pips in the initialize function :
public void initialize(String alias, InstrumentInfo info, Api api, InitialState initialState) {
this.api = api;
super.initialize(alias, info, this.api, initialState);
instrumentPips = info.pips;
init(this.api);
// currentSymbol = info.symbol;
}
generate a java.lang.NullPointerException
With the previous api version it works correctly.
public void initialize(String alias, InstrumentInfo info, Api api, InitialState initialState) {
this.api = api;
super.initialize(alias, info, this.api, initialState);
instrumentPips = info.pips;
init(this.api);
// currentSymbol = info.symbol;
}
generate a java.lang.NullPointerException
With the previous api version it works correctly.
-
- Site Admin
- Posts: 279
- Joined: Mon Jun 11, 2018 11:44 am
- Has thanked: 2 times
- Been thanked: 31 times
Re: Instrumentinfo null pointer exception
Could you please specify which line exactly throws an exception now? I see that you call some "init" function, which is presumably not part of API, that's why I'm asking.
Do you observe the same behavior with demo modules? Does it happen reliably (i.e. on every start) or randomly? Could you share a short code that demonstrates the problem?
Do you observe the same behavior with demo modules? Does it happen reliably (i.e. on every start) or randomly? Could you share a short code that demonstrates the problem?
Re: Instrumentinfo null pointer exception
The line that throws the error is:
instrumentPips = info.pips;
It happens when the platform start. Then If I remove the plugin and add load it again it works
instrumentPips = info.pips;
It happens when the platform start. Then If I remove the plugin and add load it again it works
-
- Site Admin
- Posts: 279
- Joined: Mon Jun 11, 2018 11:44 am
- Has thanked: 2 times
- Been thanked: 31 times
-
- Site Admin
- Posts: 279
- Joined: Mon Jun 11, 2018 11:44 am
- Has thanked: 2 times
- Been thanked: 31 times
Re: Instrumentinfo null pointer exception
Which mode are you using? Replay/live? If live - which feeds are you connected to?
-
- Site Admin
- Posts: 279
- Joined: Mon Jun 11, 2018 11:44 am
- Has thanked: 2 times
- Been thanked: 31 times
Re: Instrumentinfo null pointer exception
I'm sorry, but I failed to reproduce that quickly. This is the code I used to test it:
and it loaded fine with live Rithmic when I restarting bookmap with "load workspace" checkbox on the launchpad. Could you please provide more details? Ideally - a code sample that helps reproduce the issue and step-by-step description of what you are doing. Video would be even better.- Attachments
-
- LastTradeDemoNoHistoryUsingPips.java
- (1.41 KiB) Downloaded 232 times