On Friday, 24 April 2015 08:35:56 UTC+9:30, Jeffrey Walton wrote: > > > > On Thursday, April 23, 2015 at 12:56:14 AM UTC-4, Fil Nick wrote: >> >> http://pastebin.com/BGzNsgjj >> >> I’ve been working on a project that uses Crypto++ and I have ran into an >> issue that I cannot solve. >> >> The program compiles fine but crashes when aes is used. I have simply ran >> into an issue that I do not know how to fix, I’ve uploaded the project if >> it is helpful. >> >> https://www.mediafire.com/?8curwfrlvxlpf0p >> > What is the problem (besides "my program crashes")? Perhaps you could > provide a view of the problematic code, and maybe even a stack trace > centered around that code. >
I get this error when I try to use AES, I am really in the dark about how to fix it. F:\C++ Code\cryptGUI\cryptGUI\Release>cryptGUI.exe Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at encode(basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , basic_str ing<char\,std::char_traits<char>\,std::allocator<char> >* ) at aesEncrypt(basic_string<char\,std::char_traits<char>\,std::allocator <char> >* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* data, b asic_string<char\,std::char_traits<char>\,std::allocator<char> >* key) in f :\c++ code\cryptgui\cryptgui\cryptgui\drivercode.cpp:line 141 at GUI.mainGUI.encode_Click(Object sender, EventArgs e) in f:\c++ code\ cryptg ui\cryptgui\cryptgui\maingui.h:line 299 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button , In t32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms .Uns afeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int 32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner( Int32 r eason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason , ApplicationContext context) at System.Windows.Forms.Application.RunDialog(Form form) at System.Windows.Forms.Form.ShowDialog(IWin32Window owner) at System.Windows.Forms.Form.ShowDialog() at main() in f:\c++ code\cryptgui\cryptgui\cryptgui\maingui.cpp:line 13 at _mainCRTStartup() F:\C++ Code\cryptGUI\cryptGUI\Release>cryptGUI.exe Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at encode(basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , basic_str ing<char\,std::char_traits<char>\,std::allocator<char> >* ) at aesEncrypt(basic_string<char\,std::char_traits<char>\,std::allocator <char> >* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* data, b asic_string<char\,std::char_traits<char>\,std::allocator<char> >* key) in f :\c++ code\cryptgui\cryptgui\cryptgui\drivercode.cpp:line 141 at GUI.mainGUI.encode_Click(Object sender, EventArgs e) in f:\c++ code\ cryptg ui\cryptgui\cryptgui\maingui.h:line 299 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button , In t32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms .Uns afeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int 32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner( Int32 r eason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason , ApplicationContext context) at System.Windows.Forms.Application.RunDialog(Form form) at System.Windows.Forms.Form.ShowDialog(IWin32Window owner) at System.Windows.Forms.Form.ShowDialog() at main() in f:\c++ code\cryptgui\cryptgui\cryptgui\maingui.cpp:line 13 at _mainCRTStartup() F:\C++ Code\cryptGUI\cryptGUI\Release> > > -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [email protected]. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
