Modify

Opened 6 years ago

Closed 6 years ago

Last modified 16 months ago

#6737 closed Bugs (fixed)

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

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

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 (0)

Change History (9)

comment:1 Changed 6 years ago by Beman Dawes

Status: newassigned

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 Changed 6 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 6 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 6 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 6 years ago by Beman Dawes

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 6 years ago by Beman Dawes

Resolution: fixed
Status: assignedclosed

(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 5 years 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 5 years 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

comment:9 Changed 16 months ago by raad@…

Cc: raad@… added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Beman Dawes.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.