473,667 Members | 2,589 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application crashes while using OTL class

I am using the OTL library for database
interaction(otl .sourceforge.ne t)

This is the sample code from my application:

strm_ << parm.corp_id();
strm_ << parm.prod_id();
write_to_log((" Before parm.eff_ts()"< <parm.eff_ts( ))
strm_ << parm.eff_ts(); /** Application crashes here **/
write_to_log((" After parm.eff_ts()"< <parm.eff_ts( ))

strm_ is otl_stream variable. eff_ts() is std::string variable and in
the query the bind variable is defined as char[50].

The application runs 24*7 and it crashes frequently at the same place.
We have ruled out the value of eff_ts() since the application restarts
and processes the same input successfully.

Any help is highly appreciated.

Regards,
Tejas

Jun 27 '08 #1
1 2248
teju <Te*********@gm ail.comkirjutas :
I am using the OTL library for database
interaction(otl .sourceforge.ne t)

This is the sample code from my application:

strm_ << parm.corp_id();
strm_ << parm.prod_id();
write_to_log((" Before parm.eff_ts()"< <parm.eff_ts( ))
strm_ << parm.eff_ts(); /** Application crashes here **/
write_to_log((" After parm.eff_ts()"< <parm.eff_ts( ))

strm_ is otl_stream variable. eff_ts() is std::string variable and in
the query the bind variable is defined as char[50].
eff_ts() looks like a function call, not as a std::string variable. I
guess you wanted to say the function call returns a std::string, right?

I would check a couple of things: what happens if the eff_ts string is 49
or more characters, and whether this is correlated to the errors, and if
the otl stream is requiring that the string object be alive until needed.
If eff_ts() returns a string then it would be a temporary object, deleted
soon.

Post more code, especially eff_ts() and operator<<() declarations, if
this does not help.

Paavo

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2453
by: Susanne | last post by:
Hello! In have embedded python into my MFC application. It works fine using the PyRun_SimpleString method, giving it a string with some simple commands. When i am using PyRun_SimpleFile instead, my application crashes. I have also created a console application. There i also call PyRun_SimpleFile. The console application executes the given script.
14
2929
by: Zeng | last post by:
Would somebody know when we should seal a class? Shouldn't all classes be open up for inheritance? Thanks!
8
6036
by: mike2036 | last post by:
I have an application (that has unmanaged code) and when I launch it without 'FullTrust' permissions (LocalIntranet_Zone), it crashes. When I set 'FullTrust' permissions, it launches fine. Is there a way I can compile the application such that it won't even attempt to launch without correct permissions instead of just crashing? Thanks for any help. -Mike
2
2715
by: manuthomas23 | last post by:
Here is the code: #ifndef M3DCAMERA__H__ #define M3DCAMERA__H__ class M3DEngine; /** Micro3D Camera class. */
5
1538
by: Jeff | last post by:
ASP.NET 2.0 This code crashes. It generate this error: Value cannot be null. Parameter name: type I've created some custom web.config settings and this crash is related to accessing theme custom settings. This code is where the crash occur: _instance = (DAL)Activator.CreateInstance(Type.GetType(min.test.Config.Settings.msgElement.ProviderType));
1
2894
by: =?Utf-8?B?c3VydHVyeg==?= | last post by:
Hi, I'm using VB2005 + Office XP Enterprise. If you create a Word.Application object, you risk a memory leak if your application crashes because Word.Application is an unmanaged COM Interop object. I want to encapsulate the Word.Application in a Class that implements IDisposable to avoid this potential memory leak. Here is the code I have:
3
5121
by: Bret Kuhns | last post by:
I recently started a co-op/internship at a company and they are looking to migrate a large legacy supported application from OLEDB to SQL Server. I'm doing prelim work in experimenting with the options available. The application is huge (1+ million lines of C++ code), so it'd be quite a bit of man hours to adapt all the database code for SQL Server. I stumbled upon linked tables in an OLEDB file to an ODBC source (such as SQL Server) and...
2
1561
by: slizorn | last post by:
hi guys, another problem i am facing with this program.. i have created a method to read in values from a file and store them into TreeNodes of a Tree please help me to solve the problem below.. thanks :) any help/suggestion is appreciated.. the program crashes when it reaches the following line: assign1 = searchTree(treeObj->root ,data1)->item;
1
4791
by: Kurt Jakobsen | last post by:
Hi, I have problem opening an MySql connection from an win console application. I am using SharpDevelop as IDE. Previously I've been working with MySql through C# aspx and am new to writing exe programs in C#, so I assume that I might be missing something in the IDE / project configuration. I am successfully opening a connection and reading data from the table using adapter (window panel application binding to a grid), but when trying the...
0
8457
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8365
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8883
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8563
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7390
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6203
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1778
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.