You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Thank you for putting this cool crate together. I'm hitting a segfault when trying to append to my trainer. Not sure if this is a bug in the crate or my code. Here's the error:
(lldb) process launch -- train
Process 37281 launched: '/Users/raphaellaude/Documents/GitHub/rust_addr_clean/target/debug/us_addrs' (arm64)
Address: ["431", "Marietta", "St", "NW", "Fl.", "3"]
Tags: ["AddressNumber", "StreetName", "StreetNamePostType", "StreetNamePostDirectional", "OccupancyType", "OccupancyIdentifier"]
Process 37281 stopped
* thread #1, name = 'main', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x28)
frame #0: 0x000000010006d5e0 us_addrs`crfsuite::Trainer::set_message_callback::he14ba900e348f69f(self=0x000000016fdfddb8) at lib.rs:582:13
579 // XXX: make it a public API?
580 fn set_message_callback(&mut self) {
581 unsafe {
-> 582 (*self.trainer)
583 .set_message_callback
584 .map(|f| f(self.trainer, mem::transmute(self), Some(logging_callback)))
585 .unwrap();
Target 0: (us_addrs) stopped.
I figured out that this is because trainer.select() needs to be called before any data can be appended. I think this could be addressed in the documentation. Will try to submit a small PR documenting this sometime soon...
Hello! Thank you for putting this cool crate together. I'm hitting a segfault when trying to append to my trainer. Not sure if this is a bug in the crate or my code. Here's the error:
And my code:
Any examples or help greatly appreciated! Thank you!
The text was updated successfully, but these errors were encountered: