overflowerror when calling direct.stdpy.file.seek with high numbers

Bug #1500203 reported by laurin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Fix Released
Undecided
rdb

Bug Description

when using direct.stdpy.file, calling seek(pos) with pos > = 2**31 raises the following error:
"OverflowError: Python int too large to convert to C long"

note that the same call works when using python's native file implementation

seems to me like panda3d is using 32bit integers here, preventing seek calls on the end of large files...

Revision history for this message
rdb (rdb) wrote :

Are you on a 32-bit system or a 64-bit system? Windows? Linux?

Revision history for this message
rdb (rdb) wrote :

This turned out to be a bug in the Python binding generator, which incorrectly recorded the type of C++ streamoff/streamsize. I've checked in a fix now.

Note that due to limitations in Microsoft's iostream implementation, it will still not be possible to seek large values on 32-bit Windows with this function. All other platforms should be fine.

Thanks for reporting the issue!

Changed in panda3d:
assignee: nobody → rdb (rdb)
milestone: none → 1.9.1
status: New → Fix Committed
rdb (rdb)
Changed in panda3d:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.