Modify

Ticket #6737 (closed Bugs: fixed)

Opened 2 years ago

Last modified 22 months ago

static boost::filesystem::path crashes with Debug mode

Reported by: Emrah Ustun <emrahustun@…> Owned by: bemandawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.49.0 Severity: Showstopper
Keywords: Cc:

Description

static boost::filesystem::path FilePath = "FilePath";

When filesystem::path is used with static, application crashes on runtime. Release mode works correct. Using VS2010. Boost compiled with debug, static, multithread.

It crashes with codecvt to wstring on xlocale.

Attachments

Change History

comment:1 Changed 2 years ago by bemandawes

  • Status changed from new to assigned

The problem also seems to involve other some uses of filesystem with static builds. As a first step to solving the problem, I'll expand testing to cover both your specific example and static builds in general.

Thanks,

--Beman

comment:2 follow-ups: ↓ 3 ↓ 4 Changed 2 years ago by mjklaim@…

I have apparently the same problem using this line:

const bfs::path	AOSL_XSD_FILE			= bfs::current_path() / "aosl.xsd";

With bfs namespace being boost::filesystem namespace.

Full source is available there:  http://code.google.com/p/art-of-sequence/source/browse/tools/aosdesigner/Paths.cpp?r=d51b374de600ecc4f8829b5aeb9cfdcd50335096

Also, is it normal behavior that current_path() returns and empty string? Not sure if it's related.

comment:3 in reply to: ↑ 2 Changed 2 years ago by mjklaim@…

Replying to mjklaim@…:

Actually, in my case the same problem occurs in Debug and Release mode too, using VS2010, with static/multithreaded boost libraries.

comment:4 in reply to: ↑ 2 Changed 2 years ago by mjklaim@…

Replying to mjklaim@…:

In fact my problem is better described by #6690 . I'm trying to hunt why the codecvt() function returns a null object.

comment:5 Changed 2 years ago by bemandawes

I'm working this issue today. Plan is to (1) revert 76303 and verify that fixes the initialization problems, and then (2) work on fixes to #4889, #6320, codecvt_facet not thread safe on Windows, which will be reintroduced when 76303 is reverted.

--Beman

comment:6 Changed 2 years ago by bemandawes

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [78000]) Fix #6690 and #6737, resolving static linking related problems with VC++ 8 through 11. Note that this fix may reintroduce codecvt thread safety problems #4889, #6320, for these compilers if static linking is used.

comment:7 Changed 22 months ago by erik.l.nelson@…

I'm running into this... will this make it into 1.50? Is the thread safety problem (#4889, #6320) re-fixed in 1.50?

comment:8 Changed 22 months ago by henry@…

I am using 1.50 and vs2010 and am still seeing this problem. I may need to pull boost out of my project if I can't get past this very soon

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.